Processor topology inside of Hyper-V virtual machines
2011-12-05 16:49
323 查看
Processor topology inside of Hyper-V virtual machines
Ben Armstrong [MSFT]18 Jul 2008 3:41 AM
A number of people have noticed that they can create a virtual machine with four virtual processors, and then successfully run Windows XP on it and have it utilize all four virtual processors. This strikes them as odd, because Windows XP supposedly only
supports the use of one or two processors in a computer.
To understand what is happening we need to talk about processor topology.
A long time ago, the universe used to be quite simple. When you talked about a processor you meant a physical chip that you put inside a computer that was capable of handling one stream of execution. Then along came concepts such as hyper-threading and
multi-core processors. These technologies allow a single physical processor to handle multiple streams of execution, and effectively appear like multiple physical processors.
In this new world, in order to differentiate between the physical chip that you put in a computer and a single stream of execution on the chip, we use the terms "package", "socket" or "physical processor" to refer to the actual physical chip that you put
inside the computer, and the term "logical processor" to refer to a single stream of execution on the chip.
"Processor topology" is simply the ratio, and nature, of logical processors to physical processors in a computer.
This all gets interesting when it comes to the question of how virtual processors are represented inside of a virtual machine.
When hyper-threading and multi-core processors first came onto the scene, Microsoft made the decision to license all of its software based on the number of physical processors [and not logical processors] in a system. This means that when you try to create
a "four processor" virtual machine the way in which we represent those four processors can affect how the software that runs inside the virtual machine will need to be licensed.
Obviously, as Microsoft, we do not want you to be able to run software that utilizes more processing power than you are correctly licensed to use. On the flip side, we understand that you do not want to have to pay more for your software than you actually
need to.
To this end, Hyper-V examines the processor topology of your physical computer and exposes that into the virtual machine.
Thus, a virtual machine with four virtual processors that is running on a physical computer with a single quad-core physical processor will appear to only have a single physical processor with four logical processors. The same virtual machine running on
a system using two dual-core physical processors would appear to have two physical processors with four logical processors [two logical processors per physical processor].
And this is what allows Windows XP to run on your "four virtual processor" virtual machine and utilize all of the virtual processors, because it is still within its licensing right of one or two physical processors, if you are running on a hyper-threaded
or multi-core system.
Cheers,
Ben
UPDATE: To help visualize this, below is a table that shows you the processor topology that will be reported inside the virtual machine, given the processor topology of the physical computer and the number of virtual processors configured
for the virtual machine.
# Virtual Processors / Physical Processor Topology | 1 Virtual Processor | 2 Virtual Processors | 4 Virtual Processors |
4 single-core processors | 1 single-core processor | 2 single-core processors | 4 single-core processors |
2 dual-core processors | 1 single-core processor | 1 dual-core processor | 2 dual-core processors |
1 quad-core processor | 1 single-core processor | 1 dual-core processor | 1 quad-core processor |
相关文章推荐
- [PowerShell Utils] Create a list of virtual machines based on configuration read from a CSV file in Hyper-V
- Beyond Virtual Machines and Hypervisors: Overview of Bare Metal Provisioning with OpenStack Cloud
- Conditions When DPM Fails to Back up Hyper-V Virtual Machines in an Online State
- List of Java virtual machines
- Note of learning Inside the Java Virtual Machine Chapter Five
- Using Windows Server 2012 Backup for Hyper-V Virtual Machines. Error 80780176 - The specified component was not reported by the VSS writer.
- ESXi 5.5 解决 cannot edit the settings of virtual machines of version 10
- [论文笔记] Live Migration of Virtual Machines (NSDI, 2005)
- [论文泛读] Dynamic placement of virtual machines for managing sla violations (IM, 2007)
- [Windows Azure] Manage the Availability of Virtual Machines
- [论文笔记] Live Gang Migration of Virtual Machines (HPDC, 2011)
- PatentTips - Transparent unification of virtual machines
- [论文笔记] Live Migration of Multiple Virtual Machines with Resource Reservation in Cloud Computing Environments (CLOUD, 2011)
- PatentTips - Enhancing the usability of virtual machines
- Beyond Virtual Machines and Hypervisors: Overview of Bare Metal Provisioning with OpenStack Cloud
- [论文笔记] Performance and energy modeling for live migration of virtual machines (Cluster Comput, 2011)
- Question 19: Which of the following are not pre-processor directives in C++?
- Activate windows server 2008 R2 virtual server in hyper-v
- 适合虚存环境的快速排序算法的性能研究(Performance of Quicksort adapted for virtual memory use)
- One of the disks in this virtual machine is already in use by a virtual machine or by a snapshot"