Quick post here on two items.
Offline Virtual Machine Servicing Tool can be downloaded here. As blogged about at by the System Center team blog, Virtualization.info, and InfoWorld blog.
This product allows the update of large-scale deployments of virtual machines, leveraging PowerShell, System Center Virtual Machine Manager (SCVMM) 2007 and WSUS 3.0 (or Configuration Manager 2007). As Alessandro pointed out, "It just automates the VM power-on, updates deploying through virtual network access, and VM shutdown." You can use this Solution Accelerator to help you with business scenarios such as these:
- Your IT organization is converting physical servers to virtual machines to reduce costs, including administrative overhead. How can you regularly update offline virtual machines while minimizing administrative costs?
- Your IT organization has thousands of virtual machines stored for months at a time in a number of libraries. How do you keep the virtual machines reliably up to date?
Second, today Citrix issued an announcement about "Project Kensho", which is described as:
will deliver Open Virtual Machine Format (OVF) tools that, for the first time, allow independent software vendors (ISVs) and enterprise IT managers to easily create hypervisor-independent, portable enterprise application workloads. These tools will allow application workloads to be imported and run across Citrix XenServer, Microsoft Windows Server 2008 Hyper-V and VMware ESX virtual environments
While you can read ComputerWorld's article or Alessandro's blog on the announcement, I think the most interesting perspective comes from Simon Crosby's June 27 post. Here's an excerpt from his post:
Kensho showcases our commitment to open standards based virtual infrastructure management using DMTF CIM based interfaces, and will in the not too distant future allow Microsoft System Center VMM to manage XenServer. It also allows users to quickly and easily export their virtualized workloads to and import them from the new industry standard portable virtual machine format, OVF. You'll be hearing much more about Kensho and its features in the near future.
The OVF standard, which I was fortunate to be able to help to develop offers ISVs and enterprise IT staff a hypervisor-independent portable virtual machine format that packages a complete application workload with its resource requirements, configuration and customization parameters, licebnsand signatures to facilitate appliance integrity and security checking, as an open standard. Virtualized data center workloads captured in OVF format can be installed and run on any DMTF compliant virtualization platform. OVF also supports software license checking for the enclosed VMs, and allows an installed VM to localize the applications it contains and optimize its performance for a given virtualization environment.At the DMTF interoperability event, we used Project Kensho to create VMs from VMware, Hyper-V & XenServer in the OVF format. We also used Kensho to import and run OVF virtual appliances on XenServer and Hyper-V. Kensho will allow application vendors and IT users to produce virtual appliances once as "golden application templates", independent of the virtualization platform used to deploy them - and is a clear demonstration of how Citrix will add value to Hyper-V.
The Citrix news release says Kensho will be available as a download in September.
As for Microsoft, we support the OVF standards work, which isn't complete yet. There's no public schedule for when OVF will be supported in our products, such as Hyper-V or SCVMM, but it's on the board. It's great to see partners like Citrix doing converts for interop based on our DMTF standard interface. And we'll continue to work with Citrix, Novell and Sun on interoperability, in addition to making technology (like VHD image, Hypercall API) available via Open Specification Promise.
Patrick O'Rourke
Filed under: Citrix, ESX, Interop, Management tools, Microsoft Assessment and Planning (MAP) Tool, System Center, System Center Virtual Machine Manager, virtualization management, Virtuallization Solution Accelerators, VMM 2008, VMWare, Windows Server 2008, Hyper-V, virtual machine
Greetings! Chris Steffen here again from Kroll Factual Data. I want to share some thoughts on what I have heard about Microsoft virtualization in the enterprise data center. I will also be the first to admit that I am not the average user of Microsoft’s virtualization technologies and that I probably have a bit of a bias toward the Microsoft solution. But the bias did not come without some pretty compelling reasons.
There are several requirements we each consider when evaluating a server virtualization product. Maybe the primary requirement is cost. Maybe the primary requirement is flexibility. Maybe it is manageability or ease of use or compatibility or reliability. Each of these requirements is a valid reason to choose a certain virtualization product. And in my evaluation, each of these requirements is answered by the Microsoft virtualization solution. I am not going to deep dive into a sales pitch here on the benefits of Virtual Server over any of the other solutions, but I did want to address a specific concern that I have heard while attending conferences and while industry analysts have talked to me: that Microsoft’s virtualization products are not ready for enterprise production environments.
For some background, Kroll Factual Data has been using Microsoft Virtual Server in our production environment for nearly five years (since Virtual Server 2003). We have tested and implemented every subsequent version ever since and currently have a more than 1,600 virtual machine environment consisting of Virtual Server 2005 R2 and Hyper-V. We are able to run 300,000 business transactions per day in this environment, and the flexibility afforded to us by having an 85% virtualized data center allows us to deploy additional capacity on demand nearly instantly.
When we started down the virtualization path, I will be the first to admit that some of the other virtualization solutions had an advantage over Microsoft, specifically in their management tools. Virtual Machine Manager (VMM) took care of that, and the improvements coming in VMM 2008 makes the Microsoft virtualization management solution the best in class.
We have had Hyper-V in our production environment now for months and are migrating our existing Virtual Server 2005R2 VMs to Hyper-V hosts as fast as our IT team can work. It has been stable, the support has been outstanding (through the Microsoft TAP program), and we are seeing about a 20% increase in resource utilization over Virtual Server 2005 R2.
Based on Factual Data ’s use of the products, Microsoft’s virtualization suite is ready for the big leagues. I mentioned earlier that I have a bias toward the Microsoft virtualization solution, and I have this bias because Virtual Server, Hyper-V and VMM have proven to me that they work as promised. They have provided the cost-effective, reliable and easy-to-manage solution that we needed, and that we will continue to use.
Some may say that they came a bit late to the party, but I would contend that the party is just beginning.
-Chris
The update will be classified as a "recommended update", which means it will flow down automatically according to the settings you’ve selected for your Windows Server 2008 OS. It’s also being released to Windows Server Update Services.
Taylor has a nice screen capture here. Let the fun times begin!
Patrick
Daniel asked about the Linux integration components for Hyper-V. They've now reached RC2 status, according to Mike Sterling, and are available from http://connect.microsoft.com/
Hang on – did you say RC2?
Due to customer feedback from the beta version, we added a couple of additional features.
· Mouse Support: Support for the synthetic mouse device has been added in beta. This new mouse support allows the mouse to move in and out of the window without having to use the CTRL-ALT-LEFTARROW key command to break out.
· Fastpath Boot Support: Support for faster single disk configurations has been added to the RC2 release. Boot devices now take advantage of the storage VSC to provide enhanced performance.
We’ve reached RTM on the hypercall adapter, Linux implementation of VMBus, and the network and storage VSC.
Patrick
UPDATE (July 8, 2008) - Vacations slowed my response to the comments. The Linux ICs were taken down so that folks could review the licensing one more time. Licensing is tricky when open source and proprietary software are packaged. I'm trying to get an ETA and will update this post when I know a date.
As many of you know, the much-anticipated Hyper-V hypervisor feature was just released last week. Many of the IT professionals like you have now began to use Hyper-V server virtualization technology to take back the control of your datacenter. With energy costs going sky high and the demand for IT services increasing, no wonder many of you are now looking to consolidate the physical servers using virtualization.
With server consolidation being the direction to go, we are pleased to announce the RTM of Microsoft Assessment and Planning Toolkit 3.1 for Hyper-V.
What is the Microsoft Assessment and Planning Toolkit 3.1?
The Microsoft Assessment and Planning Toolkit 3.1 (or MAP) is a network-wide agent-less tool that can help you quickly find out where your desktops and servers are as well as auto-generate upgrade recommendations for multiple products and technologies including server, desktop and virtualization migration scenarios covering:
· Hyper-V virtualization candidates assessment (New in MAP 3.1)
· SQL server discovery and assessment (New in MAP 3.1)
· Desktop Security Center assessment (New in MAP 3.1)
· Windows Server 2008 hardware and device compatibility assessment including server discovery
· Windows Vista hardware and device compatibility assessment including PC discovery
· Office 2007 hardware compatibility assessment
· Microsoft Application Virtualization hardware compatibility assessment
· SNMP inventory reporting

How can I use the MAP Toolkit to plan for my server consolidation project?
The MAP Toolkit can help you determine which subset of your currently physical servers are good candidates for Hyper-V virtualization. By capturing the workloads and utilization of each of your server over a defined period of time, this tool can recommend a set of consolidated hosts for your existing servers. It looks at many factors such as CPU utilization, memory utilization, Network IO and Disk IO rates and auto-generate a set of proposal documents and detailed spreadsheets for your virtualization planning process.
How does remote inventory work? Is it agent-based or agent-less?
Leveraging the Windows Management Instrumentation (WMI) protocol, all you need to do is a machine that has the MAP Toolkit 3.1 installed, the right set of administrative credentials to the “target machines” (i.e. the machines you want the MAP Toolkit to inventory and assess), as well as other WMI requirements here. The MAP Toolkit will then remotely ping each machine across your network securely all without installing any software agents on the individual target machines. Therefore, the MAP Toolkit is completely agent-less with zero foot-print!

Where do I go to get the MAP Toolkit 3.1 and learn more about it?
· Download the MAP Toolkit 3.1: http://go.microsoft.com/fwlink/?LinkId=111000
· Learn more on TechNet: http://www.microsoft.com/MAP
· Read tips and tricks: http://blogs.technet.com/MAPBLOG
What else should I leverage to accelerate the planning, deployment, and operation of Hyper-V?
To help you accelerate the entire lifecycle of your virtualization project, the Microsoft Solution Accelerators team has developed tools and guidance including Microsoft Assessment and Planning Toolkit 3.1, Infrastructure Planning and Design Guides for Virtualization (including guides for Hyper-V, App-V, Terminal Services, and SCVMM 2008), Windows Server 2008 Security Guide, Microsoft Deployment Toolkit, and Offline Virtual Machine Servicing Tool.
Check out the latest Virtualization Solution Accelerators at: http://www.microsoft.com/VSA
My name is Ronald Beekelaar. I'm a Microsoft MVP of Virtual Machine Technology, based in Amsterdam. I have my own consultancy firm, and since 2002 I focus on virtualization. At first, this was strictly VMware-oriented, but a few years later this included Microsoft's virtualization products as well.
Since the first public beta of Hyper-V more than a year ago, I have done many presentations about Hyper-V at various events, and talked to a lot of customers about transitioning to Hyper-V. The people I talk to can be divided into two groups: they either have experience with Microsoft Virtual PC and Virtual Server, or they only know the VMware products and are just now looking into Hyper-V. However, for both groups, and despite very different opinions, there are five topics that always come up in discussions. Below is my list of the top-5 things you should know and understand about Hyper-V.
5) Understand the hypervisor model and performance consequences.
This is especially a big one for people that know Virtual PC and Virtual Server. The virtualization model that Hyper-V uses is very different from the model that Virtual PC and Virtual Server use. The Hyper-V model allows for much better I/O performance of virtual machines. This is mainly due to the new 64-bit hypervisor layer underneath everything - including the host operating system even, and the new high-speed VMBus "synthetic" drivers that run in the virtual machines.
Particularly- the use of optimized synthetic disk and network drivers talking to the VMBus, instead of using normal "hardware-oriented" drivers, make for a much faster I/O path from applications inside the Hyper-V virtual machines to the physical hardware. To make use of these synthetic drivers, make sure you use an operating system inside the virtual machines for which Microsoft provides so-called Integration Components. When you install the Integration Components, the synthetic drivers are installed as well.
Please see Microsoft Knowledge Base article 954958 for the list of operating systems in which you can install Integration Components.
4) Understand the use of snapshots
Snapshots in Hyper-V are very different from those found in Virtual PC and Virtual Server. Snapshots in Hyper-V allow you to save the current point-in-time state of your running or non-running virtual machine, and later come back to that particular state. Great for testing, troubleshooting and roll-back of virtual machine state.
This comes in the place of undo-disks, save-state, and to some extend even differencing disks with Virtual PC and Virtual Server.
Make sure you understand the power of snapshots and the scenarios where you should not roll-back the state of your virtual machine. Any scenario with a distributed database (such as domain controllers) is not a good candidate for snapshotting.
3) How to use Quick Migration
No discussion on virtualization can be complete without addressing fail-over support and virtual machine management. That is topic 3 and 2 in the list.
It doesn't take long to realize that any time you run multiple virtual machines on the same physical Hyper-V server, you have to think about how to handle the scenario where you have to do maintenance on the physical server (planned), or worse what happens when the physical server suddenly stops working due to loss of power or similar (unplanned).
For both the planned and unplanned scenarios, Hyper-V has support of host clustering. Windows Server 2008 clustering treats virtual machines as fully-managed clustered resources. For fail-over, clustering moves the
virtual machine from one node to another node. In Hyper-V terminology this is called Quick Migration. Due to the use of shared storage, only the content of the memory of the running virtual machine is copied to the other node.
2) Consider System Center Virtual Machine Manager
Virtual machines created with Hyper-V need to be managed as well. Enter System Center Virtual Machine Manager 2008. With Virtual Machine Manager you can simplify lots of tasks related to virtual machine management. This includes easier virtual host cluster support, automatically provisioning new virtual machines based on templates (including taking care of the "sysprep" part to make multiple virtual machines from the same template unique on the network), and an straightforward physical-to-virtual (P2V) conversion
process to move existing physical computers on to Hyper-V as virtual machines.
Interestingly enough, SCVMM 2008 can manage Hyper-V servers, Virtual Server, and even VMware ESX virtualized infrastructure, and even comes with a nifty virtual-to-virtual (V2V) option to move existing VMware virtual machines to Hyper-V.
As you would expect of a new server product from Microsoft, SCVMM 2008 fully supports automation with PowerShell.
1) Hyper-V can run on Server Core Installation
The number one thing to know about Hyper-V is the fact that it can run perfectly well on a Server Core Installation of Windows Server 2008. This means that on the physical server, you only need to install the absolute minimum "host OS,", and still have the full Hyper-V functionality. Having less moving parts and services running on the Hyper-V computer is, naturally, very beneficial to reduce the number of times you need to patch the server, and reduces the possible attack surface exposed to the network.
For any serious production installation of Hyper-V, and for any serious comparison with VMware ESX, being able to run Hyper-V on a Windows Server 2008 Core Installation is essential.
Ronald
Video: Ronald Beekelaar on Virtualization
Filed under: Application Virtualization, ESX, Management tools, Microsoft Application Virtualization, MVP Summit, System Center, System Center Virtual Machine Manager, virtualization management, VMM 2008, VMWare, Windows Server 2008, Hyper-V, virtualization, virtual machine
Continuing with yesterday's theme... on the first day of "Virt-Mas" my true love brought to me - 3,500 BMW dealerships that will be deploying Windows Server 2008 Hyper-V later this year.
Before sharing BMW's story, I first wanted to say "thanks" to Mark and Dugie for their comments to me today. And Frank at QLogic launched a Web page today where you can learn more about their benchmark measuring QLogic HBA and Hyper-V performance. Their results surpass VMware's May 2008 test, which may surprise some people. Now onto BMW ...
Unless you read German and troll the German newswires, you probably missed Microsoft's news release on a project that BMW is deploying to 3,500 dealerships around the world built on the Windows platform. I don't speak German ["Ich spreche nicht Deutsch"], but a colleague in MS-Germany translated the announcement for me. Following is a translation of some of the news release:
Microsoft Consulting Services has developed a retail server platform based on Windows Server 2003 and Virtual Server 2005 for a globally operating automobile manufacturer. The solution permits the rollout of new applications and services in a typical branch office infrastructure, while ensuring a high degree of standardization, a minimum of operating effort, and the necessary system security. These requirements count among the major challenges in the contract dealer and franchise environments, where operators traditionally tend to operate more independently. Dealers’ customers – and their own employees – profit from optimized advisory procedures, shorter waiting times, and improved quality of advice.
The use of virtualization technology allows the corresponding multiprocessor hardware to be utilized flexibly. It also guarantees a high degree of security against failure, while at the same time reducing the amount of testing necessary for simultaneous use of different applications. With the help of Microsoft Forefront Intelligent Application Gateway 2007, a remote access solution has been implemented that allows access to 3rd level support in the heterogeneous network structures of the workshops while taking into account the high data protection requirements of the dealers.
The BMW group is relying on the Microsoft server platform to underpin its rollout of a new hardware and application infrastructure for its more than 3,500 service operations worldwide. This infrastructure is known as the Integrated Service Infrastructure Server (ISIS). Based on the platform, premium aftersales services will be offered that are standardized across the globe. This rollout will be completed in the first quarter of 2008.
An upgrade to the 64-bit Windows Server 2008 with Microsoft's new Hyper-V virtualization technology is already planned, in order to utilize the performance capabilities of the hardware to an even greater extent. BMW also plans to roll out the SQL Server and BizTalk Server in the course of this migration. SQL Server 2005 allows the platform to be laid out in a more homogeneous fashion, while the use of BizTalk Server 2006 represents a significant steps towards a uniform modular front-end, including the optimization of processes and the integration of various backends.
In short, BMW's Integrated Service Infrastrructure Server will be the technology architecture for after-sales service at 3,500 BMW dealerships around the world. I do recall seeing a slogan that BMW uses/used with this project. It was something like, "the first car was sold my marketing; the second by services." Here's a few other details that didn't make the news release:
-
On average, dealers will have 2 servers and roughly 20 client devices per location, which they will use for everything from sourcing spare parts to accessing diagnostic manuals and consulting customer service policies.
-
BMW is initially using Virtual Server 2005 R2 (on Windows Server 2003 EE) to consolidate and run .NET-based applications, business process integration and other applications on each server.
-
BMW is using System Center Operations Manager; no word if they'll use SCVMM 2007/2008.
So what's my point? Why does anyone care about a deployment using Virtual Server the day AFTER we released Hyper-V? I'm interested to hear your thoughts. Here are mine:
-
if you're a Virtual Server customer, now you know that there's someone else who has plans to move a large # of Virtual Server-based VHDs to Hyper-V
-
server virtualization (be it Type 1 or Type 2) is great, but it's just part of the architecture needed to deploy their new after-sales service. As a colleague always tells me, "a hypervisor by itself can't even run calculator; you need apps and an OS to do something." For BMW, it's handy that the hypervisor can come from the same vendor as the applications, dev tools, management tools and OS.
-
if you're an SI partner (perhaps going to
WW Partner Conference next month), it represents a services opportunity to help customers design their architectures, virtualize packaged and custom apps, and integrate those with other systems.
-
If you're a VMW shareholder, that's approx. 28,000 VMs that will be running on Hyper-V in the near future ;-)
11 more days until Hyper-V available via Windows Update (WU). Have a good weekend.
Patrick
It’s Christmas in July…
As you may have heard, Windows Server 2008 Hyper-V was released today, and is now available to download. July 8th will mark Hyper-V’s Release to Windows Update. You may remember when we released the first Hyper-V beta, it was right around Christmas. We’re bringing the joy of the holidays back to you with the “12 Days of Virt-Mas.”
And so, let’s make merry…
In celebration of the Hyper-V news, and as part of the “12 days of Virt-Mas” countdown to Hyper-V availability I, along with some of the other Hyper-V product managers, will be posting daily spotlights on specific features and benefits of Hyper-V technology beginning tomorrow. We might also throw in the occasional guest blogger or customer story (like Microsoft’s own deployment and results with Hyper-V as showcased today in Rob Emanuel’s guest blog and video) Because it’s virtualization, there’s no need to worry about any of us running out of things to share- it is the season of giving.
I’ll be back tomorrow to bring you the 1st day of “Virt-Mas.” Stay tuned…
Patrick
Virtualization Nation,
Greetings! Quick note today. :-)
If you are looking for some good performance oriented information on Hyper-V please check out Tony Voellm's blog. Tony is the Hyper-V Performance Team Lead, Performance Architect, Performance Nut, you get the idea... His blog is here: http://blogs.msdn.com/tvoellm/archive/tags/Hyper-V/default.aspx
Some recent posts have included:
- Hyper-V Performance FAQ
- Performance Counter Details
- Performance oriented bugs (memory, timers, …)
The goal of the blog is to put the technical side to performance and help users understand the system and what happens under the covers.
When we ship the final Hyper-V RTM, Tony will update the blog...
Cheers, -Jeff
I have been posting on the Virtualization Team Blog for the last month or so now and it’s been a blast! From the comments on the posts and the e-mails I have been getting it seems like the content is helpful – which is great! So I have started my own blog http://blogs.msdn.com/taylorb, I have replicated all of the posts to that blog and have started adding new posts! This will make it much easier for me to respond to comments and inquires from all of you, so ask away… I will do summery posts to this blog with links to the content on my blog for a while to ensure that everyone that is interested can get subscribed and what not…
I just wrote Hyper-V WMI – Configuring Automatic Startup/Shutdown/Recovery Action’s For Virtual Machines at http://blogs.msdn.com/taylorb so check it out and let me know what topic’s you want for future posts…
Thank’s and Happy Virtualizing!
Taylor Brown
Hyper-V Integration Test Lead
http://blogs.msdn.com/taylorb

The SCVMM (System Center Virtual Machine Manager) team has released an update to Virtual Machine Manager 2008 beta for Hyper-V RC1. Instructions to download and install the update can be found on Clive Watson’s blog at SCVMM 2008 beta (Update for Hyper-V RC1).
Enjoy and Happy Virtualizing!
- Taylor Brown
- Hyper-V Test Team

I'm NOT in Orlando this week attending TechEd IT Pro conference. That means I get to enjoy Redmond's "wintery" spring weather and not Orlando's hot/humid thunderstorms. For those of you also NOT in Orlando, you can follow along with the happenings at a few spots:
- Scott Lowe's blog, focus on virtualization (and expect comparisons to VMware's tools)
- Margie Semilof from Techtarget will be publishing articles
- Go here for blog roll and a bunch of news sources from the conference
I'll point out a few cool items from today's keynote:
- You can now get cooperative technical support from Microsoft and four (initial) vendors [Citrix, Novell, Sun, Virtual Iron] when running Windows Server 2008 (or 2003, or 2000). How so? Microsoft's Server Virtualization Validation Program is now operational and vendors have begun validating their configs. So you'll soon see additional vendor names added to KB article 944987. This program is only intended for the dozen or so vendors that make/sell their own Type 1 or Type 2 hypervisor, and want their customers to receive technical support from them and Microsoft.
- MS Application Virtualization (formerly SoftGrid) 4.5 Release Candidate will be available by the end of June. And interestingly enough it's been almost 2 years since the Softricity acquisition. Tim Mangan blogged about this over at BrianMadden.com.
- Double-Take, an ISV partner, announced that their GeoCluster technology will run on Hyper-V once the latter is released. GeoCluster works with Windows Server 2008 failover clustering, and offers somethign that VMware can't.
- Forefront Client Security is adding host and guest VM support for Hyper-V upon its release. See more here.
Enjoy,
Patrick
I have officially given up on the “Hyper-V WMI Using PowerShell Scripts” serious, not because of lack of interest but because or extreme interest implying that I would need to do Part 5, 6, 7, 99… Counting past 5 is hard so from now on I will just title the posts for what they are doing. Today’s post is going to be an end-to-end script to create 10 clones of a given VM.
Here’s a quick tour of the script…
This script takes 4 parameters:
MasterVM – this is the name of the VM that will be cloned
Path – this is the base path where the clones will reside
NewName – this is what the cloned VM’s will be named
HyperVHost – this is the name of the host that the script will execute against
The function ProcessWMIJob takes the return of a WMI method call and then processes the job waiting for the job to complete and throwing an exception if the job failed.
The main part of the script retrieves the Msvm_VirtualSystemManagmentService class and the MasterVM’s Msvm_ComputerSystem. It then loops 10 times, first changing the name of the VM and then exporting the VM and finally re-importing the VM. After it completes the 10 interactions it restores the name of original name of the MasterVM.
param
(
[string]$MasterVM = $(Throw "MasterVM required"),
[string]$Path = $(Throw "Path required"),
[string]$NewName = "VMCopy",
[string]$HyperVHost = "localhost"
)
function ProcessWMIJob
{
param
(
[System.Management.ManagementBaseObject]$Result
)
if ($Result.ReturnValue -eq 4096)
{
$Job = [WMI]$Result.Job
while ($Job.JobState -eq 4)
{
Write-Progress -Id 2 -ParentId 1 $Job.Caption -Status "Executing" -PercentComplete $Job.PercentComplete
Start-Sleep 1
$Job.PSBase.Get()
}
if ($Job.JobState -ne 7)
{
Write-Error $Job.ErrorDescription
Throw $Job.ErrorDescription
}
}
elseif ($Result.ReturnValue -ne 0)
{
Throw $Result.ReturnValue
}
Write-Progress $Job.Caption -Status "Completed" -PercentComplete 100 -Id 2 -ParentId 1
}
#Main Script Body
$VMManagementService = Get-WmiObject -Namespace root\virtualization -Class Msvm_VirtualSystemManagementService -ComputerName $HyperVHost
$SourceVm = Get-WmiObject -Namespace root\virtualization -Query "Select * From Msvm_ComputerSystem Where ElementName='$MasterVM'" -ComputerName $HyperVHost
$a = 0
while ($a -lt 10) {
write-progress -Id 1 "Cloning Vm's" -Status "Executing" -percentcomplete (($a / 10)*100)
$tempVMName = "$NewName - $a"
$VMSettingData = Get-WmiObject -Namespace root\virtualization -Query "Associators of {$SourceVm} Where ResultClass=Msvm_VirtualSystemSettingData AssocClass=Msvm_SettingsDefineState" -ComputerName $HyperVHost
$VMSettingData.ElementName = $tempVMName
$Result = $VMManagementService.ModifyVirtualSystem($SourceVm, $VMSettingData.PSBase.GetText(1))
ProcessWMIJob $Result
$Result = $VMManagementService.ExportVirtualSystem($SourceVm, $TRUE, "$Path")
ProcessWMIJob $Result
$Result = $VMManagementService.ImportVirtualSystem("$Path\$tempVMName", $TRUE)
ProcessWMIJob $Result
$a ++
}
write-progress -Id 1 -Completed $TRUE -Activity "Cloning Vm's"
$VMSettingData = Get-WmiObject -Namespace root\virtualization -Query "Associators of {$SourceVm} Where ResultClass=Msvm_VirtualSystemSettingData AssocClass=Msvm_SettingsDefineState" -ComputerName $HyperVHost
$VMSettingData.ElementName = $MasterVM
$Result = $VMManagementService.ModifyVirtualSystem($SourceVm, $VMSettingData.PSBase.GetText(1))
ProcessWMIJob $Result
- Taylor Brown
- Hyper-V Test Team
