May, 2009

  • Windows Virtualization Team Blog

    Hyper-V R2 Import/Export – Part 6 - So, what happened to Configuration-only export?

    • 16 Comments

    There have been multiple customers who have voiced concern that the Configuration-only export feature is gone. It has not. Configuration-only export is still very much present in Hyper-V in R2. It just so happens that we have taken the option out from the UI. The user can still utilize this capability via the API.

    This brings us to the next question: “Why did you take it out of the UI?” The main motivation behind taking it out of the UI is that the user would not be able to easily import such a VM through the UI. Given our import UI, there is no way for the user to specify the locations of the VHD files during import. Ideally, we would have had an import wizard or the like where the user could specify the location of all the VHD files before launching the import process. However, short of that, it is best not to expose any of that functionality via the UI.

    The ability to do a configuration-only export of a VM is available via SCVMM R2, which is built to use the new API. However, if you are not using SCVMM, you can script against that API. Here are a couple of sample scripts (VBScript) for doing the configuration-only export of a VM and for importing that VM. Many thanks to Madhan Gajendran and Dinesh Kumar Govindasamy for writing these scripts:

    Exporting config-only

    option explicit 
     
    dim objWMIService
    dim managementService
    dim fileSystem
     
    const JobStarting = 3
    const JobRunning = 4
    const JobCompleted = 7
    const wmiStarted = 4096
    const wmiSuccessful = 0
     
    Main()
     
     
    '-----------------------------------------------------------------
    ' Main
    '-----------------------------------------------------------------
    Sub Main()
     
        dim computer, objArgs, vmName, vm, exportDirectory
        
        set fileSystem = Wscript.CreateObject("Scripting.FileSystemObject")
        computer = "."
        set objWMIService = GetObject("winmgmts:\\" & computer & "\root\virtualization")
        set managementService = objWMIService.ExecQuery("select * from Msvm_VirtualSystemManagementService").ItemIndex(0)
        
        set objArgs = WScript.Arguments
        if WScript.Arguments.Count = 2 then
            vmName = objArgs.Unnamed.Item(0)
            exportDirectory = objArgs.Unnamed.Item(1)
        else
            WScript.Echo "usage: cscript ExportVirtualSystemEx.vbs vmName exportDirectoryName"
            WScript.Quit(1)
        end if
        
        set vm = GetComputerSystem(vmName)
     
        if ExportVirtualSystemEx(vm, exportDirectory) then
            WriteLog "Done"
            WScript.Quit(0)
        else
            WriteLog "ExportVirtualSystemEx Failed."
            WScript.Quit(1)
        end if
    End Sub
     
    '-----------------------------------------------------------------
    ' Retrieve Msvm_VirtualComputerSystem from base on its ElementName
    '-----------------------------------------------------------------
    Function GetComputerSystem(vmElementName)
        On Error Resume Next
        dim query
        query = Format1("select * from Msvm_ComputerSystem where ElementName = '{0}'", vmElementName)
        set GetComputerSystem = objWMIService.ExecQuery(query).ItemIndex(0)
        if (Err.Number <> 0) then
            WriteLog Format1("Err.Number: {0}", Err.Number)
            WriteLog Format1("Err.Description:{0}",Err.Description)
            WScript.Quit(1)
        end if
    End Function
     
    '-----------------------------------------------------------------
    ' Export a virtual system
    '-----------------------------------------------------------------
    Function ExportVirtualSystemEx(computerSystem, exportDirectory)
     
        dim objInParam, objOutParams 
        dim query
        dim computer
        dim exportSettingData
     
        ExportVirtualSystemEx = false
        
        if Not fileSystem.FolderExists(exportDirectory) then
            fileSystem.CreateFolder(exportDirectory)
        end if
        
        set objInParam = managementService.Methods_("ExportVirtualSystemEx").InParameters.SpawnInstance_()
        objInParam.ComputerSystem = computerSystem.Path_.Path
     
        query = Format1("ASSOCIATORS OF {{0}} WHERE resultClass = Msvm_VirtualSystemExportSettingData", computerSystem.Path_.Path)
        set exportSettingData = objWMIService.ExecQuery(query).ItemIndex(0)
     
        'Dont copy the VHDs and AVHDs, but copy the Saved state information and Snapshot configurations if present
        exportSettingData.CopyVmStorage = false
        exportSettingData.CopyVmRuntimeInformation = true
        exportSettingData.CreateVmExportSubdirectory = true
        exportSettingData.CopySnapshotConfiguration = 0
     
        objInParam.ExportSettingData = exportSettingData.GetText_(1)
     
        objInParam.ExportDirectory = exportDirectory
        
        set objOutParams = managementService.ExecMethod_("ExportVirtualSystemEx", objInParam)
     
        if objOutParams.ReturnValue = wmiStarted then
            if (WMIJobCompleted(objOutParams)) then
                ExportVirtualSystemEx = true
            end if
        elseif (objOutParams.ReturnValue = wmiSuccessful) then
            ExportVirtualSystemEx = true
        else
            WriteLog Format1("ExportVirtualSystemEx failed with ReturnValue {0}", objOutParams.ReturnValue)
        end if
     
    End Function
     
    '-----------------------------------------------------------------
    ' Handle wmi Job object
    '-----------------------------------------------------------------
    Function WMIJobCompleted(outParam)
        
        dim WMIJob, jobState
     
        set WMIJob = objWMIService.Get(outParam.Job)
     
        WMIJobCompleted = true
     
        jobState = WMIJob.JobState
     
        while jobState = JobRunning or jobState = JobStarting
            WriteLog Format1("In progress... {0}% completed.",WMIJob.PercentComplete)
            WScript.Sleep(1000)
            set WMIJob = objWMIService.Get(outParam.Job)
            jobState = WMIJob.JobState
        wend
     
        if (jobState <> JobCompleted) then
            WriteLog Format1("ErrorCode:{0}", WMIJob.ErrorCode)
            WriteLog Format1("ErrorDescription:{0}", WMIJob.ErrorDescription)
            WMIJobCompleted = false
        end if
     
    End Function
     
    '-----------------------------------------------------------------
    ' Create the console log files.
    '-----------------------------------------------------------------
    Sub WriteLog(line)
        dim fileStream
        set fileStream = fileSystem.OpenTextFile(".\ExportVirtualSystemExLog.log", 8, true)
        WScript.Echo line
        fileStream.WriteLine line
        fileStream.Close
     
    End Sub
     
    '------------------------------------------------------------------------------
    ' The string formating functions to avoid string concatenation.
    '------------------------------------------------------------------------------
    Function Format2(myString, arg0, arg1)
        Format2 = Format1(myString, arg0)
        Format2 = Replace(Format2, "{1}", arg1)
    End Function
     
    '------------------------------------------------------------------------------
    ' The string formating functions to avoid string concatenation.
    '------------------------------------------------------------------------------
    Function Format1(myString, arg0)
        Format1 = Replace(myString, "{0}", arg0)
    End Function

     

    Importing a VM that was exported config only 

    The VM exported above can be imported via the following script. Please note that what this script does is to provide a fine-grained control over the different parameters of import and thus can be used for importing a VM regardless of how it was exported (config-only or with VHDs). It just so happens that it is particularly useful for importing a VM that was exported config-only.

    option explicit 
     
    dim objWMIService
    dim managementService
    dim switchService
    dim fileSystem
     
    const JobStarting = 3
    const JobRunning = 4
    const JobCompleted = 7
    const wmiStarted = 4096
    const wmiSuccessful = 0
     
    Main()
     
    '-----------------------------------------------------------------
    ' Main
    '-----------------------------------------------------------------
    Sub Main()
        dim computer, objArgs, importDirectory, generateNewID
        
        set fileSystem = Wscript.CreateObject("Scripting.FileSystemObject")
        computer = "."
        set objWMIService = GetObject("winmgmts:\\" & computer & "\root\virtualization")
        set managementService = objWMIService.ExecQuery("select * from Msvm_VirtualSystemManagementService").ItemIndex(0)
        set switchService = objWMIService.ExecQuery("select * from Msvm_VirtualSwitchManagementService").ItemIndex(0)
     
        
        set objArgs = WScript.Arguments
        if WScript.Arguments.Count = 1 then
            importDirectory = objArgs.Unnamed.Item(0)
        else
            WScript.Echo "usage: cscript ImportVirtualSystemEx-ConfigOnly.vbs importDirectoryName"
            WScript.Quit(1)
        end if
       
        if ImportVirtualSystemEx(importDirectory) then
            WriteLog "Done"
            WScript.Quit(0)
        else
            WriteLog "ImportVirtualSystemEx Failed."
            WScript.Quit(1)
        end if
    End Sub
     
     
    '-----------------------------------------------------------------
    ' GetVirtualSystemImportSettingData from a directory
    '-----------------------------------------------------------------
    Function GetVirtualSystemImportSettingData(importDirectory)
     
        dim objInParam, objOutParams    
     
        set objInParam = managementService.Methods_("GetVirtualSystemImportSettingData").InParameters.SpawnInstance_()
        objInParam.ImportDirectory = importDirectory
     
        set objOutParams = managementService.ExecMethod_("GetVirtualSystemImportSettingData", objInParam)
        
        if objOutParams.ReturnValue = wmiStarted then
            if (WMIJobCompleted(objOutParams)) then
                set GetVirtualSystemImportSettingData = objOutParams.ImportSettingData
            end if
        elseif objOutParams.ReturnValue = wmiSuccessful then
            set GetVirtualSystemImportSettingData = objOutParams.ImportSettingData
        else
            WriteLog Format1("GetVirtualSystemImportSettingData failed with ReturnValue {0}", objOutParams.ReturnValue)
        end if
     
    End Function
    '-----------------------------------------------------------------
    ' ImportVirtualSystem from a directory
    '-----------------------------------------------------------------
    Function ImportVirtualSystemEx(importDirectory)
     
        dim objInParam, objOutParams
        dim newDataRoot
        dim importSettingData
        dim newSourceResourcePaths, newTargetNetworkConnections, newSwitch    
     
        'Resources in newSourceResourcePaths below should be existing. Fill this with the resources corresponding to those in CurrentResourcePaths
        newSourceResourcePaths = Array(1)
        newSourceResourcePaths(0) = importDirectory & "\VM.vhd"
     
        ImportVirtualSystemEx = false
        set objInParam = managementService.Methods_("ImportVirtualSystemEx").InParameters.SpawnInstance_()
        objInParam.ImportDirectory = importDirectory
     
        set importSettingData = GetVirtualSystemImportSettingData(importDirectory)
        importSettingData.GenerateNewId = true
        importSettingData.CreateCopy = false
        importSettingData.Name = "NewSampleVM-ConfigOnlyImport"
        importSettingData.SourceResourcePaths = newSourceResourcePaths
        importSettingData.Put_
     
        objInParam.ImportSettingData = importSettingData.GetText_(1)
        
        set objOutParams = managementService.ExecMethod_("ImportVirtualSystemEx", objInParam)
     
        if objOutParams.ReturnValue = wmiStarted then
            if (WMIJobCompleted(objOutParams)) then
                ImportVirtualSystemEx = true
            end if
        elseif objOutParams.ReturnValue = wmiSuccessful then
            ImportVirtualSystemEx = true
        else
            WriteLog Format1("ImportVirtualSystemEx failed with ReturnValue {0}", objOutParams.ReturnValue)
        end if
     
    End Function
     
     
    '-----------------------------------------------------------------
    ' Handle wmi Job object
    '-----------------------------------------------------------------
    Function WMIJobCompleted(outParam)
     
        dim WMIJob, jobState
     
        set WMIJob = objWMIService.Get(outParam.Job)
     
        WMIJobCompleted = true
     
        jobState = WMIJob.JobState
     
        while jobState = JobRunning or jobState = JobStarting
            WriteLog Format1("In progress... {0}% completed.",WMIJob.PercentComplete)
            WScript.Sleep(1000)
            set WMIJob = objWMIService.Get(outParam.Job)
            jobState = WMIJob.JobState
        wend
     
        if (jobState <> JobCompleted) then
            WriteLog Format1("ErrorCode:{0}", WMIJob.ErrorCode)
            WriteLog Format1("ErrorDescription:{0}", WMIJob.ErrorDescription)
            WMIJobCompleted = false
        end if
     
    End Function
     
    '-----------------------------------------------------------------
    ' Create the console log files.
    '-----------------------------------------------------------------
    Sub WriteLog(line)
        dim fileStream
        set fileStream = fileSystem.OpenTextFile(".\ImportVirtualSystemEx-ConfigOnly.log", 8, true)
        WScript.Echo line
        fileStream.WriteLine line
        fileStream.Close
     
    End Sub
     
    '------------------------------------------------------------------------------
    ' The string formating functions to avoid string concatenation.
    '------------------------------------------------------------------------------
    Function Format1(myString, arg0)
        Format1 = Replace(myString, "{0}", arg0)
    End Function
  • Windows Virtualization Team Blog

    Hyper-V R2 Import/Export – Part 5 – Import code sample

    • 2 Comments

    In the following sample, we do a basic import of a VM using the new Import API. This script essentially does what the import UI does; it assumes all the necessary files are present in the import folder and imports from that directory. In a later blog, there will be a sample that will utilize the fine grained capabilities of import in Hyper-V R2. Many thanks to Madhan Gajendran and Dinesh Kumar Govindasamy again for writing this script:

    option explicit 
     
    dim objWMIService
    dim managementService
    dim fileSystem
     
    const JobStarting = 3
    const JobRunning = 4
    const JobCompleted = 7
    const wmiStarted = 4096
    const wmiSuccessful = 0
     
    Main()
     
    '-----------------------------------------------------------------
    ' Main
    '-----------------------------------------------------------------
    Sub Main()
        dim computer, objArgs, importDirectory, generateNewID
        
        set fileSystem = Wscript.CreateObject("Scripting.FileSystemObject")
        computer = "."
        set objWMIService = GetObject("winmgmts:\\" & computer & "\root\virtualization")
        set managementService = objWMIService.ExecQuery("select * from Msvm_VirtualSystemManagementService").ItemIndex(0)
        
        set objArgs = WScript.Arguments
        if WScript.Arguments.Count = 1 then
            importDirectory = objArgs.Unnamed.Item(0)
        else
            WScript.Echo "usage: cscript ImportVirtualSystemEx.vbs importDirectoryName"
            WScript.Quit(1)
        end if
       
        if ImportVirtualSystemEx(importDirectory) then
            WriteLog "Done"
            WScript.Quit(0)
        else
            WriteLog "importDirectory Failed."
            WScript.Quit(1)
        end if
    End Sub
     
    '-----------------------------------------------------------------
    ' GetVirtualSystemImportSettingData from a directory
    '-----------------------------------------------------------------
    Function GetVirtualSystemImportSettingData(importDirectory)
     
        dim objInParam, objOutParams    
     
        set objInParam = managementService.Methods_("GetVirtualSystemImportSettingData").InParameters.SpawnInstance_()
        objInParam.ImportDirectory = importDirectory
     
        set objOutParams = managementService.ExecMethod_("GetVirtualSystemImportSettingData", objInParam)
        
        if objOutParams.ReturnValue = wmiStarted then
            if (WMIJobCompleted(objOutParams)) then
                set GetVirtualSystemImportSettingData = objOutParams.ImportSettingData
            end if
        elseif objOutParams.ReturnValue = wmiSuccessful then
            set GetVirtualSystemImportSettingData = objOutParams.ImportSettingData
        else
            WriteLog Format1("ImportVirtualSystem failed with ReturnValue {0}", objOutParams.ReturnValue)
        end if
     
    End Function
    '-----------------------------------------------------------------
    ' ImportVirtualSystem from a directory
    '-----------------------------------------------------------------
    Function ImportVirtualSystemEx(importDirectory)
     
        dim objInParam, objOutParams
        dim newDataRoot
        dim importSettingData, copyDir, fileSysObj
     
        ImportVirtualSystemEx = false    
            
        newDataRoot = importDirectory & "\NewCopy" 
        
        'Path in newDataRoot folder should be existing
        set fileSysObj  = CreateObject("Scripting.FileSystemObject")
        if fileSysObj.FolderExists(newDataRoot) then
        fileSysObj.DeleteFolder(newDataRoot)        
        end if
        copyDir = fileSysObj.CreateFolder(newDataRoot) 
        
        set objInParam = managementService.Methods_("ImportVirtualSystemEx").InParameters.SpawnInstance_()
        objInParam.ImportDirectory = importDirectory
     
        set importSettingData = GetVirtualSystemImportSettingData(importDirectory)
        importSettingData.GenerateNewId = true
        importSettingData.CreateCopy = true
        importSettingData.Name = "NewSampleVM"
        importSettingData.TargetVmDataRoot = newDataRoot
        importSettingData.TargetSnapshotDataRoot = newDataRoot
        importSettingData.TargetVhdDataRoot = newDataRoot
        importSettingData.Put_
     
        objInParam.ImportSettingData = importSettingData.GetText_(1)
        
        set objOutParams = managementService.ExecMethod_("ImportVirtualSystemEx", objInParam)
     
        if objOutParams.ReturnValue = wmiStarted then
            if (WMIJobCompleted(objOutParams)) then
                ImportVirtualSystemEx = true
            end if
        elseif objOutParams.ReturnValue = wmiSuccessful then
            ImportVirtualSystemEx = true
        else
            WriteLog Format1("ImportVirtualSystem failed with ReturnValue {0}", objOutParams.ReturnValue)
        end if
     
    End Function
     
     
    '-----------------------------------------------------------------
    ' Handle wmi Job object
    '-----------------------------------------------------------------
    Function WMIJobCompleted(outParam)
     
        dim WMIJob, jobState
     
        set WMIJob = objWMIService.Get(outParam.Job)
     
        WMIJobCompleted = true
     
        jobState = WMIJob.JobState
     
        while jobState = JobRunning or jobState = JobStarting
            WriteLog Format1("In progress... {0}% completed.",WMIJob.PercentComplete)
            WScript.Sleep(1000)
            set WMIJob = objWMIService.Get(outParam.Job)
            jobState = WMIJob.JobState
        wend
     
        if (jobState <> JobCompleted) then
            WriteLog Format1("ErrorCode:{0}", WMIJob.ErrorCode)
            WriteLog Format1("ErrorDescription:{0}", WMIJob.ErrorDescription)
            WMIJobCompleted = false
        end if
     
    End Function
     
    '-----------------------------------------------------------------
    ' Create the console log files.
    '-----------------------------------------------------------------
    Sub WriteLog(line)
        dim fileStream
        set fileStream = fileSystem.OpenTextFile(".\ImportVirtualSystemEx.log", 8, true)
        WScript.Echo line
        fileStream.WriteLine line
        fileStream.Close
     
    End Sub
     
    '------------------------------------------------------------------------------
    ' The string formating functions to avoid string concatenation.
    '------------------------------------------------------------------------------
    Function Format1(myString, arg0)
        Format1 = Replace(myString, "{0}", arg0)
    End Function
  • Windows Virtualization Team Blog

    Hyper-V R2 Import/Export – Part 4 – Export code sample

    • 1 Comments

    In the following sample, we do a basic export of a VM using the new Export API. Here we export a VM with all the data associated with it. In a later blog, I will cover configuration-only export. Many thanks to Madhan Gajendran and Dinesh Kumar Govindasamy from the Hyper-V team for writing this script:

     

    option explicit 
     
    dim objWMIService
    dim managementService
    dim fileSystem
     
    const JobStarting = 3
    const JobRunning = 4
    const JobCompleted = 7
    const wmiStarted = 4096
    const wmiSuccessful = 0
     
    Main()
     
     
    '-----------------------------------------------------------------
    ' Main
    '-----------------------------------------------------------------
    Sub Main()
     
        dim computer, objArgs, vmName, vm, exportDirectory
        
        set fileSystem = Wscript.CreateObject("Scripting.FileSystemObject")
        computer = "."
        set objWMIService = GetObject("winmgmts:\\" & computer & "\root\virtualization")
        set managementService = objWMIService.ExecQuery("select * from Msvm_VirtualSystemManagementService").ItemIndex(0)
        
        set objArgs = WScript.Arguments
        if WScript.Arguments.Count = 2 then
            vmName = objArgs.Unnamed.Item(0)
            exportDirectory = objArgs.Unnamed.Item(1)
        else
            WScript.Echo "usage: cscript ExportVirtualSystemEx.vbs vmName exportDirectoryName"
            WScript.Quit(1)
        end if
        
        set vm = GetComputerSystem(vmName)
     
        if ExportVirtualSystemEx(vm, exportDirectory) then
            WriteLog "Done"
            WScript.Quit(0)
        else
            WriteLog "ExportVirtualSystemEx Failed."
            WScript.Quit(1)
        end if
    End Sub
     
    '-----------------------------------------------------------------
    ' Retrieve Msvm_VirtualComputerSystem from base on its ElementName
    '-----------------------------------------------------------------
    Function GetComputerSystem(vmElementName)
        On Error Resume Next
        dim query
        query = Format1("select * from Msvm_ComputerSystem where ElementName = '{0}'", vmElementName)
        set GetComputerSystem = objWMIService.ExecQuery(query).ItemIndex(0)
        if (Err.Number <> 0) then
            WriteLog Format1("Err.Number: {0}", Err.Number)
            WriteLog Format1("Err.Description:{0}",Err.Description)
            WScript.Quit(1)
        end if
    End Function
     
    '-----------------------------------------------------------------
    ' Export a virtual system
    '-----------------------------------------------------------------
    Function ExportVirtualSystemEx(computerSystem, exportDirectory)
     
        dim objInParam, objOutParams 
        dim query
        dim computer
        dim exportSettingData
     
        ExportVirtualSystemEx = false
        
        if Not fileSystem.FolderExists(exportDirectory) then
            fileSystem.CreateFolder(exportDirectory)
        end if
        
        set objInParam = managementService.Methods_("ExportVirtualSystemEx").InParameters.SpawnInstance_()
        objInParam.ComputerSystem = computerSystem.Path_.Path
     
        query = Format1("ASSOCIATORS OF {{0}} WHERE resultClass = Msvm_VirtualSystemExportSettingData", computerSystem.Path_.Path)
        set exportSettingData = objWMIService.ExecQuery(query).ItemIndex(0)
        exportSettingData.CopyVmStorage = true
        exportSettingData.CopyVmRuntimeInformation = true
        exportSettingData.CreateVmExportSubdirectory = true
        exportSettingData.CopySnapshotConfiguration = 0
        objInParam.ExportSettingData = exportSettingData.GetText_(1)
     
        objInParam.ExportDirectory = exportDirectory
        
        set objOutParams = managementService.ExecMethod_("ExportVirtualSystemEx", objInParam)
     
        if objOutParams.ReturnValue = wmiStarted then
            if (WMIJobCompleted(objOutParams)) then
                ExportVirtualSystemEx = true
            end if
        elseif (objOutParams.ReturnValue = wmiSuccessful) then
            ExportVirtualSystemEx = true
        else
            WriteLog Format1("ExportVirtualSystemEx failed with ReturnValue {0}", objOutParams.ReturnValue)
        end if
     
    End Function
     
    '-----------------------------------------------------------------
    ' Handle wmi Job object
    '-----------------------------------------------------------------
    Function WMIJobCompleted(outParam)
        
        dim WMIJob, jobState
     
        set WMIJob = objWMIService.Get(outParam.Job)
     
        WMIJobCompleted = true
     
        jobState = WMIJob.JobState
     
        while jobState = JobRunning or jobState = JobStarting
            WriteLog Format1("In progress... {0}% completed.",WMIJob.PercentComplete)
            WScript.Sleep(1000)
            set WMIJob = objWMIService.Get(outParam.Job)
            jobState = WMIJob.JobState
        wend
     
        if (jobState <> JobCompleted) then
            WriteLog Format1("ErrorCode:{0}", WMIJob.ErrorCode)
            WriteLog Format1("ErrorDescription:{0}", WMIJob.ErrorDescription)
            WMIJobCompleted = false
        end if
     
    End Function
     
    '-----------------------------------------------------------------
    ' Create the console log files.
    '-----------------------------------------------------------------
    Sub WriteLog(line)
        dim fileStream
        set fileStream = fileSystem.OpenTextFile(".\ExportVirtualSystemExLog.log", 8, true)
        WScript.Echo line
        fileStream.WriteLine line
        fileStream.Close
     
    End Sub
     
    '------------------------------------------------------------------------------
    ' The string formating functions to avoid string concatenation.
    '------------------------------------------------------------------------------
    Function Format2(myString, arg0, arg1)
        Format2 = Format1(myString, arg0)
        Format2 = Replace(Format2, "{1}", arg1)
    End Function
     
    '------------------------------------------------------------------------------
    ' The string formating functions to avoid string concatenation.
    '------------------------------------------------------------------------------
    Function Format1(myString, arg0)
        Format1 = Replace(myString, "{0}", arg0)
    End Function
  • Windows Virtualization Team Blog

    Hyper-V R2 Import/Export – Part 3 – The UI

    • 2 Comments

    Given the rather compressed schedule of Windows Server 2008 R2, we did not have time to get too ambitious with the UI. However, the UI has been modeled to enable the following 3 scenarios:

    1. Export VMs with data

    2. Import VMs with data

    3. Export a snapshot of a VM

    4. Provide the option for copy on import or in-place import

    5. Allow the user to import the VM with a newly generated ID.

    Export UI:

    Here is a screen capture of the Export UI you get when you right-click on a virtual machine in the Hyper-V Manager and click “Export…” :

    clip_image002

    It is still rather rudimentary and allows the user to specify the location to export the VM to. The VM will be exported along with its VHD files and saved state files to the specified folder. You might notice that the check-box for doing a configuration-only export is not there. This is by design, but we do support configuration-only export. More on this topic in a subsequent blogpost.

    Exporting a snapshot:

    To export a snapshot, right-click on the snapshot you want to export (in the snapshots pane that shows up for a selected virtual machine in Hyper-V) and click on “Export…”. It will bring up the Export UI above.

    clip_image004

    Import UI:

    The import UI is launched from the same spot under the Actions pane in Hyper-V manager:

    clip_image006

    In the import UI, check the highlighted checkbox and you will end up copying the VM on import, leaving files in the import directory good for a second import.

    clip_image008

    The other UI elements in the import UI follow the same pattern as in v1: the location for the import directory as well as the option for regenerating the VM’s unique ID. The import UI assumes that all the necessary files for the import to succeed are in the import directory. Ideally, given that the import process has so many fine grained options, we would have had an import wizard to allow the user the full range of choices. However, short of that, the user can script against the APIs to get the functionality they need. There will be a couple of blogs following this with sample scripts that would give the reader a good idea of how to use the APIs.

  • Windows Virtualization Team Blog

    Hyper-V R2 Import/Export – Part 2 - The New Import/Export APIs

    • 7 Comments

    To enable the new functionality of Import/Export we now have new ‘Ex’ versions of the Import/Export APIs along with settings data objects that allow the user to tweak the necessary parameters upon export or import:

    Export:

    Before you run an export, you can get the export parameters associated with a VM in the form of a settings data object. They are populated with default values. You can modify the parameters you need and then call ExportVirtualSystemEx with the modified object passed in.

    ExportVirtualSystemEx: http://msdn.microsoft.com/en-us/library/dd379583(VS.85).aspx

    Export Setting data: http://msdn.microsoft.com/en-us/library/dd379576(VS.85).aspx

    Import:

    Before you run an import, you can get the import parameters for the directory the VM will be imported from. Here, you can tweak interesting parameters like the AzMan security scope, network connections and even paths to VHDs before calling ImportVirtualSystemEx with the modified parameters.

    ImportVirtualSystemEx: http://msdn.microsoft.com/en-us/library/dd379583(VS.85).aspx

    Import Setting data: http://msdn.microsoft.com/en-us/library/dd379577(VS.85).aspx

    While I will not repeat the information in the MSDN documentation, there are some salient points about the API worth calling out:

    Export Settings data (Msvm_VirtualSystemExportSettingData):

    Here is a dump of the parameters from powershell:

    Caption                    : Virtual System Export Setting Data
    CopySnapshotConfiguration  : 0
    CopyVmRuntimeInformation   : True
    CopyVmStorage              : True
    CreateVmExportSubdirectory : False
    Description                : Microsoft Virtual System Export Setting Data
    ElementName                : Microsoft Virtual System Export Setting Data
    InstanceID                 : Microsoft:4919C848-AA71-43B3-A1A5-988242D39FA2
    SnapshotVirtualSystem      :

     

    • CopyVmRuntimeInformation: you can specify if you want to export your saved state files or not. This is particularly useful if you are interested only in the storage associated with VM or if you are moving a VM across processor vendors, the saved state files will be useless as a result and you could live without the 1 or 2 GB worth of memory data on the pipe.
    • CopyVmStorage is the essential parameter that controls config-only export. That is the parameter you want to set to false if you want to do config-only export.
    • CopySnapshotConfiguration and SnapshotVirtualSystem can be used together to export a single snapshot

    Import Settings data (Msvm_VirtualSystemImportSettingData):

    Here is the dump of the parameters from powershell:

    Caption                  : Virtual System Import Setting Data
    CreateCopy               : True
    CurrentResourcePaths     : {C:\7088\blog.vhd}
    Description              : Microsoft Virtual System Import Setting Data
    ElementName              : Microsoft Virtual System Import Setting Data
    GenerateNewId            : True
    InstanceID               : Microsoft:ADDB3F5B-17BF-4AB4-A21F-BF1EE41B0165
    Name                     : blog
    SecurityScope            :
    SourceNetworkConnections :
    SourceResourcePaths      : {C:\blog_VM\runtime\Virtual Hard Disks\blog.vhd}
    SourceSnapshotDataRoot   :
    SourceVhdDataRoot        :
    SourceVmDataRoot         :
    TargetNetworkConnections :
    TargetResourcePaths      :
    TargetSnapshotDataRoot   :
    TargetVhdDataRoot        :
    TargetVmDataRoot         :
     

    Source vs. Target:

    Over here, you can clearly see a larger number of parameters. In particular, there are a number of “Source…” prefixed and “Target...” prefixed parameters. Since we now do a copy on import, you could view the “Source…” prefixed parameters as specifying the “from” location of the copy and the “Target…” prefixed parameters as the “to” location of the copy. The SourceResourcePaths parameter is an array populated with the VHDs associated with the VM. Here the user can specify the locations of the VHDs to copy from. They do not necessarily need to be under the import folder. Correspondingly, the TargetResourcePaths parameter is an array with paths that specify where the VHDs are to be copied to.

    However, if you do not want to do a copy on import, (ie: you set the CreateCopy parameter to false), you do not need to specify any of the “Target…” prefixed parameters. Hyper-V will use the “Source…” prefixed parameters to configure the VM upon import.

    Dataroots vs. ResourcePaths

    On another dimension, you have the dataroots (SourceSnapshotDataRoot, SourceVhdDataRoot, SourceVmDataRoot) and the resourcepaths (SourceResourcePaths and TargetResourcePaths). Say, if all your VHDs reside in a single directory that you want to import from, specifying the SourceVhdDataRoot will be sufficient. Also, if upon import you want all the VHDs to reside in a single folder, just specify the TargetVhdDataRoot and you are done. You do not need to specify each of the TargetResourcePaths. The same logic applies to the (Source/Target)SnapshotDataRoot and (Source/Target)VmDataRoot.

  • Windows Virtualization Team Blog

    Hyper-V R2 Import/Export – Part 1 – The Case for New Import/Export Functionality

    • 4 Comments

    This is the first blog entry of a multi-part series of blogs that addresses Import/Export in Windows Server 2008 R2. This blog talks about the scenarios enabled by the changes made to import/export in R2.

    Ben Armstrong had blogged earlier about the intricacies of Import and Export with v1 Hyper-V in his blog posts:
    http://blogs.msdn.com/virtual_pc_guy/archive/2008/08/26/hyper-v-export-import-part-1.aspx
    http://blogs.msdn.com/virtual_pc_guy/archive/2008/08/27/hyper-v-export-import-part-2.aspx

    Now, the big problem with how import export worked in v1 was that it just did not give the user enough control over the process of exporting and more significantly, importing a VM. Additionally, it was rather unforgiving. I bet many a user has been burnt trying to import a VM a second time only to find out that since he/she had imported it once already, the import folder could not be used anymore.

    So, introducing the R2 version of Import Export: a lot more fine grained control on the entire process as well as added capabilities that are more in tune with user needs. Here is a list of capabilities enabled with the new Import Export functionality:

    1. Copy on Import: The R2 Import/Export APIs now allow the user to specify a location to import to and not use the import directory as the VM's execution directory. Thus, the user can now create a "gold VM", export it once to a file share and then import it multiple times from that file share. This capability ends up enabling a number of scenarios as a result:
      a. Backup-restore: For the users who do not want to use a backup application to backup their VMs, they can use import/Export and can restore the same files multiple times. Additionally, they can now have their backup media as read-only.
      b. Moving/Cloning VMs: The users do not need to do a separate file copy operation in order to move a VM now. They just have to export to a file share and then import it. Additionally, at import time, the user can now specify where to place the VM on the target machine.
    2. Export of a Snapshot: Picture this in the v1 days of Hyper-v: Tester Fred is running a number of tests using virtual machines. During the course of the tests, he takes snapshots at different points in time. Now, after snapshot #5 of 20, he sees a bug. So, he would like the developer to take a look at it. However, he would need to export the entire VM and all its snapshots in order to do that. In R2, he can export snapshot #5 as a separate and independent VM and send it to the developer to debug.
      Additionally, this functionality has enabled another scenario in the IT arena: IT Admin John has a staging environment where he experiments with a number of versions of software in a VM to determine which works best for his scenario. Using R2 Hyper-V, he can create snapshots for each version of the software being tried out. When he determines a version that would work best in his deployment, all he has to do is to export that snapshot and then import it as an independent VM in the production machines.
    3. Fine grained control: In R2, we have a much richer APIs for Export and Import, enabling the user to tweak parameters like VHD paths, network connections and AzMan during import. Additionally, these parameters can be modified regardless of how the export was carried out. In v1, if the users did a full export (ie: export with configuration as well as VHDs), there was little available to the user to tweak upon import. If they exported config only, they had to edit the config.xml file upon import. None of that in R2. All the parameters can now be tweaked via the import APIs. More on this in the following blog
  • Windows Virtualization Team Blog

    VMware FUD Fiasco Part 3...

    • 7 Comments

    Virtualization Nation,

    We were very busy last week with numerous virtualization announcements from TechEd. If you missed them, you should check them out here, here and here. In addition, some of the early reviews of the Windows Server 2008 R2 Release Candidate are coming in and the news is overwhelmingly positive. I'll follow-up on that soon. In the meantime, I'm back with the latest on the VMware FUD Fiasco. (BTW: If you're not sure what I'm talking about you can read Part 1 Here and Part 2 Here.)

    In the latest update on the VMware FUD Fiasco, VMware's Bruce Herndon has responded to my previous two blogs and has brought some data to the discussion. As I have done in the past, I have copied and pasted from the VMware blog and added my response.

    Introducing Bruce Herndon, VMware Benchmarking 

    Let me first introduce myself. I am Bruce Herndon and I manage one of the benchmarking teams at VMware. Our responsibilities include both VMmark and SPECvirt. Let me also state for the record that I am not exactly pleased to be writing on this particular subject in a public venue, but I really have no choice at this point since my team was responsible for the raw footage used in the now infamous "Hyper-V crashes" video posted on YouTube by my colleague in marketing, Scott Drummonds.

    Jeff Woolsey: To recap the timeline of events:

    1. VMware Product Marketing posts a defamatory video on YouTube implying that Hyper-V had something to do with some downtime at MSDN/TechNet (Hyper-V had nothing to do with the downtime, I covered that in my first blog response)
    2. TWO WEEKS PASS with no information provided about the video
    3. In the meantime, VMware Sales Staff emails customers and would be customers to "check out this video" and VMware senior architects Twitter to "check out this video on You Tube"

    .and you're not "exactly pleased"?

    Gosh Bruce, sorry to put you out.

    • Maybe you should have told Scott not to post the video in the first place
    • Maybe you should have told Scott to take down the video two weeks ago
    • Maybe someone in VMware management could have sent you both a quick email pointing out that this isn't how billion dollar companies behave

    I had hoped that this whole kerfuffle.

    Jeff Woolsey: A "kerfuffle" is going to the coffee shop ordering a mocha and getting a latte. A "kerfuffle" is getting your luggage lost at the airport. If the shoe were on the other foot, you wouldn't be using the word "kerfuffle."

    .would quickly die down but it shows little sign of abating. I have been convinced to post some details of this work for a couple of reasons.

    Jeff Woolsey: The fact that you needed to be "convinced" is simply staggering.

    First, many people have rightly objected to the lack of details given in the video. I am the best person to address those concerns. The other reason is to stick up for the fine engineers in my team.

    Jeff Woolsey: It's ironic you're making the point to defend your engineers considering that the authors of the video (your team) have been anonymous/in hiding for two weeks. On the other hand, the Hyper-V team has been anything but anonymous and has been patiently waiting for ANY DETAILS to come through so we can investigate further.

    I simply can not abide the fact that the legitimate questioning of the underlying configuration has evolved into a series of rather strident attacks on the engineering acumen of my team. As you will soon see, they are top-notch.

    Jeff Woolsey: We wouldn't even be having this conversation if VMware hadn't posted this video in the first place. And yes, I said VMware because after two weeks, VMware management is well aware that this video is public and posted by a VMware employee. The fact that VMware management hasn't had the video removed speaks volumes.

    Before I present data, let me provide a bit of background. As a matter of course, my team does extensive testing and analysis of competing products to help understand VMware's position relative to other solutions. I think most would agree that this is simply a good business tactic. Although the results help us sleep well at night, we typically don't publicize them for a variety of reasons. For example, no matter how well the work is done, its credibility will always be suspect to many readers due to the fact it originated with VMware. I certainly understand that. (My preference is to highlight projects that showcase VMware's strengths, such as the excellent DPM video that my team and Scott produced last year.) We were recently asked if we had any interesting material for an internal demo. Since we had been encountering Hyper-V crashes, we produced raw footage of Hyper-V crashing as a response. Someone along the line passed the footage to Scott, who mistakenly believed it was for external release and produced the finished version you see on the web.

    Jeff Woolsey: Bruce, I appreciate the fact that you're providing some insight here, but if this really was a mistake then:

  • Why did TWO WEEKS PASS with next to no details about the video?
  • Why, in the meantime, has VMware Sales Staff been contacting customers and would be customers telling them to "check out this video"?
  • Why have your senior architects been Twittering to "check out this video on You Tube"?
  • Why is this video still public?

    The facts don't add up. Again, the fact that VMware management has let this fiasco continue for weeks speaks volumes.

    Very professional across the board.

    Microsoft: Works With Partners & Customer Focused

  • Microsoft works with thousands of partners around the globe. When we run into issues, we work with our partners and produce solutions for our customers. Sometimes the solution is in Microsoft code, sometime it's not. However, that's not the point. The point is to remain customer focused at all times and provide customer solutions. In any case,

    We don't post videos on You Tube.

    That's not a professional level of discourse for our partners or customers.

    To Bruce Herndon/VMware

    In your blog you state that this issue "shows little sign of abating." This statement implies that you're interested in resolving this matter.

    Finally, something we can agree on.

    If you indeed want to resolve this matter, then:

    1. Take down the video.
    2. Send us a crashdump so we can take a look sooner rather than later. Send the crashdump to your Microsoft Technical Account Manager (TAM). If you need help, let us know and we'll follow-up.
    3. Pledge this won't happen again.

    To Our Customers: Openness & Transparency

    Now that some details have been provided about the configuration and test used, we are actively working to get the identical hardware in place for our own investigation. Let me be crystal clear on our stance from here:

    The Hyper-V team is fanatical about the stability of Hyper-V. If there's an issue, we're not going to hide. We will address the issue and provide a fix. Period.

    We are 100% customer focused and committed to world class support.

    The Next Update On This Topic

    The response above covers the first half of Bruce's blog. The next follow-up response on this topic will cover the second half of Bruce's blog that discusses the technical aspects. Considering it took over two weeks for Scott/Bruce/VMware to provide basic configuration information, I assume you won't mind if we ask for a couple weeks ourselves to set up a similar hardware configuration, attempt a repro and investigate further. When I respond, I'll probably use the keywords "VMware FUD Fiasco Part 4" in the title so it's easy for you to find. That would put my my next follow-up on this matter in the first week of June.

    Until then, we've got plenty more virtualization news for you.

    Cheers,

    Jeff Woolsey

    Principal Group Program Manager

    Windows Server, Hyper-V

  • Windows Virtualization Team Blog

    Native VHD Support in Windows 7

    • 18 Comments

    This blog entry describes the support in Windows 7 and Windows Server 2008 R2 for creating and managing Virtual Hard Disk (VHD) files as a native format, and booting a physical machine from a VHD file.  Native VHD support helps our enterprise customers and developer community use a common image format and common tools to manage and deploy Windows images that run either in Hyper-V virtual machines or on physical machines.

    The Microsoft Virtual Hard Disk file format (VHD) is a publicly available format specification that specifies a virtual hard disk encapsulated in a single file, capable of hosting native file systems and supporting standard disk operations. VHD files are used by Microsoft Windows Server 2008 Hyper-V, Microsoft Virtual Server and Microsoft Virtual PC for virtual disks connected to a virtual machine.   VHDs are useful containers and the VHD file format is also used by Microsoft Data Protection Manager, Windows Server Backup as well as many other Microsoft and Non-Microsoft solutions.  To create a VHD on Windows Server 2008, you install the Hyper-V Server role and use the Hyper-V Manager to create a VHD file, and then install a version of Windows onto a partition in the VHD. 

    Many of our data center customers are transitioning to Hyper-V virtual machines (VMs) for server consolidation and lower energy costs.  While moving an increasing number of applications to virtual machines, they still operate a significant part of the data center on physical machines. Managing the system images that are deployed to physical and virtual machines can be challenging.  IT administrators have to maintain two sets of images: one set based on the WIM format for physical machines, another set based on the VHD format for virtual machines.  What IT administrators need is a common format and toolset to make image management simpler and reduce the number of images to catalog and maintain.

    Developers and testers are using virtual machines to test new system and application software.   Virtual machines provide a convenient, isolated test environment and reduce the need for dedicated test hardware.  But sometimes you need to run tests on a physical machine to access a specific hardware device, like the graphics card, or to get accurate performance profiling.   A common image format that runs on both virtual and physical machines also benefits developers and testers. 

    In this blog entry we are going to look at the goals for supporting VHDs as a native format, how the core operating system supports VHDs, and the key scenarios targeted for native VHD deployment.

    Goals for Native Support for VHDs in Windows Server 2008 R2 and Windows 7

    1. Simplify the experience of creating, managing, and deploying Windows images across both physical and virtual machines using a single image format and common tools.
    2. Enable systems to have multiple instances of Windows installed without using separate disk partitions for more flexibility to change server application workloads as needed.
    3. Enable efficient development and testing for software that requires an isolated test environment using a common image that runs on either a physical or virtual machine.

    Creating and managing VHDs

    Windows 7 simplifies image management by adding support for virtual disks in the disk management tools.  You no longer need to install the Hyper-V Server role and use the Hyper-V Manager console to create VHDs.  The Disk Management console has an action to create a new VHD file, for either a fixed size or dynamically expanding VHD, which is uninitialized.  After creating the VHD file, the Attach VHD action makes the virtual disk available to the system as if you plugged in a hard disk drive. 

    vhd1

    Figure 1. Creating a VHD using the Disk Management console

    After attaching a new virtual disk, you create a partition and format an NTFS volume in the VHD just like a physical disk.  The VHD is ready for a Windows image to be applied to the volume and initialized for boot.

    Server administrators often prefer command line tools, and you can do the same VHD operations using the diskpart command.  Diskpart also accepts a script to automate the steps to create and format a VHD. When a VHD containing a file system volume is attached, Windows automatically recognizes the volume and provides an option to explore the contents.

    vhd2

    Figure 2.  Using the Diskpart command to create a VHD

    Core Storage System Support

    Access to VHD file contents is provided by a completely new mini-port driver in the storage stack for VHD files.  The VHD driver is what enables I/O requests to files in the VHD to be sent down to the host NTFS file system on the physical partition where the VHD file is located.  VHD operations can also be performed on a remote share.

    With Windows Server 2008 R2, Hyper-V now uses the new native support for VHDs in the core operating system.  We have done extensive testing on a wide range of I/O test scenarios and the native VHD support is incredibly efficient.   Read and write performance for different I/O block sizes, for both sequential and random I/O is comparable with physical disk performance.  The following graphs show some of the preliminary results from performance tests comparing throughput to Fixed and Dynamic VHD files in Windows Server 2008 R2 Beta with Windows Server 2008 Hyper-V.   The “Bare Metal” columns show the maximum I/O throughput to the physical disk device without using a VHD file.   Lower write throughput to dynamic VHDs is due to multiple I/Os required to expand the file as new blocks are written to the virtual disk.

    vhd4

     

    vhd5

    Operating system support for VHD as a native format provides opportunities for management ISVs to bring added value to their customers without introducing complexity with new image formats.  There are new Win32 APIs for VHD operations that enable image management tools to support the VHD file format in their management framework. 

    Native VHD Boot

    Native VHD boot enables the seamless transition to virtualization using a single image format that boots on both physical and virtual machines.  Native VHD boot means that the Windows image in a VHD file can boot on a physical machine without starting a Hyper-V virtual machine. VHD image files make it easy for a single physical machine to have multiple instances of the operating system available to boot at any time.   Multiple boot support has been available in Windows for many releases, but required a separate disk partition for each installed operating system.  Native VHD boot supports all three types of VHD files: fixed, dynamic, and differencing disks.  

    Developers and testers can use native VHD boot to run test versions of new device drivers or other software for Windows with full access to the hardware devices connected to the system.  A differencing VHD file provides a convenient way of initializing a test environment, performing tests and reverting back to a clean or baseline state after testing is complete.  Executing tests will result in updates being made only to the differencing disk. Once the testing is complete you can revert back to the clean state in the parent VHD by simply throwing away the differencing file and creating a new one. 

    Native VHD boot enables IT Administrators to quickly repurpose a machine for different roles.  Servers can have multiple application workloads in separate VHD files available and switch between workloads to adjust to demand.   The flexibility of multiple boot using VHD files also makes it easy to keep a previous Windows image available to use as a fall-back in the event of a problem with a new image. 

    Native VHD boot depends on enhancements to the Boot Configuration Data (BCD) to represent the VHD file as a boot device rather than a physical disk partition.  The following image shows an example of a multiple boot configuration with a VHD boot entry.

    vhd6

    Figure 3. Multiple boot configuration with VHD boot entry

    The Windows 7 boot manager and loader can now read the files required to start the operating system from the Windows image inside a VHD file.  When Windows boots from a VHD file, all the ‘disk I/O’ to load the kernel device drivers, start system services, and run applications is translated to I/O to the VHD file initially, and then to I/O to the NTFS volume and the physical disk.    On shutdown, all outstanding write operations flush to the VHD file and underlying physical partition in the proper order before the storage stack shuts down the disk device.  Because of these enhancements to core parts of the system, native VHD boot only works for VHDs containing Windows 7 or Windows Server 2008 R2 and not earlier versions of Windows.  Native VHD boot in this release does not support BitLocker, or hibernation (which includes resuming from hibernate).

    Deploying Images

    To put a Windows 7 or Windows Server 2008 R2 operating system image in the VHD file, you have to apply an image to the partition in the VHD file. Running Setup from the install DVD and selecting a partition in a VHD file for installation is not supported. Here are two ways you can apply a WIM image to a VHD:

    1. Use the Install-WindowsImage Powershell script from the MSDN Code Gallery.
    2. Or use the Imagex deployment tool from the Windows Automated Installation Kit (WAIK).

    The Install-WindowsImage Powershell script uses the wimgapi.dll in Windows 7 to apply a WIM to a VHD. Use the script if you are not familiar with the WAIK and Imagex.exe tool, or do not have the WAIK available.

    See the document Using Install-WindowsImage, on the Install-WindowsImage site for step-by-step instructions on how to create a VHD and apply a WIM image for VHD boot.

    IT professionals will be interested in using the WAIK deployment tools to customize and capture a reference Windows image and deploy the image in VHD format to either physical or virtual machines. The basic deployment steps for the IT Administrator to prepare a custom Windows image includes the following:

    • Install Windows to a partition on a physical machine first as a reference.
    • Customize the reference image settings and installing the applications you want.
    • Run the sysprep command on the reference system to generalize the image, which resets some of the system state and device configuration in Windows specific to that machine and shuts down.
    • Capture the reference image from the physical partition into a Windows image file that you copy to a server share.
    • Apply the Windows image to a VHD file and initialize the VHD boot environment.

    The VHD file with a generalized image can be copied to and used on multiple physical or virtual machines. A generalized image is required to avoid system startup issues because the hardware on the new system is different, and to avoid having multiple copies of Windows with the same machine identity (name and security identities), on the network. During the first boot of Windows from the VHD file on a different physical or virtual machine, Windows will specialize the image for the new machine, configure devices, and prepare for first use. Copying the reference VHD file is quick way to get a new Windows 7 or Windows Server 2008 R2 image to a machine for development, testing, or staging for servers.

    If you want to deploy Windows images to many machines, you can leverage the Windows Deployment Service (WDS) feature of Windows Server 2008 R2. WDS is enhanced with the ability to add VHD image files to the WDS image catalog. The WDS administrator creates image groups for VHD files that are ready to deploy to machines that use network boot, or “PXE boot”. When WDS deploys a VHD image, the client agent copies the VHD file locally and configures the boot environment to boot from the VHD. All the applications and system settings are configured in the master reference image in the VHD file. When Windows boots from the VHD file for the first time, the system is specialized as mentioned above, for the physical devices on the target machine and then is ready for use. That’s pretty convenient and goes a long way toward rapid deployment.

    While native VHD format support and specifically native VHD boot opens up a lot of usage scenarios, our goals with this technology are fairly specific: simplify image management for enterprise customers migrating server workloads to virtual machines, and enable efficient development and testing of software in an isolated environment on either physical or virtual machines. The support for VHD as a native format targets key scenarios in the enterprise where the IT staff is well versed with different imaging technologies and tools to manage their client and servers. A managed enterprise environment also employs technologies like folder redirection and roaming profiles to manage the user’s data outside the deployed VHD images.  Developers will appreciate the ability to quickly update or replace a private VHD image during development. Test environments can use multiple VHD images and differencing disks for more efficient use of test machines.

    Hopefully this blog posting gives you an idea of how Windows 7 and Windows Server 2008 R2 supports VHD files as a native format and why the common image format for physical and virtual machines will be interesting for many customer environments.

    Mike Kolitz
    Software Design Engineer in Test
    Hyper-V Test Tools and Infrastructure

    Update: A few people have asked me whether this information applies to Microsoft Hyper-V Server 2008 R2 as well.  Yes, it does.

  • Windows Virtualization Team Blog

    Tech Ed: Windows Server 2008 R2 Hyper-V News!

    • 12 Comments

    Virtualization Nation,

    Greetings from Tech Ed in Los Angeles! It's been a busy couple of days and you've probably heard the big news by now, Windows 7 and Windows Server 2008 R2 will be shipping for the holidays!

    On the Hyper-V R2 front, we're pleased to announce a few surprises of our own. :-) Let's start with scalability.

    64 logical processor support. This is a 4x improvement over Hyper-V R1 and means that Hyper-V can take advantage of larger scale-up systems with greater amount of compute resources. As our friends at AMD and Intel drive up core counts, we want you to know that Hyper-V is ready to take advantage of the compute resources in your server today and those you're buying tomorrow.

    Support for up to 384 Concurrently Running Virtual Machines & 512 Virtual Processors PER SERVER. (No, that's not a typo.) Going hand in hand with our support for 64 logical processors, we're upping the maximum number of concurrently running virtual machines to 384 per server and the maximum number of virtual processors to 512 for the highest virtual machine density on the market. Here are a few examples. You could run:

    1. 384 single virtual processor vms OR
    2. 256 dual virtual processor vms (512 Virtual Processors) OR
    3. 128 quad virtual processor vms (512 Virtual Processors) OR
    4. any combination so long as you're running up to 384 VMs and up to 512 Virtual Processors

    Live Migration & Processors.

    With the addition of Live Migration in Hyper-V R2, one of the immediate questions we're asked is: "Do the physical processors have to be exactly the same?"

    Scenario 1: Suppose you bought three servers for live migration and created a three node cluster. Everything's working well and a 6-12 months down the road you want to add another couple of nodes to increase the compute resources in your cluster. In the meantime, your OEM has upgraded their server hardware line with new processors, now what do you do?

    Scenario 2: You work in a small/medium business or K-12 education and you need to squeeze every nickel you can out of your budget. You want to use virtualization and would love to use Live Migration, but you have a mix of different servers ranging from Pentium 4, Core 2 and maybe next year you'll get budget to purchase a new Core i7 server.

    Wouldn't it be great if you could Live Migrate virtual machines across different processor generations?

    We think so too.

    Introducing: Processor Compatibility

    With Hyper-V R2, we include a new Processor Compatibility feature. Processor compatibility allows you to move a virtual machine up and down multiple processor generations from the same vendor. Here's how it works.

    When a Virtual Machine (VM) is started on a host, the hypervisor exposes the set of supported processor features available on the underlying hardware to the VM. This set of processor features are called guest visible processor features and are available to the VM until the VM is restarted.

    When a VM is started with processor compatibility mode enabled, Hyper-V normalizes the processor feature set and only exposes guest visible processor features that are available on all Hyper-V enabled processors of the same processor architecture, i.e. AMD or Intel.  This allows the VM to be migrated to any hardware platform of the same processor architecture. Processor features are "hidden" by the hypervisor by intercepting a VM's CPUID instruction and clearing the returned bits corresponding to the hidden features.

    Just so we're clear: this still means AMD<->AMD and Intel<->Intel. It does not mean you can Live Migrate between different processor vendors AMD<->Intel or vice versa.

    In addition, you may be aware that both AMD and Intel have provided similar capabilities in hardware, Extended Migration and Flex Migration respectively. Extended and Flex Migration are cool technologies available on relatively recent processors, but this is a case where providing the solution in software allows us to be more flexible and provide this capability to older systems too. Processor Compatibility also makes it easier to upgrade to the newest server hardware. In addition, Hyper-V Processor Compatibility can be done on a per VM basis (it's a checkbox) and doesn't require any BIOS changes.

    clip_image001

    Processor Compatibility In Action

    Here's an example of a cluster we've been testing. This is a 4 node cluster using 4 generations of Intel Processors with VT all attached to a small iSCSI SAN over 1 Gb/E. We have a script that continuously Live Migrates VMs from one node to the next every 15 seconds. We've been running this test for about a week and have successfully completed over 110,000 Live Migrations. Looks kinda like this.

     

    image

     

    Time To Get Uber-Geeky

    Now that I've explained what processor compatibility mode does and the flexibility provides, I'm guessing there are a few propeller heads who want to go further and know exactly what a "normalized processor" means from a processor feature standpoint. Happy to oblige. When a VM in processor compatibility mode is started, the following processor features are hidden from the VM:

    Host running AMD based processor

    Host running Intel based processor

    SSSE3, SSE4.1, SSE4.A, SSE5, POPCNT, LZCNT, Misaligned SSE, AMD 3DNow!, Extended AMD 3DNow!

    SSSE3, SSE4.1, SSE4.2, POPCNT, Misaligned SSE, XSAVE, AVX

    FAQ

    Q: What happens if a vendor has written an application that uses one of these features that isn't visible with processor compatibility enabled?

    A: Since the feature isn't exposed to the virtual machine, the application won't "see it" and it's up to the application to determine how to proceed; however, there are two likely paths.

    Path 1: The application will check to see if a specific processor feature is available and use it if it's available. If the processor features isn't available, it will use a different code path. Remember that applications that make use of these advanced processor features are generally written in a flexible fashion to accommodate the servers in market today and there are still thousands of older Xeons and Opterons on the market that don't have some of the latest processor features.

    Path 2: The application requires a specific processor feature and refuses to launch. At this point in time, we haven't found any application that fall into this category. It's possible they exist, but we haven't hit one yet. Since we can't test every application out there, processor compatibility is defaulted off. (We're conservative by nature.).

    BTW, if there were issues with Hyper-V Processor Compatibility, you'd also see it with other virtualization products which rely on underlying hardware capabilities to mitigate this problem as well.

    Q: Does processor compatibility have a hardware requirement? Does it require Intel Flex Migration or AMD Extended Migration?

    A: Hyper-V processor compatibility mode has no dependencies on these technologies.

    Q: Does Hyper-V processor compatibility allow you to migrate a VM from an AMD host to an Intel host and vice versa?

    A: No. Processor compatibility allows you to move a virtual machine up and down multiple processor generations from the same vendor. It does not allow migrating a VM (with or without processor compatibility mode) from AMD based hosts to Intel based hosts, and vice versa.

    Cheers,

    Jeff Woolsey

    Principal Group Program Manager

    Windows Server, Hyper-V

  • Windows Virtualization Team Blog

    Hyper-V in WS08 R2 Release Candidate: Bringing More to the Table

    • 6 Comments

    You'll want to read Isaac's blog post about the RC milestone of Windows Server 2008 R2. His post focuses on 64 LP support and processor compatibility mode for live migration. Read the post here.

    Here's an excerpt:

    64LP Support

    We have seen processors grow from 1, 2, 4, and now 6 cores on a single processor, soon to hit 8.  Within the Windows Server 2008 R2 lifecycle, 64 logical processor servers will become commonplace (8 processors x 8 cores).  Virtualization is the natural fit for these next-gen servers, allowing them to consolidate a greater number of virtual machines on a single host. Hyper-V is in line with these hardware trends all with an eye towards bringing you greater VM density. The dev team has done a fantastic job in building and testing a platform that can scale.

    Let's take a quick look at the history of logical processor support for Hyper-V:

    • Server 2008 Hyper-V                                         16 LP Support
    • Server 2008 Hyper-V +update (KB95670)      24 LP Support
    • Server 2008 R2 Hyper-V Original POR           32 LP Support
    • Server 2008 R2 Hyper-V RC/RTM                   64 LP Support!

    Processor Compatibility Mode for Live Migration 

    Live Migration is the killer-feature in Windows Server 2008 R2!  Previous to the RC build of Windows Server 2008 R2, identical CPUs were needed across every node in the cluster in order to perform a live migration.  As we came closer to the RC milestone we got feedback from customers and partners asking, "What if I deploy additional nodes that contain newer processors with features not contained in the original nodes?"  Well, we've solved that problem due to tremendous effort by the Hyper-V development team.

    Processor compatibility mode is very straightforward. It enables live migration across different CPU versions within the same processor family (i.e. Intel-to-Intel and AMD-to-AMD). However, it does NOT enable cross platform from Intel to AMD or vice versa. It works by abstracting the VM down to the lowest common denominator, in terms of instruction sets, which enables live migrations across a broader range of Hyper-V host hardware.

    There are a few things to note: Processor compatibility mode is disabled by default but you can configure it on a per-VM basis. There are no specific hardware requirements other than the CPUs must support hardware assisted virtualization (i.e. Intel's IVT and AMD's AMD-V).

    Patrick

  • Windows Virtualization Team Blog

    Day Two of the Scott Drummonds VMware FUD Fiasco.

    • 14 Comments

    Virtualization Nation,

    I thought we were done with this topic yesterday. I really did. If you missed my last article and aren't sure what I'm talking about, it's here.

    Scott Drummonds, VMware Product Marketing, apparently saw my response and attempted to respond. I say attempted because if you're looking for facts Scott still doesn't provide many.

    I've taken the text below verbatim from his blog and will again provide the facts.

    Scott's Sort Of Blog Response

    Since I posted the YouTube video showing Hyper-V blue screens last Friday I've received a lot of comments, questions, compliments and complaints. The video and descriptive text have raised more questions than answers, so here are a few details to help fill out the story.

    • The workload was not technically VMmark. There are two reasons for this:

    * VMmark's run rules specify that the VMs must be configured with a single virtual disk. Because this configuration can't make use of Hyper-V's paravirtualized SCSI driver, which requires a second virtual disk, the run rules were violated to make Hyper-V produce its best results.

    Jeff Woolsey: I have no idea what he's talking about. Hyper-V VMs support 4 virtual IDE disks, 4 virtual SCSI controllers and each virtual SCSI controller supports up to 64 virtual hard disks. That's 4 times more than ESX. If you want to run a virtual machine with a single virtual disk just do it. My best guess is this: Hyper-V only boots from virtual IDE, not virtual SCSI, and whoever ran this test thinks that the test must be run from virtual SCSI for the best performance.

    That's not the case with Hyper-V.

    Once you install the Integration Components in the guest OS it doesn't matter. Our virtual IDE performs just as well as our virtual SCSI because we provide an optimized enlightened (para-virtualized) IDE path. This ensures our customers always get the best possible disk performance.

    The only limitations here are:

    1. ESX needs virtual SCSI to get better performance because their virtual IDE doesn't perform as well
    2. The person(s) running these test don't understand what they're testing

    * The vendors that provided requirements for VMmark included use of SMP Linux guests. Hyper-V's lack of support for these configurations means that it is unable to run VMmark according to the rules. Those rules were ignored by the test team and the ESX and Hyper-V tests were run with uniprocessor Linux guests so that Hyper-V was able to produce some number.

    Jeff Woolsey: I see no mention of the specific guest operating system version (Red Hat, SUSE, ???) or if the Linux Integration Components were installed. I'm going to assume by the stellar test methodology so far that's a "No."

    • The server ran 15 tiles* when ESX was installed. So, the hardware is good.

    Jeff Woolsey: As I pointed out in my last blog, of the 750,000 downloads of Hyper-V gold code, we've had 3 reports of crashes under stress and with the same error code as seen in the video bugcheck (0x00020001). The solution in all three cases was to upgrade the server BIOS which solved the problem. This can happen as hypervisors interact very closely with the hardware and BIOS updates generally include updated microcode for processors oftentimes to address errata.

    As you still haven't answered some of the most basic questions about this "test" (and I use the word test in the broadest sense as a test implies a methodology) you'll have to excuse me if I disagree with the assertion that the hardware is properly configured and up-to-date.

    Methodology, Heard Of It?

    Even with this new information, Scott is still missing the most basic of information. What version of Hyper-V was this? Was this the version included with Windows Server 2008? If so, that's the beta. Did you apply the RTM update? Did you use the final shipping Integration Components in the guests? Did you include the Linux Integration Components for the Linux guests?

    The way this information is dribbling out indicates a lack of methodology and systematic testing. Apparently, VMware has no problem ignoring these precepts when it suits them.

    Here's what I mean.

    The Hypocrisy of VMWare's Benchmark Restrictions

    Ever wonder why there are almost no public competitive benchmarks of VMware, Hyper-V and/or Xen?

    Simple, VMware doesn't permit it without their approval. No, I'm not kidding. Here's the exact language: http://www.vmware.com/download/eula/esx_server.html

    3.3 Restrictions. You may not (i) sell, lease, license, sublicense, distribute or otherwise transfer in whole or in part the Software or the Software License Key to another party; (ii) provide, disclose, divulge or make available to, or permit use of the Software in whole or in part by, any third party (except Designated Administrative Access) without VMware's prior written consent; or (iii) modify or create derivative works based upon the Software. Except to the extent expressly permitted by applicable law, and to the extent that VMware is not permitted by that applicable law to exclude or limit the following rights, you may not decompile, disassemble, reverse engineer, or otherwise attempt to derive source code from the Software, in whole or in part. You may use the Software to conduct internal performance testing and benchmarking studies, the results of which you (and not unauthorized third parties) may publish or publicly disseminate; provided that VMware has reviewed and approved of the methodology, assumptions and other parameters of the study. Please contact VMware to request such review.

    If you ask them why, their answer is:

    "Benchmarking is a difficult process fraught with error and complexity at every turn. It's important for those attempting to analyze performance of systems to understand what they're doing to avoid drawing the wrong conclusions or allowing their readers to do so." (from HERE)

    So, what does that mean when VMware royally screws up?

    Apparently, that's OK as the video is still posted even after Scott is struggling to come up with the most basic of facts.

    Scott Goes On To Say

    I'm hoping to convince the people responsible for the test to shed their anonymity and come out with an official paper. I'll provide those details as soon as I can get them.

    Gosh, that's awfully swell of you Scott.

    In the meantime, I'm guessing you're going to leave that defamatory video posted which has no merit or value except to a VMware salesman. This looks great for your credibility, VMware's credibility and EMC's.

    Your management chain must be proud.

    Jeff Woolsey

    Principal Group Program Manager

    Windows Server, Hyper-V

  • Windows Virtualization Team Blog

    Hyper-V Winning Daily/VMware FUD Reaching New Heights.

    • 16 Comments

    Virtualization Nation,

    I prefer to spend my time talking about the great things we're doing with Hyper-V and Microsoft virtualization. We have a lot of very happy customers today with Hyper-V R1 and the upcoming R2 release delivers even more in terms of scalability, performance and new features like Live Migration and much, much more. Unfortunately, I need to take a moment to respond to some VMware FUD circulating the web.

    Out on the web, there's an "anonymous" video purporting to show a Hyper-V crash. When I heard, I was surprised and immediately wanted to know more. I haven't heard of any such incidents with Hyper-V and the Hyper-V R1 release has been incredibly stable and reliable. So, what did I find?

    The Video: No Facts Just FUD.

    Not much. Where are the details? There are no facts provided. What Hyper-V build was this? The beta? What was the configuration being tested? Who posted this? Why didn't they contact Microsoft support? I mean there's literally no data other than a defamatory statement at the beginning of the video implying that Hyper-V had something to do with some downtime at TechNet/MSDN. The SQL team and Operations responded to this days ago. In short, Hyper-V had nothing to do with the outage.

    So, why would someone create such a video? Let's dig a little deeper.

    The Poster.

    The poster, who doesn't appear on the video, doesn't state what company he works for or provide any context. Gee, I wonder where he works?

    <drum roll please>

    Introducing Scott Drummonds, VMware Product Marketing.

    image

    Gosh, I wonder why Scott didn't mention he works for VMware?

    Very professional Scott.

    No signs of desperation there at all.

    Looks like I'll need to provide the facts here.

    What I Do Know.

    1. In the first 7 months of Hyper-V RTM availability, we've had over 750,000 downloads of Hyper-V gold bits.
    2. Hyper-V is the fastest growing x86/x64 hypervisor in history. We are laser focused on our customers and providing high performance, high quality virtualization for everyone from small business to Fortune 500 customers.
    3. We have hundreds of Hyper-V case studies from customers worldwide and we're winning new customers daily.
    4. Hyper-V continues to power MSDN, TechNet and Microsoft.com as well as numerous other MS properties. Microsoft.com continues to receive over a BILLION hits per month and there has been no downtime to any of these internet properties running atop Hyper-V. Period.
    5. Of those 750,000+ downloads, the number of support calls we have received on Hyper-V is less than .02%. (Yes, a minimal fraction of a percent.)

    So, in terms of reliability, stability and support, not bad. (It's not like we released any patches resulting in days of downtime. HERE, HERE, HERE, HERE, HERE, & HERE)

    Hmm. Still Want To Know More.

    All said, I still wasn't satisfied. On the Hyper-V team, we run thousands of stress tests per week and the stress tests we run are far more invasive than the test in this video. So, I consulted our Hyper-V Supportability Program Manager and dug deeper. I wanted to know if we've had any Hyper-V crashes reported. Here's what I found out.

    Of the 750,000 downloads, we've had 3 reports of crashes under stress and with the same error code as seen in the video bugcheck (0x00020001). The solution in all three cases was to upgrade the server BIOS which solved the problem. This can happen as hypervisors interact very closely with the hardware and BIOS updates generally include updated microcode for processors oftentimes to address errata.

    In case you're wondering, VMware has had similar crashes with older BIOSes as well. Here.

    Those are the facts. Now back to our regularly scheduled Hyper-V goodness.

    TechEd Next Week!

    Next week is TechEd in Los Angeles and a number of us from the virtualization team will be there in Los Angeles. We've got numerous sessions covering Hyper-V R2, Virtual Machine Manager and more. Hope to see you there!

    Jeff Woolsey

    Principal Group Program Manager

    Windows Server, Hyper-V

    P.S. It appears Keith Ward has seen through this veneer of FUD and blogged as well. HERE.

  • Windows Virtualization Team Blog

    Microsoft Hyper-V Server 2008 R2 Release Candidate! (Free Live Migration/HA Anyone?)

    • 15 Comments

    Virtualization Nation,

    The Virtualization team is pleased to announce the availability of the Microsoft Hyper-V Server 2008 R2 Release Candidate for download. Hyper-V Server 2008 R2, our free standalone hypervisor, represents our continued commitment to providing high performance, hypervisor based virtualization for everyone, especially small and mid-market customers. This release underscores our customer focus by adding key new capabilities such as Live Migration and High Availability (and more.). The Microsoft Hyper-V Server 2008 Release Candidate is available here:

    http://www.microsoft.com/hyper-v-server/en/us/default.aspx

    Free Live Migration and High Availability? Really?

    A couple weeks ago, Zane Adam first blogged the news that Hyper-V Server 2008 R2 would include Live Migration and High Availability at no charge. The response from our customers was "AWESOME!! When is the final release?" :-) Understandably, the phone's been ringing off the hook, my inbox has been on overdrive and some folks in the blogosphere have been trying to imply <cough, cough, FUD> that there are some strings attached. So, I wanted to take a moment to provide more details about the upcoming Hyper-V Server 2008 R2 release and free Live Migration & High Availability.

    Hyper-V Server 2008 R2 Availability

    When Hyper-V Server 2008 R2 goes gold and is released to manufacturing (RTM) the bits will be available as a free download here:

    http://www.microsoft.com/hyper-v-server/en/us/default.aspx

    Hyper-V Server 2008 R2 will be available worldwide in 11 languages.

    Microsoft Hyper-V Server 2008 R2 includes Live Migration and High Availability. Period. No Strings Attached.

    Live Migration is a great solution for planned downtime such as servicing the underlying hardware like adding more memory, storage or applying a BIOS update. Simply Live Migrate the virtual machines to another server (without downtime) shutdown the physical server and perform the maintenance. When the maintenance is complete, Live Migrate the virtual machines back and your done.

    High Availability is a great solution for unplanned downtime. For example, suppose someone accidentally unplugs the wrong power cable on a server. The virtual machine on the server that just unexpectedly went down will automatically restart on another node without any user intervention.

    Hyper-V Server 2008 R2 includes both these capabilities as well as our new Cluster Shared Volumes (CSV) capabilities to simplify storage management and run multiple virtual machines from a single LUN.

    Managing Hyper-V Server 2008 R2

    Hyper-V Server 2008 R2 Live Migration and High Availability can be managed in a few different ways:

    1. Failover Cluster Manager/Hyper-V Manager from a Windows Server 2008 R2 Server OR,
    2. System Center Virtual Machine Manager 2008 R2 OR,
    3. Using the FREELY (there's that word again) available Failover Cluster Manager/Hyper-V Manager for Windows 7.

    So, as you can see, there are a few different options depending on your needs and option three gives you Live Migration and High Availability at zero cost.

    BTW: If you decide to go with option #2 System Center Virtual Machine Manager 2008 R2, you certainly can do a lot more such as:

    • Heterogeneous Virtualization Management
    • Rich PowerShell Support for Datacenter Automation
    • Maintenance mode
    • Virtual Machine Library Support
    • Templates, Clones, Sysprep Integration
    • Performance Resource Optimization (PRO)

    .and a lot, lot more. But, I digress.

    $$$ Comparison

    Let's take a look at a few cluster configurations and compare costs for Live Migration and High Availability functionality.

     

    Hyper-V Server 2008 R2

    VMware vSphere

    3 Node Cluster; 2 Socket Servers

    Free

    $13,470

    3 Node Cluster; 4 Socket Servers

    Free

    $26,940

    5 Node Cluster; 2 Socket Servers

    Free

    $22,450

    5 Node Cluster; 4 Socket Servers

    Free

    $44,900

    You may be wondering, "Did he choose the most expensive VMware configuration?" On the contrary, I chose the least expensive configuration ($2245 per processor) that offers both Live Migration and High Availability.

    You may be wondering, "Why isn't System Center management represented here?"

    In this example, I simply wanted to compare the lowest cost for Live Migration and High Availability functionality from Microsoft and VMware with some real world configurations that a small/medium business may use. I will post a follow-up blog that adds management for small/medium businesses. As for enterprise customers, they typically have larger server farms with more sophisticated management requirements. That's another blog for another time.

    You may also be wondering, "Why isn't the cost of guest operating systems included here?"

    Simple, neither Microsoft Hyper-V Server 2008 R2 nor VMware include any guest operating system licenses so if you need to run 4 copies of Windows Server, you need to purchase the appropriate license. That cost is the same whether you're running Hyper-V Server 2008 R2 or VMware so I didn't bother to include it.

    While VMware claims to be more affordable the facts are clear and the value of Microsoft Hyper-V Server 2008 R2 is undeniable. Microsoft offers exceptional value especially for small and mid-market customers who have told us for years how they would like Live Migration/High Availability functionality and simply can't afford it.

    Those days are over.

    At this point you may be thinking we're crazy to provide virtualization live migration and high availability at no cost. Well, I wish we could say we were first, but the folks at Xen have been providing free Live Migration and HA for a few months. In fact, the only one still charging for Live Migration and High Availability ($2245+ per socket) is VMware.

    Now that's crazy.

    Jeff Woolsey

    Principal Group Program Manager

    Windows Server, Hyper-V

  • Windows Virtualization Team Blog

    Online sessions, book and more

    • 1 Comments

    Admittedly this post is a stew and not a meal (if that metaphor works). But you might be interested in the following items. I'll keep it short:

    • John Kelbley will host a webcast on Friday, May 8 at 8:00am PDT titled, "Running Linux on Hyper-V." The session will discuss install, configure, run, backup and monitor non-Windows systems. See here.
    • On May 14, 8am-noon PDT, Edwin Yuen will host a live chat on TechTarget. He'll answer questions about our virt products, be it datacenter, desktop or managemment. See more here.
    • Wondering what to read when you're flying to TechEd, or your next trip? The Windows Server 2008 Hyper-V Resource Kit book is it. One of the authors, Robert Larson, architect in MS Services and TechNet blogger, told me that the book is in final formatting and some sample chapters are available to download (here). The book will be available via Amazon and Barnes and Noble in June. Read more from one of the authors here.
    • Finally

    Enjoy.

    Patrick

  • Windows Virtualization Team Blog

    VMware vSphere pricing - Meet the new price; same as the old price, only more

    • 4 Comments

    Hi, I'm Edwin Yuen, a Senior Technical Product Manager at Microsoft's Integrated Virtualization team.  This past week, there were two key announcements made, one by Microsoft and one by VMware, that have an impact on how we compare Microsoft and VMware pricing. 

    The first announcement was actually off this blog, made by Zane Adam, announcing that with the upcoming release of our free, standalone hypervisor, Microsoft Hyper-V Server 2008 R2, features like clustering, high availability (HA), and live migration would be included.  This was a very important announcement, as many customers are currently paying a significant amount of money for those features, and as we'll see below, will potentially continue to pay for them.  With Microsoft Hyper-V Server 2008 R2, you can now implement HA and live migration without having to buy a premium management SKU, which could save you thousands of dollars.

    The second announcement was VMware's announcement of vSphere, the next version of VMware's hypervisor.  I spend a lot of time working and speaking with customers, both Microsoft and VMware users.  The one theme repeated in those conversations is that everyone understands VMware is not a low cost solution and many have been re-evaluating how much they spend to implement virtualization.  I think that everyone, including those of us at Microsoft, were wondering if VMware would drop their prices in the new version of vSphere.  When the announcement came out, it had a bullet point on reduced costs and new SKUs for customers.  When I sat down to actually figure out the pricing, it was pretty clear that the pricing really didn't change for many customers and the prices still don't compare to the offerings from Microsoft.

    One of the key things I noticed is that for the SKU that most people bought, VI Enterprise or vSphere Enterprise, the price didn't actually change.  It went from $5,750 for a two processors host to $2,875 per processor, which is the same thing.  Thus, for many VMware customers, there is no cost savings in vSphere.  Another interesting issue about vSphere can be seen on the version comparisons page off VMware's website.  Many of the touted new features of vSphere, such as 8-way vSMP, >256GB of memory on the host, the vNetwork Switch, and Host Profiles, are only available if you buy new Enterprise Plus SKU, which is 18% more expensive than Enterprise and a cost increase for existing customers.  This means, for those customers who want these new vSphere features, there is a net increase in their cost.  Even when we compare just vSphere Enterprise SKU, the cost of vSphere Enterprise is five times that of buying the Microsoft solution with the Server Manage Suite Enterprise.

    On the small and medium business side, VMware changed the name of their VI Foundation SKU to vSphere Essentials and added a new vSphere Essentials Plus SKU.  Essentials is just like VI Foundation, but without consolidated backup.  Essentials Plus is like Foundation, but with HA added.  Essentials is priced at $995 for three two processors hosts and Essentials Plus is priced at $2995 for three two processor hosts.  In contrast, a customer using Microsoft Hyper-V Server 2008 R2 with System Center Virtual Machine Manager 2008 (VMM) Workgroup Edition (WGE) will only have to pay $499 for five hosts.  Thus, the Essentials SKU is four times more expensive compared to the Microsoft Solution, which also includes HA, clustering, and live migration.  The Essentials Plus SKU is 12 times more expensive than the Microsoft solution, while still missing live migration.  In fact, for customers who need live migration, they must purchase the vSphere Advanced SKU, which starts at $4490 for a single, two processor host.  When we look at the chart below, we can easily how the costs add up on the VMware side. 

    clip_image002

    Finally, VMware has also argued on evaluating price per VM, based on a white paper and calculator they published recently.  We recently published a white paper that reviews why this model and the cost calculator associated with it are not applicable to most customers.  One of the key issues to the price per VM model, especially with how VMware has been promoting it, is that it doesn't take into account the applications being run. The number of VMs that can be run on a host depends on how the applications inside the VMs run. Don't believe VMware marketing about low consolidation ratios on Hyper-V. For example, this case study about Kroll Factual Data shows them running 30 VMs on a single Hyper-V host.

    The consolidation ratio can vary depending on what you are running and how you run them. Because of this, you can't just plug consolidation ratios into a calculator and try to apply this across your entire deployment. The best way to compare Hypervisors is to compare Hypervisors, running your applications and VMs. When you do that, it will be easy to see why Microsoft is still less expensive then VMware. You can read about other companies that have made the switch to Microsoft here.

    Still, in the end, the big question to ask yourself is the following: Is it worth all this expense for VMware, when the Microsoft solution offers a comparable or even better feature set for much less cost?  Is it worth the extra line item on the invoice, the extra line in the budget, to use VMware virtualization when it's built into Windows?  That is a question I think many customers will be asking themselves in the coming months and that is just another reason that you should start using Microsoft Virtualization solutions.

  • Page 1 of 1 (15 items)