mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
architecture allows additional functionality to be easily added. Incorporating the plugin in CloudStack will allow the community to participate in improving the features available with Hyper-V. The plugin uses a Director Connect Agent architecture described here: https://cwiki.apache.org/confluence/display/CLOUDSTACK/Progress Add ability to pass kvp data via the key cloudstack-vm-userdata Rearrange code to make it clearer what .NET objects are being used. Test failures are easier to deal with if test key is not deleted. Acquire management/pod ip for control ip when VR deploys in HyperV Fixed deletion on VM's on hyperv host when mgmt server gets restarted due to HA Implementation for attach iso command. Attaches an iso to a given vm.
Classes were generated on a hyper-v server using the Visual Studio GUI, but you can do the same using mgmtclassgen.exe. Below are some examples: mgmtclassgen.exe Msvm_ComputerSystem /N root\virtualization /L CS /O CloudStack.Plugin.WmiWrappers /P ComputerSystem.cs mgmtclassgen.exe Msvm_VirtualSystemManagementService /N root\virtualization /L CS /O CloudStack.Plugin.WmiWrappers /P VirtualSystemManagementService.cs mgmtclassgen.exe Msvm_VirtualSystemGlobalSettingData /N root\virtualization /L CS /O CloudStack.Plugin.WmiWrappers /P VirtualSystemGlobalSettingData.cs BUT, you have to tweak the generated code, because it does not deal with NULL method parameters properly. E.g. when a method completes immediately, the returned out parameters include a "Job" property that has a NULL value. The generated code will attempt to call ToString() on this NULL value. ALSO, you have to tweak the generated code to expose useful details such as the WMI name for the class. E.g. the generated code creates a wrapper called class ComputerSystem for WMI objects of class Msvm_ComputerSystem. Thus, there is a mismatch in the class name and the corresponding WMI class, and the WMI class name is a private constant static member. The tweak involves making this member public.