I know this is slightly off topic, but Windows Server User Assistance has a number of openings for technical writers, and if we fill the positions, I'll have more time to write in this blog. To qualify, you need to have a strong background and preferably hands-on experience in IT, in addition to excellent writing skills. The positions are all located in Redmond. For more information, go to the Career Center on the Microsoft Web site.
Using virtual machines for software development, software testing, and patch testing is really catching on at Microsoft – and for good reason:
Here are some tips for testers and developers:
You probably already know that Virtual Server provides a complete set of COM interfaces for programmatic management (see Start > All Programs > Microsoft Virtual Server > Virtual Server Programmer's Guide). But did you know about the Virtual Server script repository on TechNet? It contains sample scripts for tasks such as managing virtual hard disks, configuring Virtual Server and virtual machines, configuring security, and managing virtual networks.You can find the repository at http://www.microsoft.com/technet/scriptcenter/scripts/vs/default.mspx.
Here's what Kurt Schmucker, the program manager for Virtual Server 2005 Service Pack 1 says about the release:
"As with typical service packs from Microsoft, Virtual Server 2005 Service Pack 1 will be primarily a rollup of fixes we have seen since the product was released to improve performance and increase scalability. In addition, with Service Pack 1, Virtual Server 2005 will have host support for Windows Server 2003 Service Pack 1 x64 Edition (note that this does not include IA64), provide PXE support, qualify Windows XP SP2 as a host and as a guest, and include the Virtual Disk Precompactor, a utility that is designed to "zero out" — that is, overwrite with zeros — any available blank space on a virtual hard disk. A public beta is slated for the end of first quarter 2005, with product release planned for the second half of calendar year 2005."
You can attach each virtual machine running under the same instance of Virtual Server to a separate physical network and also isolate the virtual machine network traffic from the host, as follows:
To bind or unbind the Virtual Machine Network Service from a NIC:
Note: You can isolate virtual machine network traffic from the host at any time by unbinding Virtual Machine Network Services from the NIC used by the host. For more information about network isolation, see "Virtual network architecture" in the Virtual Server 2005 Administrator's Guide.
For general information about configuring networks for virtual machines, see "Accessing virtual networks from a virtual machine" and "Creating a virtual network" in the Virtual Server 2005 Administrator's Guide.
HP is delivering a live Webinar on January 14, 2005 on Virtual Machine Management. Here's the description from HP: "Learn the advantages of virtual machine technology and understand how the Virtual Machine Management Pack allows you to manage and control the VMWare and Microsoft Virtual Server resources in your environment." To register, go to http://www.hpbroadband.com/program.cfm?key=Q91MTB88Y.
John Howard has posted a series of blogcasts (e.g., video clips published on a blog) that walk you through the process of using VSMT to migrate a Windows NT 4.0 server into a virtual machine running under Virtual Server 2005. You can find them on his blog at http://blogs.msdn.com/jhoward. The first blogcast of the series is at http://blogs.msdn.com/jhoward/archive/2005/01/04/346147.aspx.
Great job, John. Thanks!
Although there are high-level instructions on performing a migration in the VSMT whitepaper (http://www.microsoft.com/windowsserversystem/virtualserver/overview/vsmtwhitepaper.mspx), if you're going to do a serious migration, you need to follow the detailed documentation in the "Virtual Server 2005 Migration Toolkit User's Guide." You'll find it at %ProgramFiles%\Microsoft VSMT\Help\VSMT.chm. This documentation will get you reliably from here to there, and if you have problems, the issue is very likely covered in the Troubleshooting topic. If it isn't, please let me know.
Also, for some guidance with planning a migration and capacity planning, be sure to read the "Solution Accelerator for Consolidating and Migrating LOB Applications," available at http://www.microsoft.com/technet/itsolutions/ucs/lob/lobsa/default.mspx.
I just listened in on a conference call between Ben Armstrong (http://blogs.msdn.com/Virtual_PC_Guy) and Barbara, an IT manager who’s considering deploying Virtual Server in her enterprise. I thought you all might be interested in the questions and answers, so decided to post my notes as an article. You'll find them in the Deployment section at http://blogs.technet.com/megand/articles/344558.aspx.
Now I'm off to the fabulous Methow Valley for four days of cross-country skiing. See you all next week.
Happy New Year!Megan
I just listened in on a conference call between Ben Armstrong (http://blogs.msdn.com/Virtual_PC_Guy) and Barbara, an IT manager who’s considering deploying Virtual Server in her enterprise. I thought you all might be interested in the questions and answers, so here are my notes:
Barbara: What’s the difference between the standard and enterprise editions of Virtual Server 2005?
Ben: CPU support. Standard supports up to four processors. Enterprise five plus. There are no other differences.
Barbara. Is there a rule of thumb for selecting server candidates for virtualization?
Ben: You need to look at the current load and availability of the server. Virtualization creates some overhead, so you’re not going to get the same performance from a virtualized server as from a physical one. The best candidates for virtualization are underutilized servers and servers running on older hardware. Many of our customers are also virtualizing infrastructure servers, such as domain controllers and DNS servers, which have a light load but need to run on a dedicated system. The Active Directory team has been great about working with us on this and has posted some prescriptive guidance for deploying domain controllers, including performance issues (http://www.microsoft.com/downloads/details.aspx?FamilyId=64DB845D-F7A3-4209-8ED2-E261A117FC6B&displaylang=en).
Barbara: What should we be monitoring on our existing servers to help us with capacity planning?
Ben: There is little memory overhead with virtual machines. You should allow the same amount of memory for your virtual machines as you did for the physical servers, plus a small buffer. More important is CPU and hard disk usage. One issue is disk contention. If you store VHD files on the same physical disk, and the workloads of the virtualized servers entail a lot of disk I/O, you can end up with contention.
Barbara: What about special hardware, such as CD-ROM towers?
Ben: This is a gray area. If you have a specialized PCI card, you can’t plug it into the virtual machine. But you can still make use of it if the card is supported by Windows Server 2003 and exposes services that Virtual Server can use. For example, you can configure the CD-ROM tower on the host, mount the CDs on your virtual machines, and then share them via the host operating system. Another example is that you can install a SCSI card on the host computer, attach hard drives to it, and store your VHDs on them.
Barbara: How does IP addressing work with DNS?
Ben: We create a unique MAC address for every virtual machine. External servers cannot tell it’s a virtual machine. Networking just works. In terms of network topology, we create a virtual switch and bridge the virtual machines to the outside world.
Baraba: Do all virtual machines access the same NIC? Wouldn’t this create a bottleneck?
Ben: Virtual machines can each have up to four virtual NICs. You can connect each virtual NIC to a physical NIC. If you have multiple virtual machines on the same NIC, Virtual Server divides the bandwidth among them. If you need more bandwidth, simply add more physical NICs and attach your virtual machines to them. Doing this is like connecting a network cable.
Barbara: How do you assign resources?
Ben: There are four areas of resource allocation:
Barbara: What if you attach the host to a SAN?
Ben: You can use SAN storage for VHDs. This gives a performance advantage. The virtual machines won’t know they’re on a SAN. You can assign a physical disk to a physical computer. If you have two or more VHDs attached to a virtual machine – one for the operating system and the others for data – you can put all of the VHDs on the SAN. The virtual machine will then boot from the SAN, which is faster.
Barbara: If we have, say two redundant HBA cards attached to the SAN, all the virtual machines would go through those cards. Wouldn’t this be a bottleneck?
Ben: Yes, that could be a bottleneck, but we have a lot of customers doing this, and haven’t heard any complaints about performance so far.
Barbara: What about storage on the host computer?
Ben: If your VHDs are stroed on a SAN, the host computer doesn’t need much storage space. Virtual Server doesn’t require much disk space.
Barbara: So you’d set up your NICs and HBAs, then you load your virtual machines.
Ben: Right. Virtual Server goes through Windows for disk access. As long as the host operating system can present a drive, virtual machines can use it.
Barbara: What about clustering?
Ben: The solutions are complex, and we’re studying a number of different ones at this time. If you are clustering two physical servers, you only get protection if the entire server goes down. So we’re looking at using iSCSI for clustering virtual machines rather than hosts. If a single virtual machine goes down, then another host can pick it up.
Barbara: What about backups?
Ben: There are two ways to back up virtual machines. Virtual Server is like SQL or Exchange in that if you take an active backup, the files may be corrupt. So you can:
Barbara: How often do you need to cold-boot the host computer?
Ben: We’ve done extensive testing, and Virtual Server can run continuously for several months without a reboot. You only need to reboot when you install security patches. Because rebooting impacts the virtual machines, we recommend using a dedicated host computer to run Virtual Server that isn’t running any other applications. This will minimize reboots required by other applications.
Barbara: Do you have performance issues with Linux guests?
Ben: Linux isn’t an officially supported operating system. It runs, but we don’t have performance data on it. Some customers have reported, however, that they get fine performance.
Barbara: How do you create images of guest operating systems?
Ben: While you can use standard imaging tools with virtual machines, and they’ll work just fine, you don’t need to. You simply set up the guest operating system environment the way you want it (OS, version, language, applications, etc), run Sysprep, shut down the virtual machine, and then copy the VHD file. You create a new virtual machine specifying the copied VHD. When you start the virtual machine, it runs mini setup and assigns a unique name and SID. [It also gets a unique IP and MAC address.]
Barbara: Are there tools that will help us figure out which servers are good candidates for virtualization?
Ben: We’re working with partners on ways to measure utilization. Platespin has been doing a lot of work in this area. Microsoft is developing more prescriptive guidance, too. [For now we have the Solution Accelerator for Consolidating and Migrating LOB Applications, available at http://go.microsoft.com/fwlink/?LinkID=31616.]
Barbara: What about tools that gather usage information on virtual machines?
Ben: Tools that work on physical machines will work on virtual machines, although most of them don’t distinguish between virtual machines and physical machines. Many companies that offer management tools are adding this support. Virtual Server also provides performance counters on running virtual machines. Look at the host statistics. You can get a graph of virtual machine CPU usage versus host CPU usage.
Barbara: What’s a standard setup for Virtual Server and Virtual machines in terms of processor and memory?
Ben: What we see the majority of the time is a machine that has either 2-way or 4-way processors, 4 to 10 GB RAM, and 2 to 4 virtual machines per processor.
Barbara: What type of workload do you recommend?
Ben: Although there is a high demand for running SQL Server in virtual machines, we don’t recommend doing this in a production environment for performance reasons. Your best workloads are low usage and periodic usage applications.
Virtual Server sometimes takes issue with Broadcom NICs. If you're experiencing any connectivity problems, and you're using a Broadcom NIC, turn off the Offload TCP Segmentation, Checksum Offload, and Large Send Offload settings for the NIC, as follows (all of these settings may not be available):
The computer will restart.
Note: When you change network adapter properties, the virtual machines attached to that adapter may loose their network connections. To restore the network connections, you must disconnect the affected virtual machines from the virtual network adapter that is attached to that physical network adapter and then reconnect them to it, as follows:
If this doesn't restore connectivity, then you'll need to restart the host computer.
On Friday, January 07, 2005 11:30 AM (GMT-08:00) Pacific Time (US & Canada), Kevin Remde, a Technet presenter, will discuss ways you can upgrade your existing NT 4 applications. As Windows NT 4.0 Server comes to the end of its supported life, many organizations still have vital line of business (LOB) applications that run on this platform. Kevin provides details on the different tools that Microsoft provides for moving these applications to a newer platform, including Virtual Server 2005. To register, go to http://msevents.microsoft.com/CUI/WebCastEventDetails.aspx?EventID=1032266390.
Compacting your dynamically expanding virtual hard disks (VHDs) reduces the amount of disk space they use. Preparing a disk and compacting it is covered in the Virtual Server 2005 Administrator’s Guide, so I won’t go into it here. What’s new is this: you used to have to use a third-party tool to zero out available blank space on the VHD before compacting it. Now you can use a tool that's included with Virtual PC 2004 SP1 -- the Virtual Disk Precompactor.
If you have Virtual PC 2004, you can simply install SP1 to get this utility.* Otherwise, you’ll need to download the trial version of Virtual PC 2004, and then install SP1. (If you try to install it on your Windows Server 2003 machine, you'll get a warning that it isn't a supported OS. You can ignore the warning.)
To use Virtual Disk Precompactor, you must first capture Virtual Disk Precompactor.iso, which is installed with Virtual PC 2004 SP1. For instructions on capturing media, see "Add or remove a CD or DVD drive" in the Virtual Server 2005 Administrator's Guide. Virtual Disk Precompactor.iso is located in %ProgramFiles%\Microsoft Virtual PC\Virtual Machine Additions\.
After you capture Virtual Disk Precompactor.iso, you can run Virtual Disk Precompactor from the command line by navigating to the CD drive of the virtual machine and typing Precompact. The available parameters are:
-Help - Displays help for the precompactor.
-Silent - Runs the precompactor in unattended mode.
-SetDisks - Specifies the disks to be precompacted. If this parameter isn't specified, then all virtual hard disks for this virtual machine are compacted.
Example: Precompact -Silent -SetDisks:CDE
Note that you can only compact dynamically expanding virtual hard disks. To compact fixed-size VHDs, you can convert them to dynamically expanding VHDs, compact them, and then convert them back to fixed size.
* As announced in my posting of January 12, 2005 (http://blogs.msdn.com/megand/archive/2005/01/12/351756.aspx), this tool also will be available in Virtual Server 2005 Service Pack 1.
This article tells you how to set up a self-contained domain on a single computer under Virtual Server. Ed Reed, a virtualization developer here at Microsoft helped me out with it. Thanks Ed!
Although you can set up a production domain controller on Virtual Server with lots of caveats (see Notes), the best reason to deploy a “domain in a box” is for development and testing purposes. For example, you might want to validate architecture or perform unit testing. For other types of testing, such as network analysis, function testing, capacity planning and resource utilization, you’d probably want to replicate the domain infrastructure in a test lab with multiple physical servers, rather than using the “domain in a box” configuration described in this article.
To set up a domain in a box, you create and configure virtual machines running one or more domain controllers to reproduce the domain configuration that you want to test. You’ll probably want to create at least one virtual machine as a domain member as well. It isn’t a good idea to use the host operating system as a domain member because the domain controller must be available for the domain member to log onto the network. This would create a “chicken and egg” problem following a restart of the host computer.
To configure networking, connect each virtual machine in the domain, including the domain controllers, to the “Internal” virtual network. This will isolate the network communication between the virtual machines to the internal virtual network on the host. You’ll also need to either assign static IP addresses to the virtual machines or else set up the DHCP server on the domain controller (not the virtual DHCP server provided by Virtual Server).
The obvious way to test a domain configuration is to create a set of base VHDs and then enable differencing or undo disks before making the configuration changes that you want to test. Using differencing or undo disks with a domain controller, however, isn’t supported. The problem is that the base VHDs can become out of date and thus will be tombstoned. This happens when domain replication data is discarded when you discard the differencing or undo disk. To avoid this problem, let the domain controller(s) run when you’re not running a test so that they periodically replicate and never go beyond 180 days between replications. (Keep in mind that even if you do this, Microsoft Product Support won’t support using differencing and undo disks with a domain controller.)
Notes:
Here's a question for all of you from the Windows Server User Assistance team.
For the first time, with the Virtual Server 2005 documentation, we've made a Getting Started Guide available from the Start menu (Start > All Programs > Microsoft Virtual Server > Getting Started Guide). Usually Getting Started Guides are available only in the box. Question: Have you looked at the online Getting Started Guide, and do you like having it available from the Start menu?
Please send your reply to: wscgw2k3@microsoft.com. This is the feedback mailbox for the Windows Server User Assistance team. Also, if you have other feedback concerning the documentation for Virtual Server, Virtual PC, or Windows Server 2003, you can send it to the same e-mail address.
Thanks for your help!
[Updated on 1/6/05.]
Virtual Server 2005 Migration Toolkit (VSMT) doesn't support migrating a dynamic physical disk to a virtual hard disk (VHD). One option for dealing with this is to convert a dynamic disk to a basic disk and then perform the migration. This isn't very practical for a migration, though, because you have to remove all of the data from the dynamic disk before you can convert it back to a basic disk. For more information, see the disk management documentation for your operating system.
Alternatively, you can skip a dynamic physical disk during migration by using the /ExcludeDrives parameter of VMScript. Then, if it contains only data and no operating system, you can manually migrate the disk. Robert Larson suggests using one of the following two methods for a performing manual migration (Thanks Robert!):
Method A
Method B
If your dynamic disk contains a system partition, your options are as follows:
The option that you DO NOT have is converting the dynamic disk to a basic disk if it contains a system volume, as you can only convert dynamic disks to basic disks when there is absolutely no data, including any system files, on the disk.
David B. asks, "I've been looking to see if Virtual Server 2005 and iSCSI will work together - any idea on this?"
Jeff Woolsey responds, "People have reported success using the Microsoft iSCSI client in a guest operating system. This scenario is not yet supported, although it's under investigation."
So David, the product team is doing a lot testing in this area, and assuming it ends up being supported, I'll write about using iSCSI with virtual machines, such as for failover clustering of virtual machines on different hosts. Meanwhile, if you decide to try it out yourself, be aware that you'll be on your own because Microsoft Product Support doesn't yet support this scenario.
I've just added an article contributed by Jeff Woolsey, Virtual Server Program Manager, to the "Deployment" category (http://blogs.technet.com/megand/articles/274783.aspx) that describes how to increase the speed of an operating system installation when you're using emulated SCSI disks.
This article is contributed by Jeff Woolsey, our Virtual Server 2005 Program Manager. Thanks Jeff!
To increase the performance of the OS install (F6 option) when using emulated SCSI disks you can create a diskette to load the faster SCSI drivers that are included with the Virtual Machine Additions.
To create the disk:
1. From the Virtual Server Web Administration application, create a Virtual Floppy Disk (.vfd). 2. Attach the .vfd to a running virtual machine with a CD-ROM drive.3. Attach the Virtual Machine Additions ISO to the virtual machine listed in the previous step.4. In the running virtual machine, navigate to the floppy drive5. Create a new file called TXTSETUP.OEM and copy and paste the following contents:
[Disks]
d1 = "Microsoft VM Accelerated Additions Driver Disk", \msvmscsi, \d2 = "Microsoft VM Accelerated Additions Driver Disk (NT4)", \msvmscsi, \nt4d3 = "Microsoft VM Accelerated Additions Driver Disk (Windows 2000)", \msvmscsi, \Win2000d4 = "Microsoft VM Accelerated Additions Driver Disk (Windows XP)", \msvmscsi, \WinXPd5 = "Microsoft VM Accelerated Additions Driver Disk (Windows Server 2003)", \msvmscsi, \Win2003
[Defaults]
scsi = MSVMSCSI_2003
[scsi]MSVMSCSI_2003 = "(Windows Server 2003) Additions Accelerated SCSI Driver", msvmscsiMSVMSCSI_2000 = "(Windows 2000) Additions Accelerated SCSI Driver", msvmscsiMSVMSCSI_XP = "(Windows XP) Additions Accelerated SCSI Driver", msvmscsiMSVMSCSI_NT = "(nt4) Additions Accelerated SCSI Driver", msvmscsi
[Files.scsi.MSVMSCSI_NT ]driver = d2, msvmscsi.sys, msvmscsiinf = d2, msvmscsi.infcatalog = d2, vmadd_msvmscsi_sys.cat
[Files.scsi.MSVMSCSI_2000 ]driver = d3, msvmscsi.sys, msvmscsiinf = d3, msvmscsi.infcatalog = d3, vmadd_msvmscsi_sys.cat
[Files.scsi.MSVMSCSI_XP ]driver = d4, msvmscsi.sys, msvmscsiinf = d4, msvmscsi.infcatalog = d4, vmadd_msvmscsi_sys.cat
[Files.scsi.MSVMSCSI_2003 ]driver = d5, msvmscsi.sys, msvmscsiinf = d5, msvmscsi.infcatalog = d5, vmadd_msvmscsi_sys.cat
[HardwareIds.scsi.MSVMSCSI_NT]id = "PCI\VEN_9004&DEV_7078&SUBSYS_70781414&REV_02","msvmscsi"
[HardwareIds.scsi.MSVMSCSI_2000]id = "PCI\VEN_9004&DEV_7078&SUBSYS_70781414&REV_02","msvmscsi"
[HardwareIds.scsi.MSVMSCSI_XP]id = "PCI\VEN_9004&DEV_7078&SUBSYS_70781414&REV_02","msvmscsi"
[HardwareIds.scsi.MSVMSCSI_2003]id = "PCI\VEN_9004&DEV_7078&SUBSYS_70781414&REV_02","msvmscsi"
[Files.scsi.MSVMSCSI_2003]driver = d5, msvmscsi.sys, msvmscsiinf = d5, msvmscsi.infcatalog = d5, vmadd_msvmscsi_sys.cat
6. Create a batch file in the guest operating system called setupf6.cmd and copy and paste the following contents:
Set cddriveletter = dIf not “%1” == “” set cddriveletter=%1Md a:\nt4Md a:\Win2000Md a:\WinXPMd a:\Win2003Dir > a:\msvmscsiCopy %cddriveletter%:\windows\windows\vmadd\winnt\*msvmscsi* a:\nt4Copy %cddriveletter%:\windows\windows\vmadd\win2k\*msvmscsi* a:\win2000Copy %cddriveletter%:\windows\windows\vmadd\Winxp\*msvmscsi* a:\WinXPCopy %cddriveletter%:\windows\windows\vmadd\Win2k3\*msvmscsi* a:\Win2003
7. Execute the batch filea. If your virtual CDROM drive letter is d just execute setupF6.cmdb. If your virtual CDROM drive letter is a different letter execute setupF6.cmd <driveletter>. (i.e. If the virtual CDROM drive letter is “x” type “setupF6.cmd x”8. Remove the virtual floppy from the virtual floppy drive9. This disk can now be used as an ‘F6’ floppy disk during OS setup.
On December 14, 2004, Robert Larson showed us how to work with the Virtual Server 2005 COM API and create scripts for automating tasks like virtual machine creation, configuration, enumeration, and provisioning virtual machines for a test lab. This was a Level 300 class, and assumed a knowledge of VBScript. I learned a lot about speeding up the provisioning process from this Webcast.
If you missed it, you can still view the recorded version of this Webcast by going to http://msevents.microsoft.com/cui/WebCastEventDetails.aspx?EventID=1032259266 and clicking Register for event in the left pane.
Michael asked the following question about sandboxing a virtual machine. I thought it might be of general interest, so decided to post the answer, which Ben Armstrong, our resident Virtual PC guru has provided (http://blogs.msdn.com/Virtual_PC_Guy).
Question: I'd like to use a virtual machine as a sandbox which permits the user to do "ugly" things in IE without damaging the host OS. Therefore, it is my interest to block any means of communication between host and guest, including drag and drop, network access, etc. 1. Do you consider Virtual PC appropriate for this? 2. How can I disable drag and drop? 3. How can I disable guest access to the host without limiting Internet access?
Answer (thanks Ben!): Yes – Virtual PC 2004 would be appropriate for this. To disable the integration features under a Windows 2000 or Windows XP virtual machine, you just need to disable the ‘Virtual Machine Additions Services Application’ and ‘Virtual Machine Additions Shared Folder Service’ services in the guest OS. To disable host access – but leave Internet access in place – use Shared Networking.
Some of you may not know that Virtual PC 2004 Service Pack 1 (SP1) is now available. It includes some fixes as well as reliability, performance, and management improvements. It's also essential if you want to run Windows XP with Service Pack 2. To download SP1, go to http://www.microsoft.com/downloads/details.aspx?familyid=b07c9ef0-265a-4237-ae3b-25bc8937d40f.
On December 9, 2004, 12:30 p.m. Pacific Time, Robert Larson will be showing us how to create a two-node cluster of virtual machines running Windows Server 2003—a key feature of Virtual Server 2005. To register, go to: http://www.microsoft.com/windowsserversystem/virtualserver/techinfo/events/default.mspx.