[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] Proposition for the implementation of new features for Hyper-V driver

Dear libvirt developers,


During my final student training in the French company Bull, with a previous student (Simon RASTELLO), we developed new features for Hyper-V driver.  For a project called OpenCloudware, our work was to bring new functionalities using libvirt API in order to do basic actions on virtual machines hosted on Hyper-V.


You may be interested in pushing our developments in the official release.


The libvirt driver already provides functions to enumerate and get WMI classes by sending WQL requests to WMI provider and also to call WMI class methods. For that last kind of communication, a method requires input parameters. There are two kinds of argument: basic (integer, string…) and complex (objects, end point references, embedded instances). Actually, just the first argument passing mode is available with libvirt driver. But the second one is very useful because there is many WMI methods with complex types parameters, and for the moment it constraints developers to call WMI methods only with basic types parameters. So in order to expand WMI methods calls, we have implemented the second argument passing mode.


Thanks to this new argument passing mode, we are available  to set new functionalities.


Our contributions include:


·         hyperv_driver.c

o   hypervDomainDefineXML

o   hypervDomainCreateXML

o   hypervDomainUndefine

o   hypervDomainUndefineFlags

o   hypervDomainShutdown

o   hypervDomainShutdownFlags

o   hypervDomainGetVcpus

o   hypervDomainGetVcpusFlags 

o   hypervConnectGetMaxVcpus 

o   hypervDomainGetMaxVcpus  

o   hypervDomainSetVcpus            

o   hypervDomainSetVcpusFlags  

o   hypervDomainSetMemory       

o   hypervDomainSetMemoryFlags            

o   hypervDomainSetMaxMemory             

o   hypervNodeGetFreeMemory 

o   hypervDomainAttachDevice    

o   hypervDomainAttachDeviceFlags          

o   hypervDomainGetSchedulerParameters           

o   hypervDomainGetSchedulerParametersFlags 

o   hypervDomainGetSchedulerType         

o   hypervConnectGetCapabilities               

o   hypervConnectGetVersion      

o   hypervDomainSetAutostart     

o   hypervDomainGetAutostart    


·         hyperv_network.c

o   hypervConnectNumOfNetworks          

o   hypervConnectListNetworks   

o   hypervConnectNumOfDefinedNetworks          

o   hypervConnectListDefinedNetworks  

o   hypervNetworkLookupByName            

o   hypervNetworkGetXMLDesc  


·         hyperv_storage_driver.c

o   hypervConnectNumOfStoragePools (stub)

o   hypervConnectListStoragePools (stub)

o   hypervConnectNumOfDefinedStoragePools (stub)

o   hypervStoragePoolLookupByName (stub)

o   hypervStorageVolLookupByPath (stub)


·         hyperv_private.h

o   Add mutex to protect against concurrent calls

o   Add virDomainXMLOptionPtr to parse Domain XML


·         hyperv_wmi.h

o   Structures for complex arguments: objects, EPR (end point references) and embedded instances


·         hyperv_wmi.c

o   Methods to invoke WMI methods with complex arguments


·         hyperv_wmi_generator.input

o   CIM_DataFile

o   Win32_ComputerSystemProduct

o   Msvm_VirtualSystemManagementService

o   Msvm_VirtualSystemGlobalSettingData

o   Msvm_ResourceAllocationSettingData

o   Msvm_AllocationCapabilities

o   Msvm_VirtualSwitch

o   Msvm_SwitchPort

o   Msvm_SyntheticEthernetPortSettingData

o   Msvm_VirtualSwitchManagementService

o   Win32_OperatingSystem

o   Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor

o   Win32_PerfRawData_HvStats_HyperVHypervisorVirtualProcessor


·         hyperv_wmi_generator.py

o   Add CIM_DataFile class header to be generated

o   Add tab classes and types to be generated

o   Add a function to print header types


·         openwsman.h

o   Add ws_xml_create_doc signature

o   Add xml_parser_get_root signature


Attach files contain sources and an pdf of our contributions.


I’m ending my training this week but I’m available to answer any questions you may have. You can use my personal email: adrien kantcheff gmail com


I also put in copy of this email my tutors Yves VINTER and Christian BOURGEOIS. Feel free to contact them as well.



Best regards,






Attachment: libvirt API - New features for Hyper-V driver.pdf
Description: libvirt API - New features for Hyper-V driver.pdf

Attachment: Hyper-V driver 1.2.6 sources - Bull.zip
Description: Hyper-V driver 1.2.6 sources - Bull.zip

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]