Tải bản đầy đủ (.pdf) (76 trang)

ADVANCED SERVER VIRTUALIZATION VMware and Microsoft Platforms in the Virtual Data center phần 4 docx

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (1.51 MB, 76 trang )

206  Advanced Server Virtualization
Merging Virtual Hard Disks
Merging disks allows a child disk to be combined with a parent disk as either
an update to the parent or as a new separate and unique disk. To merge a disk,
select the Merge with Parent or Merge with New option. After selecting the
merge method, if Merge with New was chosen, the Merged Virtual Hard Disk
type must be chosen along with the name and location of the new disk fi le.
Be careful when merging a disk with a parent. If the parent
is set to read-only under NTFS, it must be set back to read/
write permissions. If the parent has any other child disks,
upon beginning the merge process with the parent (assum-
ing that New was not the option chosen) any children besides the current
child being operated on will no longer be able to operate, due to the parent
no longer being unmodifi ed.
Converting Disk Types
Converting Fixed to Dynamic
Converting a fi xed disk to a dynamic disk is usually done when a fi xed disk is
consuming too much disk space.  e conversion process actually creates a sec-
ond virtual hard disk and then copies the contents from the original to the newly
created disk.  e newly created dynamic disk is smaller than the fi xed disk.  e
caveat is that if the fi xed disk is full, then the dynamic disk will be expanded
with data to the same size as the fi xed disk and there will be no space savings.
Another method of making sure that the new dynamic disk is the smallest size
possible is to use the Virtual Disk Precompactor utility and then compact the
dynamic disk to make it the smallest size possible.  e compacting section later
on in this chapter describes the recommended steps to make a dynamic disk the
smallest size possible.
Converting Dynamic to Fixed
Converting a dynamic disk to a fi xed disk is commonly used to optimize per-
formance of a virtual machine.  e performance increase is very slight, but may
be critical in some instances of high utilization.  e penalty for doing this is the


fi xed disk will consume the entire amount of space that the dynamic disk may
have grown to.  is will make the disk fi le more diffi cult to move and copy due
to the increased fi le size.
Marshall_AU3931_C012.indd 206Marshall_AU3931_C012.indd 206 4/13/2006 1:38:02 PM4/13/2006 1:38:02 PM
Microsoft Virtual Server Advanced Topics  207
It is important to understand, for a brief period of time, both a
dynamic and a fi xed disk version will exist on the host system.
Before doing this or other types of conversions, adequate disk
space must be available or the results could be disastrous.
Converting Linked to Dynamic
Converting a linked disk to a dynamic disk is used to move data from a physical
hard disk into a virtual hard disk.  is can be useful for several reasons including
moving a data drive from a physical implementation over to a newly built virtual
machine that will be taking over the same function or if a machine needs to be
converted from physical to virtual.
First, the problems of doing linked disk conversions must be addressed. If a
linked disk is mounted as a drive with a drive letter on the host operating system,
it cannot be used as a linked disk. A linked disk cannot be the host operating
system boot disk. Any disk that is mounted with a drive letter and has fi les that
are in use cannot be used or read properly. A linked disk cannot be used from a
mapped network drive. Changes to linked disks are changes to the actual physi-
cal hard disk, so be forewarned that these changes are permanent.
Second, when attempting to convert a disk that is bootable, but has been
added as a secondary disk on a host server, the disk will mount.  e conversion
can be done, however the problem remains that due to the diff erences in the
underlying hardware between the physical machine and the virtual machine, the
results of attempting to startup the new virtual hard disk after the conversion is
likely to fail.  e only way to avoid this problem is to use a tool, such as the one
provided by Microsoft called SysPrep. SysPrep removes all of these drivers and
dependencies from the original physical machine and allows windows to do a

partial reinstall of the drivers and specifi c confi guration variables to facilitate a
clean and properly confi gured operating system. Sysprep is discussed in detail in
the Template Guest Operating System Image Concepts section of chapter 24.
Converting Linked to Fixed
 e same caveats and problems that exist for converting a linked disk to a dy-
namic disk exist for converting from a linked disk to a fi xed disk.  e only ex-
ception is that a fi xed disk will be the same size as the original linked disk—there
absolutely must be enough free disk space in the location where the fi xed disk is
to be stored.
Marshall_AU3931_C012.indd 207Marshall_AU3931_C012.indd 207 4/13/2006 1:38:02 PM4/13/2006 1:38:02 PM
208  Advanced Server Virtualization
Compacting Dynamic Disks
Compacting a dynamic disk provides a method of reducing a dynamic disk
that has grown larger than desired.  e compacting process eliminates all of the
excess space in a virtual hard disk.  is is done by examining the virtual hard
disk and fi nding the end of the data being stored on the disk and making the fi le
shrink to the end of the data. It is recommended that the Virtual Disk Precom-
pactor utility be used to prepare the disk for compacting.
If Microsoft Virtual Server 2005 R2 is not available, the Vir-
tual Disk Precompactor utility that comes with Virtual PC
2004 Service Pack 1 will operate in the same fashion as the
Virtual Disk Precompactor released with Microsoft Virtual
Server 2005 R2.  is method is supported by Microsoft.
Virtual Disk Precompactor
 e Virtual Disk Precompactor, which comes with Microsoft Virtual Server
2005 R2 and Virtual PC 2004 Service Pack 1, is a utility that should be run
before running the Disk Compactor process.  e Virtual Disk Precompactor
writes a series of zeros (called zeroing out) to all of the empty space inside of
the dynamic disk.  is ensures that when the Disk Compactor is run that it
will eliminate all of the empty space inside of the dynamic disk thereby making

it smaller in size. Before running the Virtual Disk Precompactor, it is recom-
mended that the inside of the virtual hard disk be cleaned of any unnecessary
fi les and that the virtual hard disk be defragmented. When defragmenting the
virtual hard disk, if the Microsoft defragment tool is used, it may be benefi cial
to run the tool multiple times to ensure full and complete defragmentation.
 ird-party tools such as Executive Software’s Diskeeper and Raxco’s Perfect
Disk do an excellent job of defragmentation in a few simple passes and in some
cases even in a single pass. If time savings is very important in this process than
looking at a third-party tool may be very benefi cial.
Once these steps have been followed, run the Virtual Disk Precompactor
utility and then use the Compact Virtual Hard Disk function of Virtual Server.
Following this process will provide the absolute smallest size dynamic disk that
can be obtained.
Virtual Networking
Virtual networking is often a confusing term when it comes to virtualization.
Virtual networks along with virtual hard disks are two of the greatest strengths
that virtualization off ers. Virtual networking provides the ability to create and
Marshall_AU3931_C012.indd 208Marshall_AU3931_C012.indd 208 4/13/2006 1:38:02 PM4/13/2006 1:38:02 PM
Microsoft Virtual Server Advanced Topics  209
manipulate networking hardware inside of a host server by doing it virtually us-
ing software and drivers.  ere is a central component to Microsoft’s implemen-
tation of virtual networking. It is the critical piece to their Virtual Networking
model—the Virtual Switch.
Virtual Switches
Under Microsoft Virtual Server 2005 R2 there are several networks that are au-
tomatically created during the installation process.  ese networks are actually
virtual switches that are connected to a physical network adapter. It is important
to understand however, that a virtual switch does not have to be connected to a
physical network adapter; this will be discussed later in this section.
Virtual switching and network confi guration is accomplished through a pro-

tocol fi lter driver that is listed in each physical network adapter’s protocol stack
on the host as Virtual Machine Network Services. Eff ectively, this provides a
method for a virtual switch to interface with the host server’s physical network
adapter. Additional networks can also be created and pointed through the fi lter
driver to a specifi c network adapter and multiple networks/virtual switches can
be attached or share the same physical network adapter. It is important to note
that when a virtual switch is connected to a physical network adapter, any virtual
machines attached to the virtual switch will be unable to communicate with the
host.  is is a security feature designed into Virtual Server (see Figure 12.4).
Figure 12.4 Virtual Network and Virtual Switch.
Virtual Switch
Physical Host Network Card
Virtual
Machine
Network
Card
Communication
between virtual
machines and
outside through a
virtual switch.
Connectivity to
outside, but not
to Host.
Virtual
Machine
Network
Card
Virtual
Machine

Network
Card
Marshall_AU3931_C012.indd 209Marshall_AU3931_C012.indd 209 4/13/2006 1:38:02 PM4/13/2006 1:38:02 PM
210  Advanced Server Virtualization
 e inability to communicate from the virtual machine to
the host across the virtual network switch was implemented
as a security measure to prevent users or malicious code inside
of a virtual machine from being able to attack or impact the
operating condition of the host server.
Network Adapter
A single virtual network adapter is automatically installed as part of the virtual
machine hardware by default when a virtual machine is confi gured under Vir-
tual Server.  is behavior makes sense because nearly all virtual machines will
need to communicate with another resource on a network.  ere is a limit to the
number of virtual network adapters that can be confi gured inside of a single vir-
tual machine, and that limit is four. Under most circumstances, a single virtual
network adapter is adequate.
Virtual Machines Communicating with the Host
It is possible to setup communications between the physical host server and its
virtual machines.  is can be accomplished by using the Microsoft Loopback
adapter.  e installation of the Microsoft Loopback adapter is quite straight for-
ward. Go to the Control Panel and select Add Hardware. Next, select the option
to manually add hardware, and pick Network adapters. When prompted for the
manufacturer, select Microsoft. In the Network Adapter box, click Microsoft
Loopback Adapter and then click Next followed by Finish. Once the Microsoft
Loopback adapter has been added, create a new virtual network and attach it to
the Loopback adapter.  e Loopback adapter should then be given an IP ad-
dress. Now any virtual machines that are attached to the newly created network
can be given an IP address on the same subnet as the host server’s Loopback
adapter, allowing the virtual machine and the host server to communicate with

each other.
After the Loopback adapter is installed, its TCP/IP properties
should be manually confi gured. If the TCP/IP properties are
confi gured to use DHCP, the adapter will eventually use an
automatic IP address (169.254.x.x) because the adapter is not
actually connected to any physical media and therefore it cannot reach a
DHCP server.
Virtual Machines Communicating with Each Other Privately
Private virtual machine to virtual machine networks can be created to provide
a very effi cient and secure network between virtual machines. A private virtual
Marshall_AU3931_C012.indd 210Marshall_AU3931_C012.indd 210 4/13/2006 1:38:03 PM4/13/2006 1:38:03 PM
Microsoft Virtual Server Advanced Topics  211
machine network is eff ectively attaching virtual machines to a dedicated virtual
switch with no outside connectivity.  ere is no limit to the number of virtual
machines that can be attached to a virtual switch, provided that they reside
on the same physical host.  is provides a great deal of fl exibility when doing
testing and troubleshooting of multi-tiered applications. To create a private net-
work, simply create a new network under virtual server and do not attach it to
any physical network or Loopback interfaces.
DHCP Server
Another facet of a virtual network is the Dynamic Host Confi guration Protocol
(DHCP) server that is built into Microsoft Virtual Server 2005 R2.  e DHCP
server can be activated going to the Virtual Networks link in the Virtual Server
Administration Website, then clicking on the virtual network to be confi gured
located under the Confi gure link. To confi gure the virtual DHCP server, click
the DHCP server link. Click the Enabled check box and enter in the desired
DHCP server settings. Once all the settings have been entered, click the OK
button located in the lower right hand corner.
 e virtual DHCP server will only give addresses to virtual
network cards on the virtual network.  is behavior is in-

tentional by design. If a DHCP server is required to give out
addresses to both physical and virtual machines, then it must
be a normal DHCP server that is installed in either a virtual machine or
on a physical machine located on the physical network.
DHCP Server Settings
Confi guring the virtual DHCP server is easier in Virtual Server than almost any
other DHCP serving application around.  e following is an explanation of the
available settings used to properly confi gure the virtual DHCP server.
• Network address denotes the base IP address range of addresses managed
by this DHCP server.
• Network mask is the subnet class that will be used by the DHCP server.
• Starting IP address begins the range of IP addresses that the DHCP server
will distribute to client virtual machines.
• Ending IP address ends the range of IP addresses that the DHCP server
will distribute to client virtual machines.
• Virtual DHCP server address is the IP address of this virtual DHCP s erver.
• Default gateway address will populate the default gateway on each client
machine that receives an IP address from the DHCP server. It is the IP ad-
dress of a local IP router (gateway) that forwards traffi c beyond this virtual
network.
Marshall_AU3931_C012.indd 211Marshall_AU3931_C012.indd 211 4/13/2006 1:38:03 PM4/13/2006 1:38:03 PM
212  Advanced Server Virtualization
• DNS servers will populate the DNS information inside of each client ma-
chine so that they can resolve a domain host name query.
• WINS servers will populate the WINS information inside of each client
machine.
• IP address lease time will determine when a client virtual machine must
request a new lease.  e minimum value allowed is 60 seconds.
• Lease renewal time indicates when a client virtual machine should attempt
to renew its lease from the original DHCP server before it expires.  e

minimum value allowed is 30 seconds.
• Lease rebinding time decides how long before the client virtual machine
should request a lease renewal from any DHCP server on the network in-
stead of just the original DHCP server that issued the lease.  e minimum
value allowed is 45 seconds.
Dynamic MAC Addresses
Dynamic MAC addresses are useful for quick testing or when there will be a
small number of virtual machines used throughout the entire network.  e rea-
son that dynamic MAC addresses are not desirable for large scale deployments
is due to the possibility of multiple virtual machines ending up with the same
assigned dynamic MAC address. When this occurs, network problems start hap-
pening mysteriously throughout the network or some virtual machines begin to
behave erratically without any reason.  e solution is to avoid using dynamic
MAC addresses all together by utilizing static MAC addresses.
Static MAC Addresses
Static MAC addresses can ensure that there are never duplicate MAC addresses
on the network. It is recommended that a standard be created to allow the cre-
ation and uniqueness of static MAC addresses throughout the network. Creat-
ing a table or spreadsheet to track static MAC address information is a good way
to start out; however if virtual machines are being tied into a physical network,
the best way to ensure proper enforcement is to use DHCP on the physical net-
work for IP address assignments. By using DHCP and tying the distribution of
IP addresses to MAC addresses, it is ensured that there will not be any duplicate
MAC addresses or IP addresses.  is is because most DHCP server software will
not allow a duplicate MAC address or IP address to be entered into the assign-
ment table.
A simple way to enhance network security and control over
IP addresses is by preventing other IP addresses from being
distributed by the DHCP server except to those that have
registered MAC addresses within the assignment table.

Marshall_AU3931_C012.indd 212Marshall_AU3931_C012.indd 212 4/13/2006 1:38:03 PM4/13/2006 1:38:03 PM
Microsoft Virtual Server Advanced Topics  213
Some virtualization platforms support virtual Network Ad-
dress Translation (NAT). Microsoft Virtual Server 2005 R2
does not have a function that supports any internal NAT of
any kind. However, NAT via a network device on the physi-
cal network is supported.
Creating a virtual network is simple using the Virtual Server Administration
Website. Once logged in, select the section Virtual Networks and choose the
Create link. After clicking the Create link, the New Virtual Network Properties
page is opened.
Creating a Virtual Network or Virtual Switch
 e fi rst step is to choose a descriptive name for the virtual network, then decide
whether it will be connected to one of the host server’s physical adapters, the Mi-
crosoft Loopback adapter (if it has been installed), or not bound to an adapter
at all (this will create a virtual machine to virtual machine only network). Next,
choose if there are any virtual machines listed that should be attached to the
virtual network being created. If there are any further notes about the virtual
network, they can be supplied in the notes fi eld. Finally, click the OK button
located in the lower right corner of the page.
After clicking the OK button, the Virtual Network Properties page of the
new virtual network that has been created is now displayed.  is is also the loca-
tion where the DHCP confi guration option can be selected.
Adding or Removing a Virtual Network Adapter
To add or remove a virtual network adapter from a virtual machine under Mi-
crosoft Virtual Server 2005 R2, go to the Status page for the specifi c virtual
machine that will have the virtual network adapter either added or removed.
At the Status page, scroll down to the section labeled Network adapters and
click on the link.  e Network Adapter Properties page is now displayed.  is
page allows for the removal and addition of virtual network adapters. To add a

virtual network adapter, click on the button labeled Add Network Adapter and
to remove a virtual network adapter, click on the Remove check box above the
network adapter information of the network adapter to be removed, and then
click the OK button.
Creating a Dynamic or Static MAC Address
 ere is another property on the Network Adapter Properties page that off ers
some additional fl exibility—the Dynamic or Static MAC address option. To
Marshall_AU3931_C012.indd 213Marshall_AU3931_C012.indd 213 4/13/2006 1:38:03 PM4/13/2006 1:38:03 PM
214  Advanced Server Virtualization
confi gure a dynamic MAC address, click on the radio button next to the word
Dynamic. Dynamic is the default setting for all virtual network adapters in the
system. If a static MAC address is desired, click on the Static radio button and
type in the desired MAC address. It is important that the MAC address is entered
in the exact format as the sample MAC address displayed by default. If this is not
done correctly, the confi guration will cause an error to occur and prompt with
the correct format to use.  e dynamic MAC address format is six groupings of
two hexadecimal numbers separated by dashes, i.e.,
32-FF-A3-67-4B-DE.
When switching from a dynamic MAC address to a static
MAC address, make sure to actually click the radio button
next to static. All too often it is assumed that when entering
the MAC address in the static text fi eld, the software should
be intelligent enough to automatically select the static radio button. Un-
fortunately, this is not the case. If you type in a static MAC address but
forget to switch the radio button and then click OK, the virtual machine
confi guration fi le will not be updated with the new MAC address and it
will continue to use a dynamically assigned MAC address.
Resource Management
Resource management inside of Virtual Server 2005 is limited when compared
to VMware ESX Server; however the control over CPU resources is superior to

that of VMware GSX server. Microsoft employs a system of granular control
over the CPU resources consumed and reserved for virtual machines. Resource
management of CPUs is done through the Virtual Server Administration Web-
site, under the section titled Virtual Server and the link titled Resource Alloca-
tion.  is section provides three variables per virtual machine managed by the
system, they are:
1. Relative Weight
2. Reserved Capacity
3. Maximum Capacity
For a detailed look into what each of these do and how they eff ect virtual ma-
chines, please see chapter 10. It should be noted that to optimize the system,
all virtual machines should be given specifi c resource settings and there should
always be some capacity left for the host operating system.
Performance Optimization
 is section describes several recommended hardware, software, and confi gura-
tion optimizations that can be applied to Microsoft Virtual Server 2005 R2
Marshall_AU3931_C012.indd 214Marshall_AU3931_C012.indd 214 4/13/2006 1:38:03 PM4/13/2006 1:38:03 PM
Microsoft Virtual Server Advanced Topics  215
in order to enable optimum virtual machine performance. Although the rec-
ommendations presented here do not have to be used for virtual machines to
function, they should be used when deploying virtual machines in a production
environment.
File System
Microsoft Virtual Server 2005 R2 requires the NTFS fi le system on the host;
this is due to Virtual Server’s reliance on the fi le system level security for all of
the security aspects of Virtual Server.
Memory
Microsoft Virtual Server 2005 R2 should be given as much memory as possible.
 is holds true for the host operating system that the platform is operating on,
in addition to being able to provide the virtual machines with as much memory

as possible. It is important to realize that with each virtual machine that is add-
ed, there is an additional amount of memory used not only by the allocation of
reserved memory for the virtual machine, but for management overhead of the
Virtual Server application to manage that virtual machine.
 e actual amount of each virtual machine’s memory usage
can be calculated by taking the amount of memory allocated
to the virtual machine in Virtual Server and adding an ad-
ditional 32MB. As an example, if there is a virtual machine
with 1024MB of memory allocated inside Virtual Server, then the total
memory usage by that virtual machine will be 1024MB for the virtual
machine and 32MB for Virtual Server’s management overhead, totaling
1056MB of memory. Likewise, if there were ten virtual machines, each
assigned 1024MB of memory, then the total memory usage by virtual ma-
chines on that host server would be 10,560MB of memory. 10,240MB
of memory directly allocated to the virtual machine confi guration, and
another 320MB of memory allocated to Virtual Server management over-
head.
Processor
Another important performance optimization is to provide Virtual Server with
as much CPU compute power as possible.  is can be achieved by adding pro-
cessors, breaking up virtual machines into a balance of high utilization virtual
machines along with low utilization machines onto the same server and never
combining too many high utilization virtual machines on the same physical
host server. CPU cycles are a precious commodity on physical servers running
Marshall_AU3931_C012.indd 215Marshall_AU3931_C012.indd 215 4/13/2006 1:38:04 PM4/13/2006 1:38:04 PM
216  Advanced Server Virtualization
virtualization and must be carefully monitored to ensure peak performance. Vir-
tual Server itself should be given at least 15 percent of one of the CPUs on the
host server strictly for management and operating overhead.
Disk I/O

Virtual machine hard disk image fi les should reside on a physical disk drive on
the host server that is separate from the physical disk drive on which the host
server’s operating system and applications reside. A physical disk drive or stor-
age array that is dedicated to virtual machine hard disk image storage will pro-
vide increased performance. High performance disks, such as 10K RPM or 15K
RPM Ultra320 SCSI disks, should be used when possible for the highest levels
of disk I/O performance.
A common disk confi guration for physical host servers using local storage is
to confi gure a pair of 10K RPM Ultra320 SCSI disks on a single channel con-
nected to a high-performance RAID controller and confi gured into a RAID
1 array of mirrored disks on which the host server’s operating system and ap-
plication are installed (system disk). A separate set of three or more 15K RPM
Ultra320 SCSI disks are then confi gured into a RAID-5 striped parity array and
connected to the RAID controller on a separate channel than that of the system
disk.  e virtual machine hard disk image fi les (and any undo disk fi les) are
confi gured to reside on the RAID-5 array.
A Storage Area Network (SAN) based solution is a great way
of increasing disk I/O performance while keeping storage
management to a minimum.  e downside of a SAN is its
cost; a SAN is more costly in terms of capital expenditure
relative to local server storage. Other storage alternatives may prove to be
more cost eff ective; however, the scalability will more than likely not be
able to compete with that of a SAN.
Antivirus
If the host server has antivirus applications or clients installed, they should be
confi gured to run daily scans only. Real-time antivirus or spyware protection
will severely impact the host server’s performance. Additionally, virtual machine
confi guration fi les, virtual hard disk image fi les, undo disk fi les, fl oppy image
fi les, and ISO image fi les should be excluded fro the antivirus or spyware scans
to reduce performance bottlenecks.

Defragmenting Files
 e host server should generally not use the fi le defragmentation utility that
is provided with Windows operating systems in order to perform background
Marshall_AU3931_C012.indd 216Marshall_AU3931_C012.indd 216 4/13/2006 1:38:04 PM4/13/2006 1:38:04 PM
Microsoft Virtual Server Advanced Topics  217
fi le defragmenting. Although it is a good idea to have fi les arranged in contigu-
ous blocks on the hard disks, a robust, no intrusive solution should be used.
 e Microsoft-provided defragmentation utility can consume a large amount
of available disk I/O or processor resources that can adversely aff ect the operat-
ing of virtual machine hosted on the server.  ere are good third-party utili-
ties available that are optimized for production server environments that off er
a good balance between the resource needs of the server and the background
defragmentation utility.
Host Server Usage
 e physical host server on which Microsoft Virtual Server 2005 R2 is installed
should be dedicated to hosting virtual machines as a virtualization platform
server. It should not share its resources with other applications or processes. It is
not recommended to run Microsoft Virtual Server 2005 R2 and other applica-
tions including but not limited to a Windows domain controller, a fi le server, a
print server, Microsoft Exchange Server, Microsoft SQL Server, Microsoft ISA
Server, MOM, Microsoft SMS, IIS Web servers or application servers outside
of the Virtual Server Administration Website, FTP or NNTP services, other
Web or application servers such as Apache, Tomcat, WebLogic, WebSphere, or
other database servers such as MySQL, Oracle, Sybase, and others.  e virtual
machines generally require memory and processor resources that are in direct
confl ict with other applications running on the host server. In addition to dedi-
cating the host server to the virtualization platform, all unneeded services should
be uninstalled or stopped and disabled.
Performance Counters
When at least one virtual machine is running, the Virtual Machine’s performance

object is available under the Performance Logs and Alerts under Microsoft Win-
dows Server 2003 host operating system.  e Virtual Machine’s performance
object exposes two memory-oriented counters, Allocated MB and Allocated
Pages.  e Allocated MB counter displays the amount of memory currently
allocated to each virtual machine in units of megabytes (MB).  e Allocated
Pages counter displays the number of memory pages currently allocated to each
virtual machine. Each virtual machine instance can be monitored individually
or all instances can be monitored collectively.
Virtual Machine Confi guration
Virtual machine creation should be done by creating fi xed disks operating against
the Adaptec 7870 Virtual SCSI Controller. Fixed disks remove the overhead of
dynamically expanding disks as needed, but the trade-off is that the disks con-
sume their maximum storage capacity on the host server’s fi le system. Virtual
Marshall_AU3931_C012.indd 217Marshall_AU3931_C012.indd 217 4/13/2006 1:38:04 PM4/13/2006 1:38:04 PM
218  Advanced Server Virtualization
machines should not have any unnecessary media attached, nor should they
have more virtual networks attached than is necessary.
Virtual machines should (if at all possible) always have Virtual Machine Ad-
ditions installed and the version of Virtual Machine Additions should always
match the version of Microsoft Virtual Server that is running on the host server.
Not only do Virtual Machine Additions provide performance enhancements to
the guest operating system, but they also provide optimizations in the interface
between the virtual machine and VMM layer.
Virtual Server Management
A small increase in performance can be gained on a Microsoft Virtual Server
host by reducing the application overhead on the host operating system. When
installing Microsoft Virtual Server, the custom installation option can be used
to install only the Virtual Server Service while deselecting the Documentation
and Developer Resources, Virtual Machine Remote Control Client, and Virtual
Server Web Application. Additionally, if this minimal confi guration is used, the

host server will not require IIS to be installed.  is removes the management
components from the Virtual Server host.  e host must then be managed re-
motely by installing just the Virtual Server Web Application and Virtual Server
Remote Control Client on another computer and directing those applications
to the Virtual Server host.
Host Clustering
Microsoft Virtual Server 2005 R2 supports a new feature known as host clus-
tering.  is feature improves the availability of virtual machines running un-
der Microsoft Virtual Server 2005 R2 and provides additional benefi ts, such
as facilitating a no-downtime maintenance window for hardware or software
updates to the host server. Host Clustering improves the availability of virtual
machines by monitoring the state of the Microsoft Virtual Server 2005 R2 host
server nodes in a cluster and providing failover from one node to another dur-
ing a node failure.  e failover ensures that all of the virtual machines that were
running on the failed node are quickly brought back up on another node in
the cluster. It is important to understand that Host Clustering does not cluster
the virtual machines, instead it clusters the host servers providing the Microsoft
Virtual Server 2005 R2 virtualization platform itself, eliminating the platform
or a single host server from becoming a single-point of failure.
Host Clustering Requirements
Each node in a Host Cluster must meet the default installation requirements of
Microsoft Virtual Server 2005 R2 at a minimum. Additionally, Microsoft states
Marshall_AU3931_C012.indd 218Marshall_AU3931_C012.indd 218 4/13/2006 1:38:04 PM4/13/2006 1:38:04 PM
Microsoft Virtual Server Advanced Topics  219
that each node in the cluster must have identical hardware components includ-
ing processor make, model, and version. Each host server used as a node in the
cluster must meet all of the requirements of cluster computers listed in the Win-
dows Server Catalog (previously known as the Hardware Compatibility List).
Microsoft Virtual Server 2005 R2 Host Clustering leverages the Microsoft
Clustering services that are available by default in Microsoft Windows Server

2003. For each node in the cluster, the following host operating systems can be
used to support Host Clustering.
• Microsoft Windows Server 2003 with SP1 Enterprise Edition, 32-bit
• Microsoft Windows Server 2003 with SP1 Datacenter Edition, 32-bit
• Microsoft Windows Server 2003 R2 Enterprise Edition, 32-bit
• Microsoft Windows Server 2003 R2 Datacenter Edition, 32-bit
• Microsoft Windows Server 2003 x64 with SP1 Enterprise Edition, 64-bit
• Microsoft Windows Server 2003 x64 with SP1 Datacenter Edition, 64-
bit
• Microsoft Windows Server 2003 x64 R2 Enterprise Edition, 64-bit
• Microsoft Windows Server 2003 x64 R2 Datacenter Edition, 64-bit
Each node must have at least two network adapters installed. One network
adapter in each node must be dedicated to the private cluster network. If the
cluster is using iSCSI storage, this requirement is in addition to the network
adapter requirements of the iSCSI solution.  e network adapters used in the
private cluster network cannot be a part of a teamed network adapter solution.
 e cluster requires shared storage to which each node in the cluster is con-
nected.  e shared storage device must be a qualifi ed device listed in the Win-
dows Server Catalog.  e shared storage device may be a SCSI attached solution,
an iSCSI solution, or a Fibre Channel SAN solution. Each node in the cluster
will require connectivity to the shared storage device, which may also require
additional hardware such as network adapter or host bus adapters (HBAs).  e
shared storage device must be confi gured with a minimum of two volumes. One
volume is used as the quorum for the cluster.  e other volume is used to store
the fi les for the virtual machines running in the Host Cluster. If a single volume
is used to store the fi les for all virtual machines hosted in the cluster, all virtual
machine must failover as a single unit. If each virtual machine has its own vol-
ume confi gured on the shared storage device, the virtual machines can failover
as separate units.
Virtual machines that are hosted within a Host Cluster must have Virtual

Machine Additions installed and it must be the version of Virtual Machine Ad-
ditions that ships with Microsoft Virtual Server 2005 R2.
 e Microsoft-provided Havm.vbs script must be copied to each node of the
cluster.  e Havm.vbs (high availability virtual machine) script is confi gured
as a Generic Script resource in the cluster. It provides consistent functionality
to ensure that virtual machines hosted in the cluster failover correctly and also
restart virtual machines that stop running.
Marshall_AU3931_C012.indd 219Marshall_AU3931_C012.indd 219 4/13/2006 1:38:04 PM4/13/2006 1:38:04 PM
220  Advanced Server Virtualization
Requirements for iSCSI and Host Clustering
If iSCSI storage will be used with the Host Clustering solution, an additional
network adapter or iSCSI HBA will be required for each node in the cluster
in addition to the network adapter requirements listed in the previous section.
One network adapter in each node of the cluster must be dedicated to the iSCSI
storage network. Additionally, the Microsoft iSCSI initiator 2.0 or higher must
be used. At a minimum, the Microsoft iSCSI Initiator service must be installed,
even when using iSCSI HBAs. Gigabit network adapters or HBAs should be
used for the iSCSI connectivity at a minimum.
Additional Resources for Host Clustering
Microsoft off ers a great document, Virtual Server Host Clustering Step-by-Step
Guide for Virtual Server 2005 R2. It describes in great detail an entire Host Clus-
tering implementation along with the Havm.vbs script. Although the document
does not ship with the Microsoft Virtual Server 2005 R2 product, the document
can be downloaded in Microsoft Word format from Microsoft’s Web site.  e
URL is provided below and is also available on the book’s Web site, http://www.
vmbook.info/links.
Microsoft Virtual Server Home Page
/>Virtual Server Host Clustering Step-by-Step Guide for Virtual Server 2005
R2
/>Windows Server Catalog

/>iSCSI Support
Microsoft Virtual Server 2005 R2 supports remote storage using the iSCSI pro-
tocol when used with Microsoft Windows Server 2003 and the Microsoft iSCSI
Initiator. iSCSI provides the opportunity to create a centralized, remote storage
system that is much easier to deploy and manage than its Fibre Channel coun-
terpart, as well as generally being more cost eff ective. Aside from the benefi ts of
a centralized remote storage system, iSCSI also meets the storage needs required
by Host Clustering and virtual-to-virtual clustering across physical host server
boundaries (also called guest clustering).
iSCSI Requirements
iSCSI requires an additional network adapter or iSCSI host bus adapter (HBA)
to be installed in the host server that is dedicated to the iSCSI storage network.
Marshall_AU3931_C012.indd 220Marshall_AU3931_C012.indd 220 4/13/2006 1:38:04 PM4/13/2006 1:38:04 PM
Microsoft Virtual Server Advanced Topics  221
 is is referred to as the storage adapter. If the storage adapter is a network
adapter (as opposed to an iSCSI HBA, a multifunction offl oad device), it is
highly recommended that a gigabit adapter or better is used.  e storage adapter
is always completely dedicated to the remote storage network and cannot be
used for normal client-server network communication.  e host server should
have at least two other network adapters aside from the storage adapter to handle
client-server network traffi c for the host server itself and another to be dedicated
for virtual machine network traffi c.
 e Microsoft iSCSI Initiator 2.0 or later must be used. If the storage adapter
is an iSCSI HBA, just the Microsoft iSCSI Initiator service must be installed.
iSCSI is designed to be connected to an Ethernet storage network. It is pos-
sible to connect Fibre Channel sourced LUNs to an iSCSI storage adapter, but
this requires additional iSCSI-to-Fibre Channel bridge hardware and software
that is outside the scope of this book.
Additional iSCSI Resources
For more in-depth technical details of iSCSI and the confi guration of iSCSI with

Microsoft Virtual 2005 R2, Microsoft has published a Word document titled
Using iSCSI with Virtual Server 2005 R2. It discusses the usage and confi gura-
tion of iSCSI for guest and host clustering as well as providing a good technical
foundation for the technology in terms of Virtual Server. Other technologies
are also discussed including the Microsoft iSCSI Initiator and Microsoft iSNS
(Internet Storage Name Service).  e URL is provided below and can also be
found on this volume’s Web site, o/links.
Using iSCSI with Virtual Server 2005 R2
/>Microsoft iSCSI Software Initiator 2.0
/>Microsoft iSNS Server
/>Microsoft Storage Technologies – iSCSI
/>Unattended Installation
Microsoft Virtual Server 2005 R2 supports the ability to be installed from a com-
mand-line interface. Using the features of the command-line interface installa-
tion, an unattended installation of Microsoft Virtual Server can be achieved.  e
Microsoft Virtual Server 2005 R2 installer ships as a Setup.exe fi le. Packaged
inside the Setup.exe fi le is an MSI installer fi le (a .msi fi le).  e command-line
installation is performed using the .msi fi le, but its parameters can also be passed
Marshall_AU3931_C012.indd 221Marshall_AU3931_C012.indd 221 4/13/2006 1:38:04 PM4/13/2006 1:38:04 PM
222  Advanced Server Virtualization
to the Setup.exe fi le as well. If desired, the .msi installer fi le can be extracted
from the Setup.exe fi le and used directly.  roughout this section, the Setup.exe
installer fi le will be assumed to be named Setup.exe in the fi le system.
Extracting the MSI File
 e process of extracting the .msi installer fi le from the Setup.exe fi le is simple.
From a Windows command-prompt, execute the following command:
Setup.exe /c /t C:\Temp
 e command assumes that the Microsoft Virtual Server 2005 R2 installer
fi le, Setup.exe, resides in the current directory. It extracts the .msi installer fi le
into the C:\Temp directory.  e drive letter and path to the destination di-

rectory may be changed as necessary.  e result is that a fi le named “Virtual
Server 2005 Install.msi” is extracted from the Setup.exe fi le and is placed into
the destination directory, C:\Temp. After the execution of the command in this
example, a new fi le, C:\Temp\ Virtual Server 2005 Install.msi, now exists.  is
is the .msi fi le that is referred to throughout the Unattended Installation section
of this chapter.
Command-Line Installation Approaches
To perform an unattended installation of Microsoft Virtual Server 2005 R2,
the command-line installation is used.  ere are two methods that can be used
to install from the command-line.  e primary method is to use the well-
documented MSI approach with the .msi that is extracted from the Setup.exe
fi le (see Extracting the MSI File above).  e second approach is to perform the
command-line installation using the Setup.exe fi le directly, passing it the options
that are used with the fi rst approach. Since the two methods do not really diff er
in their core implementations, the .msi fi le approach will be described in detail
and can be applied to the second approach.
Windows installer Details
 e primary method of installing Microsoft Virtual Server 2005 R2 from the
command line uses Windows Installer technologies along with the .msi fi le that
is extracted from the Microsoft Virtual Server 2005 R2 Setup.exe fi le.  e .msi
fi le is a Windows Installer package. Windows Installer is used to install the prod-
uct from the command-line using the executable Windows Installer fi le named
msiexec.exe.  e basic command used to perform an unattended installation is:
msiexec.exe /i “Virtual Server 2005 Install.msi”
PIDKEY=<PIDKEY> /qn
Marshall_AU3931_C012.indd 222Marshall_AU3931_C012.indd 222 4/13/2006 1:38:05 PM4/13/2006 1:38:05 PM
Microsoft Virtual Server Advanced Topics  223
 e /i switch tells msiexec.exe to install the package specifi ed by the string,
“Virtual Server 2005 Install.msi,” which is the fi le name of the .msi fi le that
is extracted from the Setup.exe fi le.  e PIDKEY=<PIDKEY> argument tells

msiexec.exe that the product key number to use for the installation is <PID-
KEY>.  e token, <PIDKEY>, should be replaced with the actual product key
for Microsoft Virtual Server 2005 R2.  e /qn switch is used to tell msiexec.exe
to use no user interface.  e installer will run fully unattended without prompt-
ing for any user input.
 ere are several other options that can be used with msiexec.exe to custom-
ize the installation from the command-line.
• SERVICESSTARTUPMANUAL=<value>
If <value> is set to 1, the Virtual Server service startup value will be set to
manual.  e default value is 0 for a service startup value of automatic.
• WEBSITEDEFAULTPORT=<value>
Specifi es the TCP port number to be used for the Administration Web-
site.
• INSTALLDIR=<value>
Specifi es the directory under which the product will be installed.  e de-
fault location is the “Program Files” directory.
For more details and additional installation options, please refer to the Vir-
tual Server Administrator’s Guide that is installed with the product.
To perform an installation from command-line without having to extract the
.msi fi le, the following command can be used:
Setup.exe /v” PIDKEY=<PIDKEY> /qn”
 e string specifi ed in the double-quotes following the /v switch in the com-
mand above is passed to the encapsulated .msi fi le.
When specifying the value of <PIDKEY> using your valid
product key, you must remove the dashes from the string.
Product keys for Microsoft Virtual Server 2005 R2 use the
format, AAAAA-BBBBB-CCCCC-DDDDD-EEEEE.  e
value passed into either version of the command-line installer must not
have the minus characters, such as AAAAABBBBBCCCCCDDDDDEE
EEE. Otherwise, the installation will fail.

 e results for an unattended installation can be obtained from the Windows
Application Event Log using the Event Viewer MMC snap-in usually found
under the Administrative Tools program group.  e Source column in Event
Viewer will be listed as MsiInstaller. If the installation succeeds, the event type
will be information and the description will contain text such as, “Product:
Marshall_AU3931_C012.indd 223Marshall_AU3931_C012.indd 223 4/13/2006 1:38:05 PM4/13/2006 1:38:05 PM
224  Advanced Server Virtualization
Micro soft Virtual Server 2005 R2 — Installation completed successfully.” If the
installation fails, the event type will be error and the description will contain text
about the reason for the failure such as, “Product: Microsoft Virtual Server 2005
R2 —  e Product Key is invalid.”
 e command for an unattended installation can be placed inside a batch fi le
to simply reuse. Additionally, the .msi installer package can be customized into
a Windows Installer transforms package (a .mst fi le) that can be used to encap-
sulate common options within the installation package. For more information,
search the Microsoft Web site at for Merges and
Transforms subset of the Windows Installer section of the Microsoft Platform
SDK.
Upgrading to R2
Microsoft Virtual Server 2005 has an in-place upgrade path from the original
Microsoft Virtual Server 2005 RTM release to the current Microsoft Virtual
Server 2005 R2 release. An in-place upgrade can only be performed on full
product versions of Microsoft Virtual Server 2005. Beta, release candidate, and
trial versions are not supported for in-place upgrades. In order to upgrade from a
beta, release candidate, or trial version, the existing product must be uninstalled
and the new version can then be installed afterwards. In-place upgrades do not
require the existing product to be uninstalled; however the upgrade process does
diff er slightly from the usual installation procedures.
Before attempting to perform and in-place upgrade or an uninstall/reinstall
upgrade, it is important to fi rst shut down, power off , and back up all virtual

machines, including all virtual machines in a suspended state, before attempting
to upgrade the host server. Aside from just the virtual machine disk image fi les,
all other MSVS fi les should be backed up as well, including the Virtual Server
confi guration fi le, all virtual machine confi guration fi les, all virtual network
confi guration fi les, and any undo disk fi les.  e default locations that should be
backed up are listed below.
• <AllUsers>\Application Data\Microsoft\Virtual Server\Options.xml
• <AllUsers>\Application Data\Microsoft\Virtual Server\Virtual Machines\*
• <AllUsers>\Application Data\Microsoft\Virtual Server\Virtual Networks\*
• <AllUsers>\Application Data\Microsoft\Virtual Server Webapp\*
• <AllUsers>\Documents\Shared Virtual Machines\*
• <AllUsers>\Documents\Shared Virtual Networks\*
 e token, <AllUsers> used in the list above represents the path to the special
folder for documents and setting for all users. By default, this path is C:\Docu-
ments and Settings\All Users, although it may vary from system to system.
Virtual machine fi les including virtual machine confi guration fi les, hard disk
image fi les, and undo disk fi les may also be located in other directories depend-
Marshall_AU3931_C012.indd 224Marshall_AU3931_C012.indd 224 4/13/2006 1:38:05 PM4/13/2006 1:38:05 PM
Microsoft Virtual Server Advanced Topics  225
ing on each system’s confi guration.  ese fi les also need to be backed up before
upgrading the host server.
 e Virtual Server service and the Virtual Machine Helper service must be
stopped before upgrading the host server.  is can be done from command-line
using the NET STOP command or from the services.msc MMC snap-in usually
located under Administrative Tools in the Windows Start menu.
Before upgrading the host server, it is recommended to perform a Windows
update on the host server, updating the service pack level and installing any criti-
cal security updates.
Once the host server is ready to be upgraded in-place, the normal installation
process for installing Microsoft Virtual Server 2005 R2 on a single computer is

used to perform the upgrade.  is process is discussed in chapter 9.
After the in-place upgrade installation process has been completed on the host
server, Virtual Machine Additions must be reinstalled into the guest operating
system of each virtual machine. Once all virtual machines have been upgraded,
the in-place upgrade is complete.
Summary
Microsoft Virtual Server 2005 R2 has many important advanced features and
considerations regarding confi guration, management, and performance op-
timizations. By understanding these advanced topics, better performance and
stability for both host and guest operating systems can be achieved. Proper con-
fi guration must include Virtual Machine Additions, as it provides critical perfor-
mance enhancements. Selecting the proper virtual hard disk controller, disk type,
and disk mode are very important if proper manageability and acceptable disk
I/O are going to be realized. Virtual hard disk type conversions can be incred-
ibly useful when trying to manage large numbers of virtual machines on hosts
that have limited amounts of hard disk space. Virtual networks and switches
provide powerful confi guration options when deciding how virtual machines
should communicate with each other, the host server, and the external network.
Microsoft Virtual Server 2005 R2 supports administrator-friendly unattended
installations that can ease the deployment of host servers.  e host clustering
features allow Microsoft Virtual Server 2005 R2 to run highly available produc-
tion systems without the need for a large investment in third-party, proprietary
failover solutions. Coupled with Microsoft Windows Server 2003 R2, Microsoft
Virtual Server 2005 R2 provides a very stable virtualization platform on which
to host enterprise-class virtual servers.
Marshall_AU3931_C012.indd 225Marshall_AU3931_C012.indd 225 4/13/2006 1:38:05 PM4/13/2006 1:38:05 PM
Marshall_AU3931_C012.indd 226Marshall_AU3931_C012.indd 226 4/13/2006 1:38:05 PM4/13/2006 1:38:05 PM
Part IV
Implementing VMware
ESX Server

Marshall_AU3931_P004.indd 227Marshall_AU3931_P004.indd 227 3/31/2006 3:06:16 PM3/31/2006 3:06:16 PM
Marshall_AU3931_P004.indd 228Marshall_AU3931_P004.indd 228 3/31/2006 3:06:23 PM3/31/2006 3:06:23 PM
229
Chapter 13
The VMware ESX Server
Platform
VMware ESX Server is undoubtedly the most widely deployed and most stable
server virtualization platform. Designed for production use, enterprise-class
server virtualization, VMware ESX Server provides a feature rich virtualization
platform while having the smallest possible overhead due to its hypervisor de-
sign.  is chapter covers the platform’s background, deployment planning re-
quirements, and overviews platform-specifi c features.
Product Background
VMware’s ESX Server was released in March of 2001.  e release followed VM-
ware GSX Server and VMware Workstation. VMware GSX Server was devel-
oped to be a workgroup class solution, providing simple administration on a
familiar host platform; however performance was lost due to the host platform
overhead. During early prerelease versions of VMware ESX Server, it was neces-
sary to install a copy of Red Hat Linux fi rst, then after completing the install, the
kernel would have to be replaced with a custom kernel written by VMware.
ESX Server is a hypervisor-based virtualization platform. A hypervisor pro-
vides the most effi cient use of resources in a virtualization platform because it
does not reply upon a host operating system and can minimize the resource
overhead. VMware’s decision to build an incredibly lightweight bare metal op-
erating system was a simple one. VMware wanted to create an enterprise class
virtualization platform and realized early on that to be successful, performance
and granularity of resource control would be critical components. In May of
2002, VMware released ESX Server 1.5 providing support for uniprocessor
Marshall_AU3931_C013.indd 229Marshall_AU3931_C013.indd 229 4/13/2006 1:38:41 PM4/13/2006 1:38:41 PM
230  Advanced Server Virtualization

virtual machines, tight SAN integration, and advanced resource controls. In
July of 2003 VMware announced ESX Server 2.0, which provided support for
up to two processors with the VMware Virtual SMP add-on product. Virtual
SMP is supported only by ESX Server 2.x and above. In the second half of 2005,
VMware will likely introduce four-way Virtual SMP support. Multiprocessing
support is critical for enterprises wanting to use virtual machines on high utiliza-
tion production class systems.
ESX Server hosts virtual machines running a broad range of operating sys-
tems. To achieve such wide support, ESX Server emulates a generic virtual
hardware platform. Each virtual machine leverages its own virtual hardware
consisting of a single or dual-processor system with an Intel 440BX mother-
board including an NS338 SIO (Serial Input Output) chip and fi ve virtual PCI
slots. A Phoenix Bios 4.0 Release 6 acts as the BIOS for the system. Depending
on the host server’s capacity, up to 3.6 GB of memory can be given to a single
virtual machine. Each virtual machine also has a virtual SVGA graphics card, up
to four virtual SCSI controllers supporting fi fteen devices per controller, up to
two virtual 1.44 MB fl oppy drives, up to four virtual CD/DVD-ROM drives,
two serial ports, one parallel port, and up to four virtual network adapters.  e
total number of virtual SCSI controllers and network adapters together cannot
exceed fi ve devices because each virtual machine is limited to fi ve virtual PCI
slots. As discussed later in the chapter, there are specifi c restrictions as to which
physical hardware devices are supported by ESX Server.
A primarily remote management paradigm is used by ESX Server.  ere is a
minimal console provided for manipulation of disk fi les, installing server pack-
ages and updates, and manipulating specifi c settings.  e remote management
interface provides the ability to create, monitor, stop, start, reboot and suspend
virtual machines. It also provides integration for the VMware Remote Console
(VMRC) application, allowing direct virtual machine console access. Both the
remote management interface and the VMRC application are run from a work-
station (client) desktop.  is provides an easy to use system for controlling and

accessing virtual machines during the administration process. Both the Web
interface and the VMRC support the use secure connections via SSL. In addi-
tion to the remote management and VMRC interfaces, VMware also provides a
scripting API to automate ESX Server management tasks.
Today VMware has the most powerful and mature platform available in the
enterprise virtualization space.  is was accomplished by focusing on perfor-
mance and function above all else. With each release of ESX Server, more and
more enterprises are making the decision to move to virtualization in their pro-
duction environments. VMware is steadily gaining traction in the mission criti-
cal and production enterprise data center space by providing a low-overhead,
high-performance solution.
Marshall_AU3931_C013.indd 230Marshall_AU3931_C013.indd 230 4/13/2006 1:38:43 PM4/13/2006 1:38:43 PM

×