A connection to Hyper-V . Uses Windows Management Instrumentation (WMI) calls to interact with Hyper-V Hyper-V WMI usage:
The physical computer and its hosted virtual machines are each represented by the Msvm_ComputerSystem class.
Each virtual machine is associated with a Msvm_VirtualSystemGlobalSettingData (vs_gs_data) instance and one or more Msvm_VirtualSystemSettingData (vmsetting) instances. For each vmsetting there is a series of Msvm_ResourceAllocationSettingData (rasd) objects. The rasd objects describe the settings for each device in a VM. Together, the vs_gs_data, vmsettings and rasds describe the configuration of the virtual machine.
Creating new resources such as disks and nics involves cloning a default rasd object and appropriately modifying the clone and calling the AddVirtualSystemResources WMI method Changing resources such as memory uses the ModifyVirtualSystemResources WMI method
Hyper-V WMI objects can be retrieved simply by using the class name of the WMI object and optionally specifying a column to filter the result set. More complex filters can be formed using WQL (sql-like) queries. The parameters and return tuples of WMI method calls can gleaned by examining the doc string. For example: >>> vs_man_svc.ModifyVirtualSystemResources.__doc__ ModifyVirtualSystemResources (ComputerSystem, ResourceSettingData[])
=> (Job, ReturnValue)’
When passing setting data (ResourceSettingData) to the WMI method, an XML representation of the data is passed in using GetText_(1). Available methods on a service can be determined using method.keys(): >>> vs_man_svc.methods.keys() vmsettings and rasds for a vm can be retrieved using the ‘associators’ method with the appropriate return class. Long running WMI commands generally return a Job (an instance of Msvm_ConcreteJob) whose state can be polled to determine when it finishes
Bases: nova.virt.driver.ComputeDriver
Destroy the VM. Also destroy the associated VHD disk files
See xenapi_conn.py implementation.
Get information about the VM
Reboots, shuts down or powers up the host.
Return the names of all the instances known to Hyper-V.
Reboot the specified instance.
Sets the specified host’s ability to accept new instances.
Create a new VM and start it.
This method is supported only by libvirt.
See xenapi_conn.py implementation.