Althea wants to know what the difference is between Virtual PC and Virtual Server, and when she would use one versus the other. The fundamental difference between Virtual PC and Virtual Server is that Virtual PC is designed for desktop (or "client" or "PC") operating systems and Virtual Server is designed for server operating systems. As a result, the usage scenarios for the two products are correspondingly different. There are a few feature differences as well. This article covers the major functional differences between the two products.
Supported operating systems
For Virtual PC, both the host operating system (the one you install Virtual PC itself on) and the guest operating systems (the ones running inside virtual machines) will be desktop operating systems. Supported host operating systems include Windows XP Professional, Windows 2000 Professional, or Windows XP Tablet PC Edition. Supported guest operating systems include these plus a number of others, such as Windows 98 and MS-DOS 6.22. See the Virtual PC documentation for a complete list.
For Virtual Server, the host operating system and the guest operating systems will be server operating systems. Supported host operating systems are Windows Server 2003 (Standard, Enterprise, and Datacenter Editions) and Windows Small Business Server (Standard and Premium Editions). Supported guest operating systems include these plus Windows 2000 Server, all editions except Enterprise as well as Windows NT Server 4.0 Enterprise Edition SP6a. See the Virtual Server documentation for more information.
Usage scenarios for Virtual PC
Some primary usage scenarios for Virtual PC are:
These scenarios are described in detail in the white paper at: http://www.microsoft.com/windows/virtualpc/evaluation/techoverview.mspx.
The uses that you can find for Virtual PC are limited only by your resourcefulness, though. For example, my co-worker Nehar has Virtual PC set up for his wife and kids to use for browsing the Internet. That way he doesn’t have to worry about anything they download because it won’t affect the host operating system. If the virtual machine get’s corrupted or infected, he can simply delete it and start over.
Usage scenarios for Virtual Server
Some primary usage scenarios for Virtual Server are:
Other differences between Virtual PC and Virtual Server
Virtual Server provides a few features that aren’t available in Virtual PC:
On the Virtual PC side, Virtual Server does not include an emulated sound card in its virtual machines, while Virtual PC does.
That about sums it up as far as important functional differences. I hope this answered your question, Althea.
If you have a virtual machine configured on one computer and want to access a resource (such as an ISO or a VHD) on a different physical computer via a UNC path, you have three choices, listed below. The first two are covered in the documentation. The third is not, so consider it your tip for today.
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."
The Branch Office Infrastructure Solution has been published on TechEd. It uses virtualization technologies and includes tools for automating the creation of virtual machines, among lots of other good stuff. Go take a look! http://www.microsoft.com/downloads/details.aspx?FamilyID=5624f3a5-b379-41c1-80f6-df3228cb2622&displaylang=en
From the download page: "The Branch Office Infrastructure Solution (BOIS) deliverables provide conceptual information to facilitate the definition and deployment of a streamlined branch office infrastructure solution that provides a comprehensive set of core IT infrastructure services based on the Microsoft® Windows Server™ 2003 operating system. The BOIS deliverables also include prescriptive guidance and best practices for implementing a complete, lab-validated single-server solution for the branch office using automated deployment tools. The automation tools are part of this download and are configurable for individual branch office deployments."
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:
Title: Course 2288: Using Microsoft® Virtual Server 2005Course Type: Self-paced courseAvailable Offline: YesEstimated Time to Complete: 5 hours Description: This course prepares students to migrate legacy applications and consolidate server functions by using Microsoft Virtual Server 2005. Objectives: At the end of the course, students will be able to:
Visit https://www.microsoftelearning.com/eLearning/offerDetail.aspx?offerPriceId=62154 for more information.
From ComputerWorld, "Q&A: Microsoft's Bob Muglia discusses virtualization plans" - http://www.computerworld.com/softwaretopics/software/story/0,10801,102332,00.html
Also from ComputerWorld, "Sidebar: Under the Hood: The Soul of a Virtual Machine" (they say imitation is the sincerest form of flattery!) - http://www.computerworld.com/hardwaretopics/storage/story/0,10801,101243,00.html
From The Register, "Microsoft's Virtual Server to become a 'feature' in 2009" - http://www.theregister.co.uk/2005/06/08/ms_hypervisor_2009/
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.
Eric sent me this question: "Do you know if it's possible to migrate a virtual machine to a physical one using ADS or any other tool?"
Unfortunately, I don't know of an easy way to migrate a virtual machine to a physical one, Eric, nor do I know of any tools. The issue is fixing the hardware-dependent system files. Because the hardware of a physical computer may be (or probably is) different than the hardware emulated by the virtual machine, you may need to swap system files that depend on the emulated hardware of the virtual machine for other files that will allow the operating system to run on the hardware of the physical computer. The system files include certain HAL and kernel files. You also may need to swap storage drivers needed for the operating system to boot correctly on the physical hardware. For more information about the hardware emulated by virtual machines, see "Emulated hardware" in the Virtual Server 2005 Administrator's Guide. If you want some background information on the issues, read the documentation I wrote for Virtual Server 2005 Migration Toolkit (VSMT). It's installed when you install VSMT (go to http://www.microsoft.com/windowsserversystem/virtualserver/evaluation/vsmt.mspx).
The "gotcha" about swapping system files is that Microsoft won't support the OS if you've changed its HAL file. If you use VSMT, the migration is supported, but not if you do it manually.
-Megan
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.
Chong Lee and Thomas Mathew -- Technology Specialists here at Microsoft -- are developing a report that you can load into Microsoft Operations Manager 2005 (MOM) to monitor the performance of physical computers that are candidates for virtualization. This report can help you determine which computers are good candidates for virtualization, and of those, which computers you can virtualize on the same hardware. This report will be available for download when it's complete. I'll let you know where you can get it. In the meantime, you can ask your TAM or account rep for a copy.
Click here to see a view of the report: http://megandavis.members.winisp.net/Resources/VS-Candidate-Report.JPG
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.
This whitepaper is now available on Microsoft.com at http://download.microsoft.com/download/1/4/d/14d17804-1659-435d-bc11-657a6da308c0/VSvsVPC.doc. Thanks to those of you who gave me comments on the draft.
Abstract: Microsoft® Virtual PC 2004 is a virtual machine solution for desktop operating systems. Microsoft Virtual Server 2005, on the other hand, is a solution for server operating systems. Although Virtual PC and Virtual Server share many features in common, they are designed for different purposes. As a result, some of their features are also quite different. This white paper explains the differences between Virtual PC and Virtual Server and discusses the scenarios in which it is appropriate to use one or the other.
As you may know, Windows Server 2003 SP1 has been released, and a lot of people will be rushing to upgrade their virtual machines. If you're thinking about doing this, though, plan on postponing it for a bit. Virtual Server 2005 was released many months before Windows Server 2003 SP1, and the Virtual Machine Additions are not optimized for it. You may be disapointed in the way your virtual machines run.
But don't despair -- Virtual Server 2005 SP1 will include updated Virtual Machine Additions for Windows Server 2003 SP1 as well as the other new supported host and guest operating systems (see my earlier post on Virtual Server 2005 SP1 features). As soon as it's available, I'll let you know.
** The Beta release of Virtual Server 2005 SP1 is now available, as announced in this post: http://blogs.technet.com/megand/archive/2005/04/20/403960.aspx.**
Note: If you upgrade your host operating system to Windows Server 2003 SP1, you may have trouble accessing the Administration Website. If this happens, you need to configure DCOM as described in this KB article: http://support.microsoft.com/?kbid=891609.
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.
You might want to create a “base” virtual machine with an operating system and applications, and then copy its .vhd file to use for other virtual machines. Before you make copies of the .vhd, however, it’s important to run Sysprep in the guest operating system. This way, the first time you start a virtual machine that uses a copy of the base virtual machine’s .vhd file, the guest operating system will be assigned a new SID and other identifiers, so you won’t end up with network conflicts between different virtual machines that use the same copied .vhd file.
Read all about it in the article I just posted in the "Deployment" category at http://blogs.technet.com/megand/articles/357570.aspx.
Please note that Microsoft does not support using a tool other than Sysprep for cloning virtual machines. For more information, see this Knowledge Base article: http://support.microsoft.com/Default.aspx?id=162001.
Update: This whitepaper is now available on Microsot.com at http://download.microsoft.com/download/1/4/d/14d17804-1659-435d-bc11-657a6da308c0/VSvsVPC.doc. Thanks to those of you who gave me comments on the draft.
------------------------------------------------------------------------
Here's a draft of a whitepaper I'm working on that will ultimately be posted on Microsoft.com. Comments and suggestions would be appreciated. Thanks!
** This information is provided as-is with no warranties. **
This whitepaper explains the difference between Virtual PC and Virtual Server, and discusses when you would use one versus the other. Virtual PC is Microsoft's virtual machine solution for desktop applications, and Virtual Server is its solution for server applications. While they share many features in common, because of their different usage scenarios, a number of their features are different.
Virtual PC provides an optimal experience for a desktop user who wants to run one or more additional desktop operating systems on his or her PC. The user interface is fairly simple and there is extensive integration between the host operating system running on the physical computer and the guest operating systems running in virtual machines. For example, users can easily drag and drop data between virtual machines and their host. In addition, the sound and display features of virtual machines are much the same as physical computers. On the other hand, Virtual Server provides features to support the requirements of enterprise server applications and administration. For example, due to more stringent security requirements, there is less integration between the host and guest operating systems. Virtual Server also provides a number of features to support greater manageability, scalability, and extensibility.
The fundamental difference between Virtual PC and Virtual Server is that Virtual PC is designed for desktop (or "client" or "PC") operating systems and Virtual Server is designed for server operating systems.
While the two products have many features in common, they serve different needs, so there are crucial differences between them as well. For example, because it supports desktop applications, the Virtual PC user interface is designed with the typical desktop user in mind. The configuration options are relatively simple and easy for the average computer user to understand and use. On the other hand, Virtual Server is designed for running enterprise server operating systems and applications. It provides the configuration and management options that are required for server management, and these necessarily make the user interface more complex. As a result, making effective use of Virtual Server requires some degree of knowledge of server technologies.
As already mentioned, Virtual PC is designed for running desktop operating systems and applications. Some primary usage scenarios for Virtual PC are:
These scenarios are described in detail in the Microsoft Virtual PC 2004 Technical Overview white paper, available the Microsoft Web site at http://go.microsoft.com/fwlink/?LinkId=45404. The uses that you can find for Virtual PC are limited only by your resourcefulness, though. For example, you might set up Virtual PC for your family to use for browsing the Internet. That way you don’t have to worry about anything they download because it won’t affect the host operating system. If the virtual machine becomes corrupted or infected with a virus, you can simply delete it and start over.
Virtual Server is designed for running enterprise server operating systems and applications. Some primary usage scenarios for Virtual Server are:
Virtual Server and Virtual PC have a number of features in common, such as:
While they share many features in common, due to the different usage scenarios there are also a number of differences between Virtual Server and Virtual PC, which are described in this topic.
To support the requirements of desktop users, Virtual PC provides the following features that are not available in Virtual Server:
To support the requirements of an enterprise environment, Virtual Server provides the following features that are not available (or needed) in Virtual PC:
For Virtual Server, supported host and guest operating systems are server operating systems, except for Windows XP Professional, which is supported as a host operating system. Supported host operating systems are Windows Server 2003 (Standard, Enterprise, and Datacenter Editions), Windows Small Business Server (Standard and Premium Editions), and Windows XP Professional. Supported guest operating systems include these plus Windows 2000 Server, all editions except Enterprise as well as Windows NT Server 4.0 Enterprise Edition SP6a. See the Virtual Server documentation for more information.
RAM. Support for up to 3.6 GB RAM per virtual machine.
Two-node clustering. Virtual Server provides simple two-node failover from one virtual machine to another for testing and development.
The following are references to additional information and resources for using Virtual PC and Virtual Server.
Here's an example of a script written in VBScript that you can write to perform a warm backup of a virtual machine. It was written by John Kelbley, who's a technology specialist for Microsoft. Please pay attention to the warnings and caveats given in the script.
Thanks John!
' READ THIS LINE!!! The sample scripts are not supported under any Microsoft standard support program or service. The sample scripts are provided AS IS without warranty of any kind. Microsoft further disclaims all implied warranties including, without limitation, any implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use or performance of the sample scripts and documentation remains with you. In no event shall Microsoft, its authors, or anyone else involved in the creation, production, or delivery of the scripts be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the sample scripts or documentation, even if Microsoft has been advised of the possibility of such damages. ''' MoveWarm.VBS written by John Kelbley ''' This the mother of all Demo Virtual Server Availability scripts! '' When the script is executed properly from a running Virtual Server system with active Guest images,' it hibernates, copies, installs, and starts all active Guest images on another Virtual Server! '' This could be used in a production environment to allow for hardware maintenance while minimizing down time of Guest images, if all assumptions are met, including:' Identical Virtual Server hardware configuration - enough RAM, disk space with same drive letters, etc. on target to accommodate migrated guest images' Identical Virtual Network configuration (it's just easier, otherwise, they may not start automatically, and you'll have to adjust the config)' Other things I haven't run into in my testing (I only have a couple of Evo's to test on!)' XP SP2 (connection firewall) can keep this from running, depending on the hosts you are using (rumor that some DCOM security thing might mess things up, too)' I sometimes have been know to setup a local account on both hosts with the same name and password as my domain credential, and map drives back and forth to ' make sure everything will run right before kicking off the script for a demo!'' NAME RESOLUTION IS A BIG DEAL HERE TOO!!!'' How does the Script do it? It does a few key things:' 1) "saves state" on running VPC images' 2) Creates a .BAT and .VBS on original host for each of the hibernated images in current directory' 3) Starts .BAT for each hibernated image on local host (this kind of multi-threads the copy)' a) copies files related to image to new host (.VHD config, save state)' b) runs .VBS to register config file on new host, and re-start from Saved State'' The script does not clean up after itself, as it is a sample meant for training purposes!'' The .BAT and .VBS files generated may be of interest to someone, so at this time, I did not want to delete them''' When I run the demos, I usually use smaller VMs - some from the VMSTORE areas - like Windows 3.0 or BOB on Windows 95''' Thanks to the Tech Net Script Center folks for all their guidance (great examples on the web, as well as usable reference books on VBS!)''Option Explicit'On Error Resume Next
Const ForWriting = 2 ' constant used for openning text files
Dim ToSystem ' Computer Name of Target host systemDim FromSystem ' Computer Name of source host systemDim VMStateCodes ' Array of VM State Codes - to display kinder status that integersDim VMStuff ' Virtual Server Info instanceDim SourcevmCollection ' Collection of VMs from Source ServerDim vm ' instance of a VM from collection loopDim objVM ' instance of a VMDim MoveVM ' instance of a VMDim colHardDisks ' Collection of VHDs in a VMDim objDrive ' instance of a VHD from collection loopDim objHardDisk ' instance of a VHDDim NameLength ' for tidy display of VM namesDim MaxNameLength ' for tidy display of VM namesDim VMCount ' counter for all VMs Dim MoveCount ' counter for VMs to move - VMs that are currently running (nicer demo!)Dim MoveName ' local var with VM name Dim VMInfo(100) ' array of VM names to be movedDim TargetHost ' The server where all the runnning VM's will be movedDim TargetHostServer ' The server where all the runnning VM's will be movedDim TargetHostAvailable ' Boolean to track if the target host is pingableDim MyShell ' Used to find local host name, if requiredDim MyEnvironment ' Used to find local host name, if required
' Set Target host variables'TargetHost = "192.168.0.3" ' put name or IP Address of target server here, NOT preceeded by two slashes'TargetHost = "WS03VS01" ' put name or IP Address of target server here, NOT preceeded by two slashesTargetHost = "CHANGEME" ' put name or IP Address of target server here, NOT preceeded by two slashes
'' Should not need to change anything after here to get script to run!'TargetHostServer = "\\" & TargetHostTargetHostAvailable = TRUE ' setting default before ping test
Call Housekeeping()
VMCount = 0Set SourcevmCollection = VMStuff.VirtualMachines '' Get maximum Name Length for Formatting - just makes some things look nice'For each vm in SourcevmCollection NameLength = Len(vm.Name) If MaxNameLength < NameLength Then MaxNameLength = NameLength End If ' ' If VM is "Running" them target for WARM migration to other host system ' Here is where the systems are identifed at migration targets ' if VMStateCodes(vm.State) = "Running" Then VMInfo(VMCount) = vm.Name VMCount = VMCount + 1 End IfNext
For each vm in SourcevmCollection Wscript.Echo VbCrLf & "--------------------------------------------------------------------" Wscript.Echo " " & vm.Name & Space(MaxNameLength - Len(vm.Name)) & " - State is: " & VMStateCodes(vm.State)Next
Wscript.Echo VbCrLf & "--------------------------------------------------------------------" Wscript.Echo "--------------------------------------------------------------------" if VMCount = 0 then Wscript.Echo VbCrLf & "No VMs are runnning, nothing to warm move"End If
'****************************************************' Engine is here!!!!!'****************************************************if TargetHostAvailable = TRUE Then For MoveCount = 1 to VMCount MoveName = VMInfo(MoveCount-1) Wscript.Echo "Processing " & MoveName & Space(MaxNameLength - Len(MoveName)) & " VM " & MoveCount & " of " & VMCount & "..." Set objVM = VMStuff.FindVirtualMachine(MoveName)
' Save State of all running VMs Call SaveVMState(MoveName)
' Generage .BAT and .VBS for each of the running VMs Call MakeScriptFiles(MoveName)
Wscript.Echo VbCrLf & "--------------------------------------------------------------------" NextEnd If
Wscript.Echo VbCrLf & "--------------------------------------------------------------------" Wscript.Echo "--------------------------------------------------------------------" 'End Script
'******************************************************************************'******************************************************************************'******************************************************************************'******************************************************************************'* *'* *'* Subroutines to make the stuff up top look nicer! *'* *'* *'* *'******************************************************************************'******************************************************************************'******************************************************************************'******************************************************************************
'******************************************************************************'* *'* Do some if the ugly stuff that I didn't want to put at the front *'* of the script *'* *'******************************************************************************Sub Housekeeping()
Dim objPing ' use for ping test - poached from TechNet examples Dim objStatus ' use for ping test - poached from TechNet examples
Wscript.Echo VbCrLf & "--------------------------------------------------------------------" Wscript.Echo VbCrLf & "- -" Wscript.Echo VbCrLf & "- -" Wscript.Echo VbCrLf & "- WarmMove.VBS -" Wscript.Echo VbCrLf & "- -" Wscript.Echo VbCrLf & "- by -" Wscript.Echo VbCrLf & "- -" Wscript.Echo VbCrLf & "- John Kelbley -" Wscript.Echo VbCrLf & "- -" Wscript.Echo VbCrLf & "- -" Wscript.Echo VbCrLf & "- Finds running VM's running under Virtual Server 2005 -" Wscript.Echo VbCrLf & "- on local system, pauses them, moves them to specified target -" Wscript.Echo VbCrLf & "- and unpauses them! -" Wscript.Echo VbCrLf & "- -" Wscript.Echo VbCrLf & "- Please read comments in script carefully before running! -" Wscript.Echo VbCrLf & "- -" Wscript.Echo VbCrLf & "- This is a sample, and is not meant for use in production. -" Wscript.Echo VbCrLf & "- -" Wscript.Echo VbCrLf & "- Script expects NO paramameter - the name of the target -" Wscript.Echo VbCrLf & "- Virtual Server host is specified internally -" Wscript.Echo VbCrLf & "- (I WANT YOU TO LOOK AT THE SCRIPT!!!!) -" Wscript.Echo VbCrLf & "- -" Wscript.Echo VbCrLf & "- -" Wscript.Echo VbCrLf & "- Example: cscript MoveWarm.VBS -" Wscript.Echo VbCrLf & "- -" Wscript.Echo VbCrLf & "- -" Wscript.Echo VbCrLf & "- -" Wscript.Echo VbCrLf & "--------------------------------------------------------------------"
' Populate VM State Array VMStateCodes = Array("Invalid", "Turned Off","Saved","Turning On", "Restoring", "Running", "Paused", "Saving",_ "Turning Off", "Merging Drives", "Deleting Machine")
' Create VS application instance Set VMStuff = WScript.CreateObject("VirtualServer.Application")
Wscript.Echo VbCrLf & "Source Host System (this box!): " & FromSystem
Wscript.Echo VbCrLf & "--------------------------------------------------------------------"
Wscript.Echo "Default VM configuration path: " & VMStuff.DefaultVMConfigurationPath Wscript.Echo "Default VN configuration path: " & VMStuff.DefaultVNConfigurationPath
' Check to see if remote target system is accessible... ' Wscript.Echo VbCrLf & "Pinging " & TargetHost & " to see if warm migration can occour..." Set objPing = GetObject("winmgmts:{impersonationLevel=impersonate}").ExecQuery("select * from Win32_PingStatus where address = '" & TargetHost & "'") For Each objStatus in objPing If IsNull(objStatus.StatusCode) or objStatus.StatusCode<>0 Then TargetHostAvailable = FALSE WScript.Echo VbCrLf & "machine " & TargetHost & " is not reachable" WScript.Echo "CANNOT EXECUTE Warm migration" & VbCrLf End If Next '*********************************************************************************** ' should add a check to see if remote system has Virual Server installed, too!!!!! '***********************************************************************************End Sub
'******************************************************************************'* *'* Saves the State of Running VMs - creating a "hibernated" VM *'* *'******************************************************************************Sub SaveVMState(subVMName) Wscript.Echo Space(MaxNameLength + 12) & "Saving State" While objVM.State > 2 ' if the VM is not turned off of saved... if VMStateCodes(objVM.State) = "Running" Then objVM.Save() End If wscript.sleep(1000) Wscript.Echo Space(MaxNameLength + 12) & VMStateCodes(objVM.State) WendEnd Sub
'******************************************************************************'* *'* Generate .BAT and .VBS files to handle the migration of VM files *'* *'******************************************************************************Sub MakeScriptFiles(subVMName)
Dim LocalBatchFile Dim LocalVBSFile Dim LocalFSO Dim LocalFile Dim FileFSO Dim FileToCheck Dim FoundFolder Dim FromFileConfig Dim ToFileConfig Dim ConfigFolder Dim FromFileState Dim ToFileState Dim FromFileVHD Dim ToFileVHD Dim FromFileVUD Dim ToFileVUD Dim CommandString Dim objShell
Set MoveVM = VMStuff.FindVirtualMachine(subVMName) Wscript.Echo VbCrLf & "Beginning Move Processing..."
' *********************************************************************************************************************** ' *********************************************************************************************************************** ' code to create .BAT to copy files and call .VBS to register config file and start image ' *********************************************************************************************************************** ' *********************************************************************************************************************** LocalVBSFile = subVMName & "_" & "local.vbs" LocalBatchFile = subVMName & "_" & "local.bat"
Set LocalFSO = CreateObject ("scripting.FileSystemObject") Set LocalFile = LocalFSO.CreateTextFile(LocalBatchFile)
' start writing batch file LocalFile.WriteLine "@Echo off" LocalFile.WriteLine "Echo ---------------------------------------------------------"
' Construct destination UNC for Config File to copy ' Need the path for the parent directory of the file to copy to make Xcopy work right...this seemed easier than parsing the string! FromFileConfig = MoveVM.File Set FileFSO = CreateObject("Scripting.FileSystemObject") Set FileToCheck = FileFSO.GetFile(FromFileConfig) FoundFolder = FileFSO.GetParentFolderName(FileToCheck) ConfigFolder = FoundFolder ' Saving this for the VBS later... ToFileConfig = TargetHostServer & "\" & Left(FoundFolder, 1) & "$" & Mid(FoundFolder, 3, 1024) CommandString = "xcopy " & CHR(34) & FromFileConfig & CHR(34) & " " & CHR(34) & ToFileConfig & "\" & CHR(34) & " /Y" LocalFile.WriteLine "echo Copying " & FromFileConfig & " to remote, please wait..." LocalFile.WriteLine CommandString LocalFile.WriteLine "Echo ---------------------------------------------------------"
' Construct destination UNC for Save State File n FromFileState = MoveVM.SavedStateFilePath Set FileFSO = CreateObject("Scripting.FileSystemObject") Set FileToCheck = FileFSO.GetFile(FromFileState) FoundFolder = FileFSO.GetParentFolderName(FileToCheck) ToFileState = TargetHostServer & "\" & Left(FoundFolder , 1) & "$" & Mid(FoundFolder, 3, 1024) CommandString = "xcopy " & CHR(34) & FromFileState & CHR(34) & " " & CHR(34) & ToFileState & "\" & CHR(34) & " /Y" LocalFile.WriteLine "echo Copying " & FromFileState & " to remote, please wait..." LocalFile.WriteLine CommandString LocalFile.WriteLine "Echo ---------------------------------------------------------"
' Take Care of VHD (drive image) and VUD files (undo files) - can be more than one for a Guest... Set colHardDisks = MoveVM.HardDiskConnections For Each objDrive in colHardDisks FromFileVHD = objDrive.HardDisk.File Set FileFSO = CreateObject("Scripting.FileSystemObject") Set FileToCheck = FileFSO.GetFile(FromFileVHD) FoundFolder = FileFSO.GetParentFolderName(FileToCheck) ToFileVHD = TargetHostServer & "\" & Left(FoundFolder, 1) & "$" & Mid(FoundFolder, 3, 1024) CommandString = "xcopy " & CHR(34) & FromFileVHD & CHR(34) & " " & CHR(34) & ToFileVHD & "\" & CHR(34) & " /Y" LocalFile.WriteLine "echo Copying " & FromFileVHD & " to remote, please wait...(big file!)" LocalFile.WriteLine CommandString LocalFile.WriteLine "Echo ---------------------------------------------------------" If MoveVM.Undoable Then FromFileVUD = objDrive.UndoHardDisk.File Set FileFSO = CreateObject("Scripting.FileSystemObject") Set FileToCheck = FileFSO.GetFile(FromFileVUD) FoundFolder = FileFSO.GetParentFolderName(FileToCheck) ToFileVUD = TargetHostServer & "\" & Left(FoundFolder, 1) & "$" & Mid(FoundFolder, 3, 1024) CommandString = "xcopy " & CHR(34) & FromFileVUD & CHR(34) & " " & CHR(34) & ToFileVUD & "\" & CHR(34) & " /Y" LocalFile.WriteLine "echo Copying " & FromFileVUD & " to remote, please wait..." LocalFile.WriteLine CommandString LocalFile.WriteLine "Echo ---------------------------------------------------------" End If Next
' Call .VBS to register configuration file and start the VPC image LocalFile.WriteLine "Echo Calling script to register config file on remote and start VM..." LocalFile.WriteLine "CScript " & CHR(34) & LocalVBSFile & CHR(34) & " //NoLogo"
LocalFile.WriteLine "Echo End of Batch file" LocalFile.WriteLine "Echo ---------------------------------------------------------" LocalFile.Close 'close batch file
' *********************************************************************************************************************** ' *********************************************************************************************************************** ' code to create .VBS to register config file with Target Virtual Server ' *********************************************************************************************************************** ' *********************************************************************************************************************** Set LocalFSO = CreateObject ("scripting.FileSystemObject") Set LocalFile = LocalFSO.CreateTextFile(LocalVBSFile)
' start writing .VBS file ' LocalFile.WriteLine "On Error Resume Next" LocalFile.WriteLine "Set objVS = CreateObject(" & CHR(34) & "VirtualServer.Application" & CHR(34) & ", " & CHR(34) & TargetHostServer & CHR(34) & ")" LocalFile.WriteLine "errReturn = objVS.RegisterVirtualMachine(" & CHR(34) & subVMName & CHR(34) & "," & CHR(34) & ConfigFolder & CHR(34) & ")" LocalFile.WriteLine "Set objVM = objVS.FindVirtualMachine(" & CHR(34) & subVMName & CHR(34) & ")" LocalFile.WriteLine "objVM.Startup()"
LocalFile.Close 'close .VBS file Set objShell = Wscript.CreateObject("Wscript.Shell") CommandString = "%comspec% /c " & CHR(34) & LocalBatchFile & CHR(34) Wscript.Echo VbCrLf & "Command string: " & CommandString objShell.Run(CommandString)
Wscript.Echo VbCrLf & "End Move Processing"End Sub
In his keynote address this morning at Microsoft Management Summit 2005, Steve Ballmer reaffirmed Microsoft's commitment to the Dynamic Systems Initiative (DSI), of which virtualization is a key component. Ballmer explained that Microsoft is increasing investment in both virtualization and virtualization management technology, describing near-term product improvements and laying out a long-term strategy for both areas. For a summary of Steve's keynote address, go to http://www.microsoft.com/presspass/press/2005/Apr05/04-20VirtualizationInvestmentsPR.asp. For a verbatim transcript of his comments on virtualization, go to http://blogs.technet.com/megand/articles/403997.aspx. To view an on-demand Web cast (including Jeff Woolsey's demonstration of Virtual Server 2005 SP1), go to http://www.microsoft.com/presspass/events/mgmtsummit/keynotes.asp.
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.
This is not related to Virtual Server, so skip this unless you're looking for my STC slides.
Below is a link to the presentation slides for my STC talk on using newsgroups to improve the customer experience. At the bottom of each slide are my detailed notes. To view them more easily, you can drag the divider bar upwards. Happy posting!
Megan
http://megandavis.members.winisp.net/Resources/Newsgroups_MD.mht
These two scripts from John Kelbley, written in VBScript, list the virtual machines that are currently registered on a given instance of Virtual Server. Remember that these scripts are provided as-is, with no warranties, and are not supported by Microsoft.
This script shows the virtual machines registered on the current instance of Virtual Server:
Set vpcApp = CreateObject("VirtualServer.Application") Set vmCollection = vpcApp.VirtualMachines For each vm in vmCollection Wscript.Echo vm.Name Next
Set vpcApp = CreateObject("VirtualServer.Application")
Set vmCollection = vpcApp.VirtualMachines
For each vm in vmCollection Wscript.Echo vm.Name
Next
This script shows the virtual machines registered on a remote instance of Virtual Server:
Set vpcApp = CreateObject("VirtualServer.Application“,_ “\\remoteServer”) Set vmCollection = vpcApp.VirtualMachines For each vm in vmCollection Wscript.Echo vm.Name Next
Set vpcApp = CreateObject("VirtualServer.Application“,_ “\\remoteServer”)