Overview of Hyper-V
Overview of Hyper-V
Hyper-V in Windows Server 2008 and Windows Server 2008 R2 enables you to create a
virtualized server computing environment. You can use a virtualized computing environment to
improve the efficiency of your computing resources by utilizing more of your hardware
resources. This is possible because you use Hyper-V to create and manage virtual machines and
their resources. Each virtual machine is a virtualized computer system that operates in an isolated
execution environment. This allows you to run multiple operating systems simultaneously on one
physical computer.
What does Hyper-V do?
Hyper-V provides software infrastructure and basic management tools that you can use to create
and manage a virtualized server computing environment. This virtualized environment can be
used to address a variety of business goals aimed at improving efficiency and reducing costs. For
example, a virtualized server environment can help you:
Reduce the costs of operating and maintaining physical servers by increasing your
hardware utilization. You can reduce the amount of hardware needed to run your server
workloads.
Increase development and test efficiency by reducing the amount of time it takes to set up
hardware and software and reproduce test environments.
Improve server availability without using as many physical computers as you would need
in a failover configuration that uses only physical computers.
An IT operations manager who is looking for ways to reduce the total cost of ownership
of their server infrastructure, in terms of both power costs and management costs.
Virtual machine snapshots, which capture the state, data, and hardware configuration of a
running virtual machine. Because snapshots record system states, you can revert the
virtual machine to a previous state.
Live migration
Requirements and Limits for Virtual Machines and Hyper-V in Windows Server
2008 R2
To effectively plan for and deploy Hyper-V in Windows Server 2008 R2, you should understand
the requirements and maximum configurations for the physical and virtual hardware that will
comprise the virtualized server computing environment. You will need to consider the
maximums that apply to each virtual machine as well as those that apply to the physical
computer that runs the Hyper-V role.
Virtual Machines
2
The following table lists the maximums that apply to each virtual machine.
Component
Virtual processors
Maximum
4
Memory
64 GB
Virtual
controllers
SCSI 4
256
Virtual
adapters
Notes
The number of virtual processors supported by a guest
operating system might be lower. For more information,
see About Virtual Machines and Guest Operating
Systems.
Review the requirements for the specific operating
system to determine the minimum and recommended
amounts.
The startup disk (sometimes referred to as the boot disk)
must be attached to one of the IDE devices. The startup
disk can be either a virtual hard disk or a physical disk
attached directly to a virtual machine.
Use of virtual SCSI devices requires integration services
to be installed in the guest operating system. For a list of
the guest operating systems for which integration
services are available, see About Virtual Machines and
Guest Operating Systems
Each SCSI controller supports up to 64 disks, which
means that each virtual machine can be configured with
as many as 256 virtual SCSI disks. (4 controllers x 64
disks per controller)
Each virtual hard disk is stored as a .vhd file on physical
media.
Maximum size is determined by the guest operating
system.
network 12
Maximum
64
Virtual
12 with conditions met
processors per in the Notes column,
logical
otherwise 8.
processor
Virtual
384 running virtual
machines per machines
server
Virtual
512
processors per
server
Memory
1 TB
Notes
Both of the following must be available and enabled in the
BIOS:
Hardware-assisted virtualization
Hardware-enforced
(DEP)
Data
Execution
Prevention
None.
None.
Storage
Limited by what is
supported
by
the
management operating
system.
No limits
imposed by Hyper-V.
For more information about the storage options for HyperV, see Planning for Disks and Storage. For general
information about storage for Windows Server, see
Reviewing Storage Limits (http://go.microsoft.com/fwlink/?
LinkID=161361).
Note
Microsoft does not support network-attached storage (NAS)
for Hyper-V.
Physical
network
adapters
Virtual
networks
(switches)
Virtual
network switch
ports per server
Notes
Consider the number of nodes you want to reserve for
failover, as well as maintenance tasks such as applying
updates. We recommend that you plan for enough
resources to allow for 1 node to be reserved for failover,
which means it remains idle until another node is failed
over to it. (This is sometimes referred to as a passive
node.) You can increase this number if you want to
reserve additional nodes. There is no recommended ratio
or multiplier of reserved nodes to active nodes; the only
specific requirement is that the total number of nodes in a
cluster cannot exceed the maximum of 16.
Running virtual 1,000
per Several factors can affect the real number of virtual
machines
per cluster, with a machines that can be run at the same time on one node,
cluster and per maximum
of such as:
node
384 on any one
5
node
Hardware Considerations
To effectively plan for and deploy Hyper-V, you should understand the requirements and
maximum configurations for the physical and virtual hardware that will comprise the virtualized
server computing environment.
Hardware requirements
Hyper-V requires specific hardware. To install and use the Hyper-V role, you will need the
following:
You can identify systems that support the x64 architecture and Hyper-V by searching the
Windows Server catalog for Hyper-V.
Tip
The settings for hardware-assisted virtualization and hardware-enforced DEP are available in
the BIOS. However, the names of the settings may differ from the names identified above. For
more information about whether a specific processor model supports Hyper-V, check with the
manufacturer of the computer. If you modify the settings for hardware-assisted virtualization
6
or hardware-enforced DEP, we recommend that you turn off the power to the computer and
then turn it back on. Restarting the computer may not apply the changes to the settings.
Memory
The maximum amount of memory that can be used is determined by the operating system, as
follows:
For Windows Server 2008 Enterprise and Windows Server 2008 Datacenter, the physical
computer can be configured with up to 1 TB of physical memory, and virtual machines
that run either of those editions can be configured with up to 64 GB of memory per
virtual machine.
For Windows Server 2008 Standard, the physical computer can be configured with up to
32 GB of physical memory, and virtual machines that run that edition can be configured
with up to 31 GB of memory per virtual machine.
Processors
The release version of Hyper-V is supported on physical computers with up to 16 logical
processors. However, a hotfix (KB956710) is available that increases the maximum number of
virtual processors to 24. For more information and links to the updates, see Hyper-V Update List.
A logical processor can be a single core or multi-core processor. You can configure up to 4
virtual processors on a virtual machine. Note that the number of virtual processors supported by
a guest operating system might be lower. For more information, see About Virtual Machines and
Guest Operating Systems. The following are some examples of supported systems and the
number of logical processors they provide:
Networking
Hyper-V provides a variety of networking options and configurations to meet different
networking requirements. For more information about different types of virtual networks and
virtual network adapters, see Configuring Virtual Networks.
Hyper-V networking includes the following support:
Each virtual machine can be configured with up to 12 virtual network adapters8 can be
the network adapter type and 4 can be the legacy network adapter type. The network
adapter type provides better performance and requires a virtual machine driver that is
included in the integration services packages.
Each virtual network adapter can be configured with either a static or dynamic MAC
address.
Each virtual network adapter offers integrated virtual local area network (VLAN) support
and can be assigned a unique VLAN channel.
You can have an unlimited number of virtual networks with up to 512 virtual machines
per virtual network.
Note
You cannot connect a virtual network to a wireless network adapter. As a result, you cannot
provide wireless networking capabilities to virtual machines.
Storage
Hyper-V supports a variety of storage options. For more information about the storage options,
see Planning for Disks and Storage.
You can use the following types of physical storage with a server that runs Hyper-V:
Direct-attached storage: You can use Serial Advanced Technology Attachment (SATA),
external Serial Advanced Technology Attachment (eSATA), Parallel Advanced
Technology Attachment (PATA), Serial Attached SCSI (SAS), SCSI, USB, and Firewire.
Storage area networks (SANs): You can use Internet SCSI (iSCSI), Fibre Channel, and
SAS technologies.
Important
Microsoft does not support network-attached storage (NAS) for Hyper-V.
You can configure a virtual machine to use the following types of storage:
Virtual IDE devices. Each virtual machine supports up to 4 IDE devices. The startup
disk (sometimes referred to as the boot disk) must be attached to one of the IDE devices.
The startup disk can be either a virtual hard disk or a physical disk. Although a virtual
machine must use a virtual IDE device as the startup disk to start the guest operating
system, you have many options to choose from when selecting the physical device that
will provide the storage for the virtual IDE device. For example, you can use any of the
types of physical storage identified in the preceding list.
Virtual SCSI devices. Each virtual machine supports up to 4 virtual SCSI controllers,
and each controller supports up to 64 disks. This means that each virtual machine can be
configured with as many as 256 virtual SCSI disks. Use of virtual SCSI devices requires
integration services to be installed in the guest operating system. For a list of the guest
operating systems for which integration services are available, see About Virtual
Machines and Guest Operating Systems
Virtual hard disks of up to 2040 GB. You can use fixed virtual hard disks, dynamically
expanding virtual hard disks, and differencing disks.
Physical disks. Physical disks attached directly to a virtual machine have no size
limitation other than what is supported by the guest operating system.
Virtual machine storage capacity. Using virtual hard disks, each virtual machine
supports up to 512 TB of storage. Using physical disks, this number is even greater
depending on what is supported by the guest operating system.
Tip
Although the I/O performance of physical SCSI and IDE devices can differ significantly, this
is not true for the virtualized SCSI and IDE devices in Hyper-V. Hyper-V IDE and SCSI
storage devices both offer equally fast high I/O performance when integration services are
installed in the guest operating system. For a list of the guest operating systems for which
integration services are available, see About Virtual Machines and Guest Operating Systems.
Other hardware components
9
The following is information about the other types of physical and virtual hardware components
that you can use with Hyper-V.
DVD
drive
Virtual
COM
port
Virtual
floppy
drive
A virtual machine has 1 virtual DVD drive by default when you create the virtual
machine. Virtual machines can be configured with up to 3 DVD drives, connected
to an IDE controller. (Virtual machines support up to 4 IDE devices, but one
device must be the startup disk.)
A virtual DVD drive can access CDs and DVDs, either .iso files or physical
media. However, only one virtual machine can be configured to access a physical
CD/DVD drive at a time.
Each virtual machine is configured with 2 virtual serial (COM) ports that can be
attached to a named pipe to communicate with a local or remote physical
computer.
Note
No access to a physical COM port is available from a virtual machine.
Each virtual machine is configured with 1 virtual floppy drive, which can access
virtual floppy disk (.vfd) files.
Note
No access to a physical floppy drive is available from a virtual machine.
You can create a virtual network when you install the Hyper-V role. This action changes
the configuration of the physical network adapter you selected when you installed the
role. For more information about how a physical network adapter operates after you
associate it to a virtual network, see Configuring Virtual Networks.
You can install the management tools on some versions of Windows without installing
the Hyper-V role. For more information about installing the tools without installing the
Hyper-V role, see Install and Configure Hyper-V Tools for Remote Administration.
When the Hyper-V role is installed, the use of Virtual Server or Virtual PC on the
computer is not supported.
directly to a virtual machine. These tools are installed automatically when you install the HyperV role. However, you can also install them by themselves to remotely manage a server running
Hyper-V.
Compatibility between the Hyper-V remote management tools and the server running Hyper-V is
affected by the version of the tools and the version of Hyper-V. As a general rule, you can use a
newer version of the tools to manage an older version of Hyper-V, but you cannot use an older
version of the tools to manage a newer version of Hyper-V.
The following table identifies the versions of Hyper-V that you can manage with a particular
version of the tools, as well as the operating system you can install the tools on.
Note
Membership in the local Administrators group, or equivalent, is the minimum required to
complete this procedure.
Version of Hyper-V Tools
Version of Hyper-V
Windows
7
Enterprise,
Windows 7 Professional, or
Windows 7 Ultimate editions)
apply
update
KB952627
http://support.microsoft.com/kb/95
2627
2. Open Server Manager. (If Server Manager is not running, click Start, point to
Administrative Tools, click Server Manager, and then, if prompted for permission to
continue, click Continue.)
3. In Server Manager, under Features Summary, click Add Features.
4. On the Select Features page, expand Remote Server Administration Tools, and then
expand Remote Administration Tools.
5. Click Hyper-V Tools, and then proceed through the rest of the wizard.
Configuring the management tools
The configuration process consists of modifying various components that control access and
communications between the server running Hyper-V and the computer on which you will run
the Hyper-V management tools.
Note
No additional configuration is required if you are using the management tools on a computer
running Windows Server 2008 and the same user account is a member of the Administrators
group on both computers.
Configuring the server running Hyper-V
The following procedures describe how to configure the server running Hyper-V. When domainlevel trust is not established, perform all the steps. When domain-level trust exists but the remote
user is not a member of the Administrators group on the server running Hyper-V, you must
modify the authorization policy, but you can skip the steps for modifying the Distributed COM
Users group and the Windows Management Instrumentation (WMI) namespaces.
Note
The following procedures assume that you have installed the Hyper-V role on the server. For
instructions about installing the Hyper-V role, see Install the Hyper-V Role on a Full
Installation of Windows Server 2008 or Install the Hyper-V Role on a Server Core Installation
of Windows Server 2008.
To configure the Hyper-V role for remote management on a full installation of Windows
Server 2008
1. Enable the firewall rules for Windows Management Instrumentation. From an elevated
command prompt, type:
14
Note
The instructions for configuring the authorization policy assume that the default authorization
policy has not been modified, including the default location, and that the account you are
configuring for remote access requires full administrative access to the Hyper-V role.
3. Click Start, click Start Search and type azman.msc. If you are prompted to confirm the
action, click Continue. The Authorization Manager MMC snap-in opens.
4. In the navigation pane, right-click Authorization Manager and click Open
Authorization Store. Make sure that XML file is selected. Browse to the %system drive
%\ProgramData\Microsoft\Windows\Hyper-V folder, select InitialStore.xml, click Open
and then click OK.
Note
The Program Data folder is a hidden folder by default. If the folder is not visible, type:
<system_drive>\ProgramData\Microsoft\Windows\Hyper-V\initialstore.xml
5. In the navigation pane, click Hyper-V services, and then click Role Assignments. Rightclick Administrator, point to Assign Users and Groups, and then point to From
Windows and Active Directory. In the Select Users, Computers, or Groups dialog
box, type the domain name and user name of the user account, and then click OK.
15
16
o Below the Permissions list, select the Apply these permissions to objects
and/or containers within this container only check box.
17. Click OK in each dialog box until you return to the WMI Control Properties dialog
box.
18. Next, you repeat the process for the virtualization namespace. Scroll down if necessary
until you can see the virtualization namespace. Click virtualization. Below the
namespace list, click Security.
19. In the Security for ROOT\virtualization dialog box, check to see if the appropriate user
is listed. If not, click Add. In the Select Users, Computers, or Groups dialog box, type
the name of the user and click OK.
20. On the Security tab, select the name of the user. Under Permissions for <user or group
name>, click Advanced. On the Permissions tab, verify that the user you want is
selected and then click Edit. In the Permission Entry for virtualization dialog box,
modify three settings as follows:
o For Apply to, select This namespace and subnamespaces.
o In the Permissions list, in the Allow column, select the Remote Enable check
box.
o Below the Permissions list, select the Apply these permissions to objects
and/or containers within this container only check box.
21. Click OK in each dialog box and then close Computer Management.
22. Restart the server to apply the changes to the authorization policy.
To configure the Hyper-V role for remote management on a Server Core installation of
Windows Server 2008
1. Enable the firewall rules on the server for Windows Management Instrumentation. From
an elevated command prompt, type:
netsh advfirewall firewall set rule group=Windows Management Instrumentation
(WMI) new enable=yes
The command has succeeded when it returns the following message: Updated 4
rules(s). Ok.
17
2. Next, you modify the Distributed COM permissions to provide access to the remote user.
Type:
net localgroup Distributed COM Users /add <domain_name>\<user_name>
where <domain_name> is the domain that the user account belongs to and <user_name>
is the user account you want to grant remote access to.
3. Next, you connect remotely to the server running the Server Core installation so you can
modify the authorization policy and the two WMI namespaces, using MMC snap-ins that
are not available on the Server Core installation.
Log on to the computer on which you will run the Hyper-V management tools, using a
domain account that is a member of the Administrators group on the computer running a
Server Core installation. (If you need to add this user, see the instructions in Install the
Hyper-V Role on a Server Core Installation of Windows Server 2008.)
Note
The instructions for configuring the authorization policy assume that the default authorization
policy has not been modified, including the default location, and that the account you are
configuring for remote access requires full administrative access to the Hyper-V role.
4. Click Start, click Start Search and type azman.msc. If you are prompted to confirm the
action, click Continue. The Authorization Manager snap-in opens.
5. In the navigation pane, right-click Authorization Manager and click Open
Authorization Store. Make sure that XML file is selected and type:
\\<remote_computer>\c$\ProgramData\Microsoft\Windows\HyperV\initialstore.xml
where <remote_computer> is the name of the computer running the Server Core
installation.
Click Open and then click OK.
6. In the navigation pane, click Hyper-V services, and then click Role Assignments. Rightclick Administrator, point to Assign Users and Groups, and then point to From
Windows and Active Directory. In the Select Users, Computers, or Groups dialog
box, type the domain name and user name of the user account, and then click OK.
7. Close Authorization Manager.
18
8. The remaining steps grant the required WMI permissions to the remote user for two
namespaces: the CIMV2 namespace and the virtualization namespace. Click Start, click
Administrative Tools, and then click Computer Management.
9. In the navigation pane, click Services and Applications, right-click WMI Control, and
then click Properties.
10. Click the Security tab. Click Root and then click CIMV2. Below the namespace list,
click Security.
11. In the Security for ROOT\CIMV2 dialog box, check to see if the appropriate user is
listed. If not, click Add. In the Select Users, Computers, or Groups dialog box, type the
name of the user and click OK.
12. On the Security tab, select the name of the user. Under Permissions for <user or group
name>, click Advanced. On the Permissions tab, verify that the user you want is
selected and then click Edit. In the Permission Entry for CIMV2 dialog box, modify
three settings as follows:
o For Apply to, select This namespace and subnamespaces.
o In the Permissions list, in the Allow column, select the Remote Enable check
box.
o Below the Permissions list, select the Apply these permissions to objects
and/or containers within this container only check box.
13. Click OK in each dialog box until you return to the WMI Control Properties dialog
box.
14. Next, you repeat the process for the virtualization namespace. Scroll down if necessary
until you can see the virtualization namespace. Click virtualization. Below the
namespace list, click Security.
15. In the Security for ROOT\virtualization dialog box, check to see if the appropriate user
is listed. If not, click Add. In the Select Users, Computers, or Groups dialog box, type
the name of the user and click OK.
16. On the Security tab, select the name of the user. Under Permissions for <user or group
name>, click Advanced. On the Permissions tab, verify that the user you want is
selected and then click Edit. In the Permission Entry for virtualization dialog box,
modify three settings as follows:
19
For examples that show you how to set up and use the different types of virtual networks, see
http://technet.microsoft.com/en-us/library/ee247420(WS.10).aspx.
Types of virtual networks
While Hyper-V allows you to configure complex virtual network environments, the basic
concept of virtual networking is straightforward. A virtual network works like a physical network
switch except that the switch is implemented in software (which is why it is sometimes referred
to as a virtual network switch). Ports are added or removed as they are needed when virtual
machines are connected to or disconnected from a virtual network.
Virtual Network Manager (available from the Hyper-V Manager snap-in) offers three types of
virtual networks that you can use to define various networking topologies for virtual machines
and the virtualization server. You can create the following types of virtual networks:
20
External virtual networks. Use this type when you want to provide virtual machines
with access to a physical network to communicate with externally located servers and
clients. This type of virtual network also allows virtual machines on the same
virtualization server to communicate with each other. This type of network may also be
available for use by the management operating system, depending on how you configure
the networking. (The management operating system runs the Hyper-V role.) For more
information, see A closer look at external virtual networks later in this topic.
Note
Hyper-V does not support wireless networks. An external virtual network provides access to a
physical network through a wired physical network adapter.
Internal virtual networks. Use this type when you want to allow communication
between virtual machines on the same virtualization server and between virtual machines
and the management operating system. This type of virtual network is commonly used to
build a test environment in which you need to connect to the virtual machines from the
management operating system. An internal virtual network is not bound to a physical
network adapter. As a result, an internal virtual network is isolated from all external
network traffic.
Private virtual networks. Use this type when you want to allow communication only
between virtual machines on the same virtualization server. A private virtual network is
not bound to a physical network adapter. A private virtual network is isolated from all
external network traffic on the virtualization server, as well any network traffic between
the management operating system and the external network. This type of network is
useful when you need to create an isolated networking environment, such as an isolated
test domain.
When you create an external virtual network, this action affects how networking is configured in
the management operating system. Hyper-V creates a virtual network adapter in the management
operating system. Hyper-V then binds the standard services and protocols to the virtual network
adapter instead of the physical network adapter, and binds only the Virtual Network Service
Protocol to the physical network adapter.
After an external virtual network is configured, all networking traffic is routed though the virtual
network switch. The virtual network switch functions as a physical switch would and routes
networking traffic through the virtual network to its destination. For this reason, we recommend
using at least one additional physical network adapter for managing network traffic.
Networking and virtual machines
To connect a virtual machine to a virtual network, you add a virtual network adapter to the
virtual machine and then connect the virtual network adapter to an existing virtual network.
There are two types of network adapters available for Hyper-V: a network adapter and a legacy
network adapter.
The network adapter is designed specifically for Hyper-V and requires a virtual machine
driver that is included with the Hyper-V integration services. This type of networking
adapter provides better performance than a legacy network adapter and is the
recommended choice when it can be used. Because this type of virtual network adapter
requires integration services in the guest operating system, it can be used only with guest
operating systems for which integration services are available. For more information, see
About Virtual Machines and Guest Operating Systems.
Note
If a network adapter is configured for a virtual machine but integration services are not
installed in the guest operating system, Device Manager lists the network adapter as an
unknown device.
The legacy network adapter emulates an Intel 21140-based PCI Fast Ethernet Adapter.
This type of network adapter provides networking capabilities for two scenarios: when
using a guest operating systems for which integration services are not available, and
when network boot capabilities are required. The legacy network adapter uses a driver
that is available in most operating systems, instead of a Hyper-V specific driver. The
legacy network adapter also provides the ability to boot to the Pre-Boot Execution
Environment (PXE).
The network connection for a virtual machine is made by logically connecting it to a port on the
virtual network. For a networking application on the virtual machine to connect to external end
point, the networking packet is first routed through the virtual network adapter to the virtual port
on the external virtual network to which the virtual machine is attached. The networking packet
is then directed to the physical network adapter and out to an external physical network.
22
For the virtual machine to communicate with the management operating system, there are two
options. One option is to route the network packet through the physical network adapter and out
to the physical network, which then returns the packet back to the server running Hyper-V using
the second physical network adapter. Another option is to route the network packet through the
virtual network, which is more efficient. The option selected is determined by the virtual
network. The virtual network includes a learning algorithm, which determines the most efficient
port to direct traffic to and will send the network packet to that port. Until that determination is
made by the virtual network, network packets are sent out to all virtual ports.
Managing MAC addresses
A virtual machine can be configured to use a static MAC address or a dynamic MAC address.
Hyper-V assigns dynamic MAC addresses to virtual machines from a pool of available addresses
that are established when Hyper-V is installed. When there is more than one server running
Hyper-V on the same subnet and virtual machines use dynamic addresses, duplicate MAC
addresses might exist and networking conflicts might occur. In Hyper-V in Windows
Server 2008 R2, you can use Virtual Network Manager on each server running Hyper-V to define
different ranges of MAC addresses to help avoid duplicate MAC addresses.
Note
Modifying the range of available MAC addresses does not affect existing virtual machines that
are configured with a dynamic MAC address. To modify the MAC address of an existing
virtual machine, you can reconfigure the virtual network adapter to use a static MAC address,
or remove and then re-add the virtual network adapter to receive a new dynamic MAC
address.
Configuring virtual local area networks (VLANs)
All released versions of Hyper-V support virtual local area networks (VLANs). A VLAN
configuration is software-based, which means that you can easily move a computer and still
maintain their network configurations. For each virtual network adapter you connect to a virtual
machine, you can configure a VLAN ID for the virtual machine. You will need the following to
configure VLANs:
A physical network adapter that supports network packets with VLAN IDs that are
already applied.
On the management operating system, you will need to configure the virtual network to allow
network traffic on the physical port. This is for the VLAN IDs that you want to use internally
with virtual machines. Next, you configure the virtual machine to specify the virtual LAN that
the virtual machine will use for all network communications.
23
There are two modes in which you can configure a VLAN: access mode and trunk mode. In
access mode, the external port of the virtual network is restricted to a single VLAN ID in the UI.
You can have multiple VLANs using WMI. Use access mode when the physical network adapter
is connected to a port on the physical network switch that also is in access mode. To give a
virtual machine external access on the virtual network that is in access mode, you must configure
the virtual machine to use the same VLAN ID that is configured in the access mode of the virtual
network. Trunk mode allows multiple VLAN IDs to share the connection between the physical
network adapter and the physical network. To give virtual machines external access on the virtual
network in multiple VLANs, you need to configure the port on the physical network to be in
trunk mode. You will also need to know the specific VLANs that are used and all of the VLAN
IDs used by the virtual machines that the virtual network supports.
To allow Hyper-V to use a VLAN
1. Open Hyper-V Manager.
2. From the Actions menu, click Virtual Network Manager.
3. Select the virtual network you want to edit, and, in the right pane, check to select Enable
virtual LAN identification.
4. Enter a number for the VLAN ID. All traffic for the management operating system that
goes through the network adapter will be tagged with the VLAN ID you set.
To allow a virtual machine to use a VLAN
1. Open Hyper-V Manager.
2. In the results pane, under Virtual Machines, select the virtual machine that you want to
configure to use a VLAN.
3. In the Action pane, under the virtual machine name, click Settings.
4. Under Hardware, select the virtual network adapter connected to the external virtual
network.
5. In the right pane, select Enable virtual LAN identification, and then enter the VLAN ID
you plan to use.
If you need the virtual machine to communicate using additional VLANs, connect additional
network adapters to the appropriate virtual network and assign the VLAN ID. Make sure to
configure the IP addresses correctly and that the traffic you want to move across the VLAN is
also using the correct IP address.
24
How to configure physical disks that are directly attached to a virtual machine
You can use physical disks that are directly attached to a virtual machine as a storage option on
the management operating system. This allows virtual machines to access storage that is mapped
directly to the server running Hyper-V without first configuring the volume. The storage can be
either a physical disk which is internal to the server, or a SAN logical unit number (LUN) that is
mapped to the server (a LUN is a logical reference to a portion of a storage subsystem). The
virtual machine must have exclusive access to the storage, so the storage must be set in an
Offline state in Disk Management. The storage is not limited in size, so it can be a multiterabyte
LUN.
25
When using physical disks that are directly attached to a virtual machine, you should be aware of
the following:
12. Once the physical disk is configured, you can start the virtual machine and store data on
the disk. If installing an operating system, the installation process automatically prepares
the disk for use. If you are using the physical disk to store data, it must first be prepared
by the virtual machine.
If you are installing an operating system on the physical disk and it is in an Online state before
the virtual machine is started, the virtual machine will fail to start. You must store the virtual
machine configuration file in an alternate location because the physical disk is used by the
operating system installation. For example, locate the configuration file on another internal drive
on the server running Hyper-V.
How to configure iSCSI-based storage
From the guest operating system, you can connect directly to iSCSI LUNs on a storage array.
Direct connectivity using iSCSI offers the following advantages over other iSCSI LUN options:
You can connect to iSCSI LUNs without shutting down and restarting the guest operating
system.
You can manage LUNs in the guest operating system in the same way that LUNs are
managed in the physical environment.
27
Note
For guest operating systems running Windows Server 2003 or Windows XP, you will need to
download the Microsoft iSCSI Initiator from the Microsoft Download Center
(http://go.microsoft.com/fwlink/?LinkId=160332).
28