Re: [libvirt] [PATCH 00/16] Hyper-V: Improve 2008, Introduce 2012

Hi there, I was wondering if any of these patches actually made it into libvirt code. I'm really looking forward hyper-v support improvement and features like shutdown VM (not destroy/turn off but clean shutdown) implemented. Especially interested in 2012/2012 R2 since 2008 is getting old and 2016 is right around the corner. I'm already using libvirt 2.1.0 with some patches I found in https://github.com/vikhyath/libvirt-hyperv-r2-2012 but it would be great to have the code reviewed and merged into libvirt releases. Thanks. Fer
The following patches include work originally done by Yves Vinter back in 2014. The last patch introduces support for Hyper-V 2012, while still supporting 2008. I am not sure that the method I used to include the 2012 support is the best approach, mainly due to code duplication, but I am open to suggestions on how to do this better.
Jason Miesionczek (16): hyperv: additional server 2008 wmi classes hyperv: add cim types support to code generator hyperv: add get capabilities hyperv: implement connectGetVersion hyperv: implement vcpu functions hyperv: implement nodeGetFreeMemory hyperv: implement ability to send xml soap requests hyperv: introduce basic network driver hyperv: add domain shutdown function hyperv: add get scheduler functions hyperv: add set memory functions hyperv: set vpcu functions hyperv: domain undefine functions hyperv: domain define and associated functions hyperv: network list functions hyperv: introduce 2012 support
src/Makefile.am | 2 + src/hyperv/hyperv_driver.c | 1989 ++++++++++++++++++++++++++++++++- src/hyperv/hyperv_driver_2012.c | 299 +++++ src/hyperv/hyperv_driver_2012.h | 55 + src/hyperv/hyperv_network_driver.c | 280 +++++ src/hyperv/hyperv_network_driver.h | 30 + src/hyperv/hyperv_private.h | 8 + src/hyperv/hyperv_wmi.c | 709 +++++++++++- src/hyperv/hyperv_wmi.h | 78 ++ src/hyperv/hyperv_wmi_generator.input | 518 ++++++++- src/hyperv/hyperv_wmi_generator.py | 68 +- src/hyperv/openwsman.h | 4 + 12 files changed, 3989 insertions(+), 51 deletions(-) create mode 100644 src/hyperv/hyperv_driver_2012.c create mode 100644 src/hyperv/hyperv_driver_2012.h create mode 100644 src/hyperv/hyperv_network_driver.c create mode 100644 src/hyperv/hyperv_network_driver.h

Hi,
I was wondering if any of these patches actually made it into libvirt code. I'm really looking forward hyper-v support improvement and features like shutdown VM (not destroy/turn off but clean shutdown) implemented. Especially interested in 2012/2012 R2 since 2008 is getting old and 2016 is right around the corner.
Unfortunately they have not made it in or received enough of a review (yet) -- my guess is that this is because Hyper-V hosts/clusters are not wide spread and devs cannot test the patches. @libvirt-devs, if that is the case, we (Datto) would be happy to provide test servers for you so you can play around with the patches. Just contact me or Jason M (see previous mails) directly and we'll talk about it. We are also working on additional patches to provide a more extensive support. The patches that Jason submitted are just the beginning and provide very basic support. Best, Phil

Thanks for the reply Phil. These are brilliant news, hopefully libvirt support for Hyper-V will see some improvements soon and these patches are a great starting point. Regards. Fer On mié, sep 7, 2016 at 11:46 , Philipp Heckel <pheckel@datto.com> wrote:
Hi,
I was wondering if any of these patches actually made it into libvirt code. I'm really looking forward hyper-v support improvement and features like shutdown VM (not destroy/turn off but clean shutdown) implemented. Especially interested in 2012/2012 R2 since 2008 is getting old and 2016 is right around the corner.
Unfortunately they have not made it in or received enough of a review (yet) -- my guess is that this is because Hyper-V hosts/clusters are not wide spread and devs cannot test the patches.
@libvirt-devs, if that is the case, we (Datto) would be happy to provide test servers for you so you can play around with the patches. Just contact me or Jason M (see previous mails) directly and we'll talk about it.
We are also working on additional patches to provide a more extensive support. The patches that Jason submitted are just the beginning and provide very basic support.
Best, Phil

Thanks for the reply Phil. These are brilliant news, hopefully libvirt support for Hyper-V will see some improvements soon and these patches are a great starting point. Regards. Fer On mié, sep 7, 2016 at 11:46 , Philipp Heckel <pheckel@datto.com> wrote:
Hi,
I was wondering if any of these patches actually made it into libvirt code. I'm really looking forward hyper-v support improvement and features like shutdown VM (not destroy/turn off but clean shutdown) implemented. Especially interested in 2012/2012 R2 since 2008 is getting old and 2016 is right around the corner.
Unfortunately they have not made it in or received enough of a review (yet) -- my guess is that this is because Hyper-V hosts/clusters are not wide spread and devs cannot test the patches.
@libvirt-devs, if that is the case, we (Datto) would be happy to provide test servers for you so you can play around with the patches. Just contact me or Jason M (see previous mails) directly and we'll talk about it.
We are also working on additional patches to provide a more extensive support. The patches that Jason submitted are just the beginning and provide very basic support.
Best, Phil

2016-09-07 23:14 GMT+02:00 Fernando Casas Schössow <casasfernando@hotmail.com>:
Hi there,
I was wondering if any of these patches actually made it into libvirt code. I'm really looking forward hyper-v support improvement and features like shutdown VM (not destroy/turn off but clean shutdown) implemented. Especially interested in 2012/2012 R2 since 2008 is getting old and 2016 is right around the corner.
I'm already using libvirt 2.1.0 with some patches I found in https://github.com/vikhyath/libvirt-hyperv-r2-2012 but it would be great to have the code reviewed and merged into libvirt releases.
Thanks.
Fer
The following patches include work originally done by Yves Vinter back in 2014. The last patch introduces support for Hyper-V 2012, while still supporting 2008. I am not sure that the method I used to include the 2012 support is the best approach, mainly due to code duplication, but I am open to suggestions on how to do this better.
Jason Miesionczek (16): hyperv: additional server 2008 wmi classes hyperv: add cim types support to code generator hyperv: add get capabilities hyperv: implement connectGetVersion hyperv: implement vcpu functions hyperv: implement nodeGetFreeMemory hyperv: implement ability to send xml soap requests hyperv: introduce basic network driver hyperv: add domain shutdown function hyperv: add get scheduler functions hyperv: add set memory functions hyperv: set vpcu functions hyperv: domain undefine functions hyperv: domain define and associated functions hyperv: network list functions hyperv: introduce 2012 support
I had a quick look at these patches a while ago, but didn't get around to review them in detail yet. Adding 2012 support while keeping 2008 supported is a bit tricky but doable I think. -- Matthias Bolte http://photron.blogspot.com

We have a lot more implemented, but they're not cleaned up yet or properly tested. We'll submit them in the following weeks (ideally next week). Again, if you need test infrastructure, contact me or Jason. Here's what we have so far: 2012 ---- hypervHypervisorDriver.connectGetCapabilities = hypervConnectGetCapabilities; /* 2008 & 2012 */ hypervHypervisorDriver.connectGetHostname = hypervConnectGetHostname; /* 2008 & 2012 */ hypervHypervisorDriver.connectGetType = hypervConnectGetType; /* 2008 & 2012 */ hypervHypervisorDriver.connectIsAlive = hypervConnectIsAlive; /* 2008 & 2012 */ hypervHypervisorDriver.connectListAllDomains = hypervConnectListAllDomains2012; hypervHypervisorDriver.connectListDefinedDomains = hypervConnectListDefinedDomains2012; hypervHypervisorDriver.connectListDomains = hypervConnectListDomains2012; hypervHypervisorDriver.connectNumOfDefinedDomains = hypervConnectNumOfDefinedDomains2012; hypervHypervisorDriver.connectNumOfDomains = hypervConnectNumOfDomains2012; hypervHypervisorDriver.domainCreate = hypervDomainCreate2012; hypervHypervisorDriver.domainCreateWithFlags = hypervDomainCreateWithFlags2012; hypervHypervisorDriver.domainDefineXML = hypervDomainDefineXML2012; hypervHypervisorDriver.domainDestroyFlags = hypervDomainDestroyFlags2012; hypervHypervisorDriver.domainDestroy = hypervDomainDestroy2012; hypervHypervisorDriver.domainGetInfo = hypervDomainGetInfo2012; hypervHypervisorDriver.domainGetState = hypervDomainGetState2012; hypervHypervisorDriver.domainGetXMLDesc = hypervDomainGetXMLDesc2012; hypervHypervisorDriver.domainIsActive = hypervDomainIsActive2012; hypervHypervisorDriver.domainLookupByID = hypervDomainLookupByID2012; hypervHypervisorDriver.domainLookupByName = hypervDomainLookupByName2012; hypervHypervisorDriver.domainLookupByUUID = hypervDomainLookupByUUID2012; hypervHypervisorDriver.domainReboot = hypervDomainReboot2012; hypervHypervisorDriver.domainSendKey = hypervDomainSendKey2012; hypervHypervisorDriver.domainSetMemoryFlags = hypervDomainSetMemoryFlags2012; hypervHypervisorDriver.domainSetMemory = hypervDomainSetMemory2012; hypervHypervisorDriver.domainShutdownFlags = hypervDomainShutdownFlags2012; hypervHypervisorDriver.domainShutdown = hypervDomainShutdown2012; hypervHypervisorDriver.domainUndefineFlags = hypervDomainUndefineFlags2012; hypervHypervisorDriver.domainUndefine = hypervDomainUndefine2012; hypervHypervisorDriver.nodeGetFreeMemory = hypervNodeGetFreeMemory; /* 2008 & 2012 */ hypervHypervisorDriver.nodeGetInfo = hypervNodeGetInfo; /* 2008 & 2012 */ 2008 ---- hypervHypervisorDriver.connectGetCapabilities = hypervConnectGetCapabilities; /* 1.2.10 */ hypervHypervisorDriver.connectGetHostname = hypervConnectGetHostname; /* 0.9.5 */ hypervHypervisorDriver.connectGetMaxVcpus = hypervConnectGetMaxVcpus; /* 1.2.10 */ hypervHypervisorDriver.connectGetType = hypervConnectGetType; /* 0.9.5 */ hypervHypervisorDriver.connectGetVersion = hypervConnectGetVersion; /* 1.2.10 */ hypervHypervisorDriver.connectIsAlive = hypervConnectIsAlive; /* 0.9.8 */ hypervHypervisorDriver.connectIsEncrypted = hypervConnectIsEncrypted; /* 0.9.5 */ hypervHypervisorDriver.connectIsSecure = hypervConnectIsSecure; /* 0.9.5 */ hypervHypervisorDriver.connectListAllDomains = hypervConnectListAllDomains; /* 0.10.2 */ hypervHypervisorDriver.connectListDefinedDomains = hypervConnectListDefinedDomains; /* 0.9.5 */ hypervHypervisorDriver.connectListDomains = hypervConnectListDomains; /* 0.9.5 */ hypervHypervisorDriver.connectNumOfDefinedDomains = hypervConnectNumOfDefinedDomains; /* 0.9.5 */ hypervHypervisorDriver.connectNumOfDomains = hypervConnectNumOfDomains; /* 0.9.5 */ hypervHypervisorDriver.domainAttachDeviceFlags = hypervDomainAttachDeviceFlags; /* 1.2.10 */ hypervHypervisorDriver.domainAttachDevice = hypervDomainAttachDevice; /* 1.2.10 */ hypervHypervisorDriver.domainCreate = hypervDomainCreate; /* 0.9.5 */ hypervHypervisorDriver.domainCreateWithFlags = hypervDomainCreateWithFlags; /* 0.9.5 */ hypervHypervisorDriver.domainCreateXML = hypervDomainCreateXML; /* 1.2.10 */ hypervHypervisorDriver.domainDefineXML = hypervDomainDefineXML; /* 1.2.10 */ hypervHypervisorDriver.domainDestroyFlags = hypervDomainDestroyFlags; /* 0.9.5 */ hypervHypervisorDriver.domainDestroy = hypervDomainDestroy; /* 0.9.5 */ hypervHypervisorDriver.domainGetAutostart = hypervDomainGetAutostart; /* 1.2.10 */ hypervHypervisorDriver.domainGetInfo = hypervDomainGetInfo; /* 0.9.5 */ hypervHypervisorDriver.domainGetMaxVcpus = hypervDomainGetMaxVcpus; /* 1.2.10 */ hypervHypervisorDriver.domainGetOSType = hypervDomainGetOSType; /* 0.9.5 */ hypervHypervisorDriver.domainGetSchedulerParametersFlags = hypervDomainGetSchedulerParametersFlags; /* 1.2.10 */ hypervHypervisorDriver.domainGetSchedulerParameters = hypervDomainGetSchedulerParameters; /* 1.2.10 */ hypervHypervisorDriver.domainGetSchedulerType = hypervDomainGetSchedulerType; /* 1.2.10 */ hypervHypervisorDriver.domainGetState = hypervDomainGetState; /* 0.9.5 */ hypervHypervisorDriver.domainGetVcpusFlags = hypervDomainGetVcpusFlags; /* 1.2.10 */ hypervHypervisorDriver.domainGetVcpus = hypervDomainGetVcpus; /* 1.2.10 */ hypervHypervisorDriver.domainGetXMLDesc = hypervDomainGetXMLDesc; /* 0.9.5 */ hypervHypervisorDriver.domainHasManagedSaveImage = hypervDomainHasManagedSaveImage; /* 0.9.5 */ hypervHypervisorDriver.domainIsActive = hypervDomainIsActive; /* 0.9.5 */ hypervHypervisorDriver.domainIsPersistent = hypervDomainIsPersistent; /* 0.9.5 */ hypervHypervisorDriver.domainIsUpdated = hypervDomainIsUpdated; /* 0.9.5 */ hypervHypervisorDriver.domainLookupByID = hypervDomainLookupByID; /* 0.9.5 */ hypervHypervisorDriver.domainLookupByName = hypervDomainLookupByName; /* 0.9.5 */ hypervHypervisorDriver.domainLookupByUUID = hypervDomainLookupByUUID; /* 0.9.5 */ hypervHypervisorDriver.domainManagedSave = hypervDomainManagedSave; /* 0.9.5 */ hypervHypervisorDriver.domainManagedSaveRemove = hypervDomainManagedSaveRemove; /* 0.9.5 */ hypervHypervisorDriver.domainReboot = hypervDomainReboot; /* 1.3.x */ hypervHypervisorDriver.domainResume = hypervDomainResume; /* 0.9.5 */ hypervHypervisorDriver.domainScreenshot = hypervDomainScreenshot; /* pjr - 08/08/16 */ hypervHypervisorDriver.domainSendKey = hypervDomainSendKey; /* 1.3.x */ hypervHypervisorDriver.domainSetAutostart = hypervDomainSetAutostart; /* 1.2.10 */ hypervHypervisorDriver.domainSetMaxMemory = hypervDomainSetMaxMemory; /* 1.2.10 */ hypervHypervisorDriver.domainSetMemoryFlags = hypervDomainSetMemoryFlags; /* 1.2.10 */ hypervHypervisorDriver.domainSetMemory = hypervDomainSetMemory; /* 1.2.10 */ hypervHypervisorDriver.domainSetVcpusFlags = hypervDomainSetVcpusFlags; /* 1.2.10 */ hypervHypervisorDriver.domainSetVcpus = hypervDomainSetVcpus; /* 1.2.10 */ hypervHypervisorDriver.domainShutdownFlags = hypervDomainShutdownFlags; /* 1.2.10 */ hypervHypervisorDriver.domainShutdown = hypervDomainShutdown; /* 1.2.10 */ hypervHypervisorDriver.domainSuspend = hypervDomainSuspend; /* 0.9.5 */ hypervHypervisorDriver.domainUndefineFlags = hypervDomainUndefineFlags; /* 1.2.10 */ hypervHypervisorDriver.domainUndefine = hypervDomainUndefine; /* 1.2.10 */ hypervHypervisorDriver.nodeGetFreeMemory = hypervNodeGetFreeMemory; /* 1.2.10 */ hypervHypervisorDriver.nodeGetInfo = hypervNodeGetInfo; /* 0.9.5 */ On Wed, Sep 7, 2016 at 6:17 PM, Matthias Bolte < matthias.bolte@googlemail.com> wrote:
2016-09-07 23:14 GMT+02:00 Fernando Casas Schössow < casasfernando@hotmail.com>:
Hi there,
I was wondering if any of these patches actually made it into libvirt code. I'm really looking forward hyper-v support improvement and features like shutdown VM (not destroy/turn off but clean shutdown) implemented. Especially interested in 2012/2012 R2 since 2008 is getting old and 2016 is right around the corner.
I'm already using libvirt 2.1.0 with some patches I found in https://github.com/vikhyath/libvirt-hyperv-r2-2012 but it would be great to have the code reviewed and merged into libvirt releases.
Thanks.
Fer
The following patches include work originally done by Yves Vinter back in 2014. The last patch introduces support for Hyper-V 2012, while still supporting 2008. I am not sure that the method I used to include the 2012 support is the best approach, mainly due to code duplication, but I am open to suggestions on how to do this better.
Jason Miesionczek (16): hyperv: additional server 2008 wmi classes hyperv: add cim types support to code generator hyperv: add get capabilities hyperv: implement connectGetVersion hyperv: implement vcpu functions hyperv: implement nodeGetFreeMemory hyperv: implement ability to send xml soap requests hyperv: introduce basic network driver hyperv: add domain shutdown function hyperv: add get scheduler functions hyperv: add set memory functions hyperv: set vpcu functions hyperv: domain undefine functions hyperv: domain define and associated functions hyperv: network list functions hyperv: introduce 2012 support
I had a quick look at these patches a while ago, but didn't get around to review them in detail yet.
Adding 2012 support while keeping 2008 supported is a bit tricky but doable I think.
-- Matthias Bolte http://photron.blogspot.com
-- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
-- *Philipp Heckel* Principal Engineer & Team Lead Datto, Inc. +1-475-288-1277 www.datto.com [image: datto-email-signature] <http://dattobackup.com/emea-email-signature> Join the conversation! [image: Facebook] <http://www.facebook.com/dattoinc> [image: Twitter] <https://twitter.com/dattobackup> [image: LinkedIn] <http://www.linkedin.com/company/1477873?trk=tyah> [image: pinterest] <http://pinterest.com/dattobackup/> [image: Blog RSS] <http://blog.dattobackup.com/blog> [image: YouTube] <http://www.youtube.com/user/DattoInc/featured> [image: Google Plus Page] <https://plus.google.com/u/0/108292366419623632143/posts>

Hi Phil, May I ask which libvirt version are you patching against? I'm trying to apply this patches to libvirt 2.2.0 but some of them are failing (for example patch 7). Thanks. Fer On jue, sep 8, 2016 at 12:28 , Philipp Heckel <pheckel@datto.com> wrote:
We have a lot more implemented, but they're not cleaned up yet or properly tested. We'll submit them in the following weeks (ideally next week).
Again, if you need test infrastructure, contact me or Jason.
Here's what we have so far:
2012 ---- hypervHypervisorDriver.connectGetCapabilities = hypervConnectGetCapabilities; /* 2008 & 2012 */ hypervHypervisorDriver.connectGetHostname = hypervConnectGetHostname; /* 2008 & 2012 */ hypervHypervisorDriver.connectGetType = hypervConnectGetType; /* 2008 & 2012 */ hypervHypervisorDriver.connectIsAlive = hypervConnectIsAlive; /* 2008 & 2012 */ hypervHypervisorDriver.connectListAllDomains = hypervConnectListAllDomains2012; hypervHypervisorDriver.connectListDefinedDomains = hypervConnectListDefinedDomains2012; hypervHypervisorDriver.connectListDomains = hypervConnectListDomains2012; hypervHypervisorDriver.connectNumOfDefinedDomains = hypervConnectNumOfDefinedDomains2012; hypervHypervisorDriver.connectNumOfDomains = hypervConnectNumOfDomains2012; hypervHypervisorDriver.domainCreate = hypervDomainCreate2012; hypervHypervisorDriver.domainCreateWithFlags = hypervDomainCreateWithFlags2012; hypervHypervisorDriver.domainDefineXML = hypervDomainDefineXML2012; hypervHypervisorDriver.domainDestroyFlags = hypervDomainDestroyFlags2012; hypervHypervisorDriver.domainDestroy = hypervDomainDestroy2012; hypervHypervisorDriver.domainGetInfo = hypervDomainGetInfo2012; hypervHypervisorDriver.domainGetState = hypervDomainGetState2012; hypervHypervisorDriver.domainGetXMLDesc = hypervDomainGetXMLDesc2012; hypervHypervisorDriver.domainIsActive = hypervDomainIsActive2012; hypervHypervisorDriver.domainLookupByID = hypervDomainLookupByID2012; hypervHypervisorDriver.domainLookupByName = hypervDomainLookupByName2012; hypervHypervisorDriver.domainLookupByUUID = hypervDomainLookupByUUID2012; hypervHypervisorDriver.domainReboot = hypervDomainReboot2012; hypervHypervisorDriver.domainSendKey = hypervDomainSendKey2012; hypervHypervisorDriver.domainSetMemoryFlags = hypervDomainSetMemoryFlags2012; hypervHypervisorDriver.domainSetMemory = hypervDomainSetMemory2012; hypervHypervisorDriver.domainShutdownFlags = hypervDomainShutdownFlags2012; hypervHypervisorDriver.domainShutdown = hypervDomainShutdown2012; hypervHypervisorDriver.domainUndefineFlags = hypervDomainUndefineFlags2012; hypervHypervisorDriver.domainUndefine = hypervDomainUndefine2012; hypervHypervisorDriver.nodeGetFreeMemory = hypervNodeGetFreeMemory; /* 2008 & 2012 */ hypervHypervisorDriver.nodeGetInfo = hypervNodeGetInfo; /* 2008 & 2012 */
2008 ---- hypervHypervisorDriver.connectGetCapabilities = hypervConnectGetCapabilities; /* 1.2.10 */ hypervHypervisorDriver.connectGetHostname = hypervConnectGetHostname; /* 0.9.5 */ hypervHypervisorDriver.connectGetMaxVcpus = hypervConnectGetMaxVcpus; /* 1.2.10 */ hypervHypervisorDriver.connectGetType = hypervConnectGetType; /* 0.9.5 */ hypervHypervisorDriver.connectGetVersion = hypervConnectGetVersion; /* 1.2.10 */ hypervHypervisorDriver.connectIsAlive = hypervConnectIsAlive; /* 0.9.8 */ hypervHypervisorDriver.connectIsEncrypted = hypervConnectIsEncrypted; /* 0.9.5 */ hypervHypervisorDriver.connectIsSecure = hypervConnectIsSecure; /* 0.9.5 */ hypervHypervisorDriver.connectListAllDomains = hypervConnectListAllDomains; /* 0.10.2 */ hypervHypervisorDriver.connectListDefinedDomains = hypervConnectListDefinedDomains; /* 0.9.5 */ hypervHypervisorDriver.connectListDomains = hypervConnectListDomains; /* 0.9.5 */ hypervHypervisorDriver.connectNumOfDefinedDomains = hypervConnectNumOfDefinedDomains; /* 0.9.5 */ hypervHypervisorDriver.connectNumOfDomains = hypervConnectNumOfDomains; /* 0.9.5 */ hypervHypervisorDriver.domainAttachDeviceFlags = hypervDomainAttachDeviceFlags; /* 1.2.10 */ hypervHypervisorDriver.domainAttachDevice = hypervDomainAttachDevice; /* 1.2.10 */ hypervHypervisorDriver.domainCreate = hypervDomainCreate; /* 0.9.5 */ hypervHypervisorDriver.domainCreateWithFlags = hypervDomainCreateWithFlags; /* 0.9.5 */ hypervHypervisorDriver.domainCreateXML = hypervDomainCreateXML; /* 1.2.10 */ hypervHypervisorDriver.domainDefineXML = hypervDomainDefineXML; /* 1.2.10 */ hypervHypervisorDriver.domainDestroyFlags = hypervDomainDestroyFlags; /* 0.9.5 */ hypervHypervisorDriver.domainDestroy = hypervDomainDestroy; /* 0.9.5 */ hypervHypervisorDriver.domainGetAutostart = hypervDomainGetAutostart; /* 1.2.10 */ hypervHypervisorDriver.domainGetInfo = hypervDomainGetInfo; /* 0.9.5 */ hypervHypervisorDriver.domainGetMaxVcpus = hypervDomainGetMaxVcpus; /* 1.2.10 */ hypervHypervisorDriver.domainGetOSType = hypervDomainGetOSType; /* 0.9.5 */ hypervHypervisorDriver.domainGetSchedulerParametersFlags = hypervDomainGetSchedulerParametersFlags; /* 1.2.10 */ hypervHypervisorDriver.domainGetSchedulerParameters = hypervDomainGetSchedulerParameters; /* 1.2.10 */ hypervHypervisorDriver.domainGetSchedulerType = hypervDomainGetSchedulerType; /* 1.2.10 */ hypervHypervisorDriver.domainGetState = hypervDomainGetState; /* 0.9.5 */ hypervHypervisorDriver.domainGetVcpusFlags = hypervDomainGetVcpusFlags; /* 1.2.10 */ hypervHypervisorDriver.domainGetVcpus = hypervDomainGetVcpus; /* 1.2.10 */ hypervHypervisorDriver.domainGetXMLDesc = hypervDomainGetXMLDesc; /* 0.9.5 */ hypervHypervisorDriver.domainHasManagedSaveImage = hypervDomainHasManagedSaveImage; /* 0.9.5 */ hypervHypervisorDriver.domainIsActive = hypervDomainIsActive; /* 0.9.5 */ hypervHypervisorDriver.domainIsPersistent = hypervDomainIsPersistent; /* 0.9.5 */ hypervHypervisorDriver.domainIsUpdated = hypervDomainIsUpdated; /* 0.9.5 */ hypervHypervisorDriver.domainLookupByID = hypervDomainLookupByID; /* 0.9.5 */ hypervHypervisorDriver.domainLookupByName = hypervDomainLookupByName; /* 0.9.5 */ hypervHypervisorDriver.domainLookupByUUID = hypervDomainLookupByUUID; /* 0.9.5 */ hypervHypervisorDriver.domainManagedSave = hypervDomainManagedSave; /* 0.9.5 */ hypervHypervisorDriver.domainManagedSaveRemove = hypervDomainManagedSaveRemove; /* 0.9.5 */ hypervHypervisorDriver.domainReboot = hypervDomainReboot; /* 1.3.x */ hypervHypervisorDriver.domainResume = hypervDomainResume; /* 0.9.5 */ hypervHypervisorDriver.domainScreenshot = hypervDomainScreenshot; /* pjr - 08/08/16 */ hypervHypervisorDriver.domainSendKey = hypervDomainSendKey; /* 1.3.x */ hypervHypervisorDriver.domainSetAutostart = hypervDomainSetAutostart; /* 1.2.10 */ hypervHypervisorDriver.domainSetMaxMemory = hypervDomainSetMaxMemory; /* 1.2.10 */ hypervHypervisorDriver.domainSetMemoryFlags = hypervDomainSetMemoryFlags; /* 1.2.10 */ hypervHypervisorDriver.domainSetMemory = hypervDomainSetMemory; /* 1.2.10 */ hypervHypervisorDriver.domainSetVcpusFlags = hypervDomainSetVcpusFlags; /* 1.2.10 */ hypervHypervisorDriver.domainSetVcpus = hypervDomainSetVcpus; /* 1.2.10 */ hypervHypervisorDriver.domainShutdownFlags = hypervDomainShutdownFlags; /* 1.2.10 */ hypervHypervisorDriver.domainShutdown = hypervDomainShutdown; /* 1.2.10 */ hypervHypervisorDriver.domainSuspend = hypervDomainSuspend; /* 0.9.5 */ hypervHypervisorDriver.domainUndefineFlags = hypervDomainUndefineFlags; /* 1.2.10 */ hypervHypervisorDriver.domainUndefine = hypervDomainUndefine; /* 1.2.10 */ hypervHypervisorDriver.nodeGetFreeMemory = hypervNodeGetFreeMemory; /* 1.2.10 */ hypervHypervisorDriver.nodeGetInfo = hypervNodeGetInfo; /* 0.9.5 */
On Wed, Sep 7, 2016 at 6:17 PM, Matthias Bolte <matthias.bolte@googlemail.com> wrote:
Hi there,
I was wondering if any of these patches actually made it into
I'm really looking forward hyper-v support improvement and features like shutdown VM (not destroy/turn off but clean shutdown) implemented. Especially interested in 2012/2012 R2 since 2008 is getting old and 2016 is right around the corner.
I'm already using libvirt 2.1.0 with some patches I found in https://github.com/vikhyath/libvirt-hyperv-r2-2012 but it would be great to have the code reviewed and merged into libvirt releases.
Thanks.
Fer
The following patches include work originally done by Yves Vinter back in 2014. The last patch introduces support for Hyper-V 2012, while still supporting 2008. I am not sure that the method I used to include
2016-09-07 23:14 GMT+02:00 Fernando Casas Schössow <casasfernando@hotmail.com>: libvirt code. the 2012
support is the best approach, mainly due to code duplication, but I am open to suggestions on how to do this better.
Jason Miesionczek (16): hyperv: additional server 2008 wmi classes hyperv: add cim types support to code generator hyperv: add get capabilities hyperv: implement connectGetVersion hyperv: implement vcpu functions hyperv: implement nodeGetFreeMemory hyperv: implement ability to send xml soap requests hyperv: introduce basic network driver hyperv: add domain shutdown function hyperv: add get scheduler functions hyperv: add set memory functions hyperv: set vpcu functions hyperv: domain undefine functions hyperv: domain define and associated functions hyperv: network list functions hyperv: introduce 2012 support
I had a quick look at these patches a while ago, but didn't get around to review them in detail yet.
Adding 2012 support while keeping 2008 supported is a bit tricky but doable I think.
-- Matthias Bolte http://photron.blogspot.com
-- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
-- Philipp Heckel Principal Engineer & Team Lead Datto, Inc. +1-475-288-1277 www.datto.com
Join the conversation!

Disregard my last email, it seems that while copying the patches from my browser some invisible chars got in. So I extracted the patches from the mailist txt archive. Now they are all applied just fine. Thanks. On jue, sep 8, 2016 at 6:48 , Fernando Casas Schössow <casasfernando@hotmail.com> wrote:
Hi Phil,
May I ask which libvirt version are you patching against? I'm trying to apply this patches to libvirt 2.2.0 but some of them are failing (for example patch 7).
Thanks.
Fer
On jue, sep 8, 2016 at 12:28 , Philipp Heckel <pheckel@datto.com> wrote:
We have a lot more implemented, but they're not cleaned up yet or properly tested. We'll submit them in the following weeks (ideally next week).
Again, if you need test infrastructure, contact me or Jason.
Here's what we have so far:
2012 ---- hypervHypervisorDriver.connectGetCapabilities = hypervConnectGetCapabilities; /* 2008 & 2012 */ hypervHypervisorDriver.connectGetHostname = hypervConnectGetHostname; /* 2008 & 2012 */ hypervHypervisorDriver.connectGetType = hypervConnectGetType; /* 2008 & 2012 */ hypervHypervisorDriver.connectIsAlive = hypervConnectIsAlive; /* 2008 & 2012 */ hypervHypervisorDriver.connectListAllDomains = hypervConnectListAllDomains2012; hypervHypervisorDriver.connectListDefinedDomains = hypervConnectListDefinedDomains2012; hypervHypervisorDriver.connectListDomains = hypervConnectListDomains2012; hypervHypervisorDriver.connectNumOfDefinedDomains = hypervConnectNumOfDefinedDomains2012; hypervHypervisorDriver.connectNumOfDomains = hypervConnectNumOfDomains2012; hypervHypervisorDriver.domainCreate = hypervDomainCreate2012; hypervHypervisorDriver.domainCreateWithFlags = hypervDomainCreateWithFlags2012; hypervHypervisorDriver.domainDefineXML = hypervDomainDefineXML2012; hypervHypervisorDriver.domainDestroyFlags = hypervDomainDestroyFlags2012; hypervHypervisorDriver.domainDestroy = hypervDomainDestroy2012; hypervHypervisorDriver.domainGetInfo = hypervDomainGetInfo2012; hypervHypervisorDriver.domainGetState = hypervDomainGetState2012; hypervHypervisorDriver.domainGetXMLDesc = hypervDomainGetXMLDesc2012; hypervHypervisorDriver.domainIsActive = hypervDomainIsActive2012; hypervHypervisorDriver.domainLookupByID = hypervDomainLookupByID2012; hypervHypervisorDriver.domainLookupByName = hypervDomainLookupByName2012; hypervHypervisorDriver.domainLookupByUUID = hypervDomainLookupByUUID2012; hypervHypervisorDriver.domainReboot = hypervDomainReboot2012; hypervHypervisorDriver.domainSendKey = hypervDomainSendKey2012; hypervHypervisorDriver.domainSetMemoryFlags = hypervDomainSetMemoryFlags2012; hypervHypervisorDriver.domainSetMemory = hypervDomainSetMemory2012; hypervHypervisorDriver.domainShutdownFlags = hypervDomainShutdownFlags2012; hypervHypervisorDriver.domainShutdown = hypervDomainShutdown2012; hypervHypervisorDriver.domainUndefineFlags = hypervDomainUndefineFlags2012; hypervHypervisorDriver.domainUndefine = hypervDomainUndefine2012; hypervHypervisorDriver.nodeGetFreeMemory = hypervNodeGetFreeMemory; /* 2008 & 2012 */ hypervHypervisorDriver.nodeGetInfo = hypervNodeGetInfo; /* 2008 & 2012 */
2008 ---- hypervHypervisorDriver.connectGetCapabilities = hypervConnectGetCapabilities; /* 1.2.10 */ hypervHypervisorDriver.connectGetHostname = hypervConnectGetHostname; /* 0.9.5 */ hypervHypervisorDriver.connectGetMaxVcpus = hypervConnectGetMaxVcpus; /* 1.2.10 */ hypervHypervisorDriver.connectGetType = hypervConnectGetType; /* 0.9.5 */ hypervHypervisorDriver.connectGetVersion = hypervConnectGetVersion; /* 1.2.10 */ hypervHypervisorDriver.connectIsAlive = hypervConnectIsAlive; /* 0.9.8 */ hypervHypervisorDriver.connectIsEncrypted = hypervConnectIsEncrypted; /* 0.9.5 */ hypervHypervisorDriver.connectIsSecure = hypervConnectIsSecure; /* 0.9.5 */ hypervHypervisorDriver.connectListAllDomains = hypervConnectListAllDomains; /* 0.10.2 */ hypervHypervisorDriver.connectListDefinedDomains = hypervConnectListDefinedDomains; /* 0.9.5 */ hypervHypervisorDriver.connectListDomains = hypervConnectListDomains; /* 0.9.5 */ hypervHypervisorDriver.connectNumOfDefinedDomains = hypervConnectNumOfDefinedDomains; /* 0.9.5 */ hypervHypervisorDriver.connectNumOfDomains = hypervConnectNumOfDomains; /* 0.9.5 */ hypervHypervisorDriver.domainAttachDeviceFlags = hypervDomainAttachDeviceFlags; /* 1.2.10 */ hypervHypervisorDriver.domainAttachDevice = hypervDomainAttachDevice; /* 1.2.10 */ hypervHypervisorDriver.domainCreate = hypervDomainCreate; /* 0.9.5 */ hypervHypervisorDriver.domainCreateWithFlags = hypervDomainCreateWithFlags; /* 0.9.5 */ hypervHypervisorDriver.domainCreateXML = hypervDomainCreateXML; /* 1.2.10 */ hypervHypervisorDriver.domainDefineXML = hypervDomainDefineXML; /* 1.2.10 */ hypervHypervisorDriver.domainDestroyFlags = hypervDomainDestroyFlags; /* 0.9.5 */ hypervHypervisorDriver.domainDestroy = hypervDomainDestroy; /* 0.9.5 */ hypervHypervisorDriver.domainGetAutostart = hypervDomainGetAutostart; /* 1.2.10 */ hypervHypervisorDriver.domainGetInfo = hypervDomainGetInfo; /* 0.9.5 */ hypervHypervisorDriver.domainGetMaxVcpus = hypervDomainGetMaxVcpus; /* 1.2.10 */ hypervHypervisorDriver.domainGetOSType = hypervDomainGetOSType; /* 0.9.5 */ hypervHypervisorDriver.domainGetSchedulerParametersFlags = hypervDomainGetSchedulerParametersFlags; /* 1.2.10 */ hypervHypervisorDriver.domainGetSchedulerParameters = hypervDomainGetSchedulerParameters; /* 1.2.10 */ hypervHypervisorDriver.domainGetSchedulerType = hypervDomainGetSchedulerType; /* 1.2.10 */ hypervHypervisorDriver.domainGetState = hypervDomainGetState; /* 0.9.5 */ hypervHypervisorDriver.domainGetVcpusFlags = hypervDomainGetVcpusFlags; /* 1.2.10 */ hypervHypervisorDriver.domainGetVcpus = hypervDomainGetVcpus; /* 1.2.10 */ hypervHypervisorDriver.domainGetXMLDesc = hypervDomainGetXMLDesc; /* 0.9.5 */ hypervHypervisorDriver.domainHasManagedSaveImage = hypervDomainHasManagedSaveImage; /* 0.9.5 */ hypervHypervisorDriver.domainIsActive = hypervDomainIsActive; /* 0.9.5 */ hypervHypervisorDriver.domainIsPersistent = hypervDomainIsPersistent; /* 0.9.5 */ hypervHypervisorDriver.domainIsUpdated = hypervDomainIsUpdated; /* 0.9.5 */ hypervHypervisorDriver.domainLookupByID = hypervDomainLookupByID; /* 0.9.5 */ hypervHypervisorDriver.domainLookupByName = hypervDomainLookupByName; /* 0.9.5 */ hypervHypervisorDriver.domainLookupByUUID = hypervDomainLookupByUUID; /* 0.9.5 */ hypervHypervisorDriver.domainManagedSave = hypervDomainManagedSave; /* 0.9.5 */ hypervHypervisorDriver.domainManagedSaveRemove = hypervDomainManagedSaveRemove; /* 0.9.5 */ hypervHypervisorDriver.domainReboot = hypervDomainReboot; /* 1.3.x */ hypervHypervisorDriver.domainResume = hypervDomainResume; /* 0.9.5 */ hypervHypervisorDriver.domainScreenshot = hypervDomainScreenshot; /* pjr - 08/08/16 */ hypervHypervisorDriver.domainSendKey = hypervDomainSendKey; /* 1.3.x */ hypervHypervisorDriver.domainSetAutostart = hypervDomainSetAutostart; /* 1.2.10 */ hypervHypervisorDriver.domainSetMaxMemory = hypervDomainSetMaxMemory; /* 1.2.10 */ hypervHypervisorDriver.domainSetMemoryFlags = hypervDomainSetMemoryFlags; /* 1.2.10 */ hypervHypervisorDriver.domainSetMemory = hypervDomainSetMemory; /* 1.2.10 */ hypervHypervisorDriver.domainSetVcpusFlags = hypervDomainSetVcpusFlags; /* 1.2.10 */ hypervHypervisorDriver.domainSetVcpus = hypervDomainSetVcpus; /* 1.2.10 */ hypervHypervisorDriver.domainShutdownFlags = hypervDomainShutdownFlags; /* 1.2.10 */ hypervHypervisorDriver.domainShutdown = hypervDomainShutdown; /* 1.2.10 */ hypervHypervisorDriver.domainSuspend = hypervDomainSuspend; /* 0.9.5 */ hypervHypervisorDriver.domainUndefineFlags = hypervDomainUndefineFlags; /* 1.2.10 */ hypervHypervisorDriver.domainUndefine = hypervDomainUndefine; /* 1.2.10 */ hypervHypervisorDriver.nodeGetFreeMemory = hypervNodeGetFreeMemory; /* 1.2.10 */ hypervHypervisorDriver.nodeGetInfo = hypervNodeGetInfo; /* 0.9.5 */
On Wed, Sep 7, 2016 at 6:17 PM, Matthias Bolte <matthias.bolte@googlemail.com> wrote:
Hi there,
I was wondering if any of these patches actually made it into
I'm really looking forward hyper-v support improvement and features like shutdown VM (not destroy/turn off but clean shutdown) implemented. Especially interested in 2012/2012 R2 since 2008 is getting old and 2016 is right around the corner.
I'm already using libvirt 2.1.0 with some patches I found in https://github.com/vikhyath/libvirt-hyperv-r2-2012 but it would be great to have the code reviewed and merged into libvirt releases.
Thanks.
Fer
The following patches include work originally done by Yves Vinter back in 2014. The last patch introduces support for Hyper-V 2012, while still supporting 2008. I am not sure that the method I used to include
2016-09-07 23:14 GMT+02:00 Fernando Casas Schössow <casasfernando@hotmail.com>: libvirt code. the 2012
support is the best approach, mainly due to code duplication, but I am open to suggestions on how to do this better.
Jason Miesionczek (16): hyperv: additional server 2008 wmi classes hyperv: add cim types support to code generator hyperv: add get capabilities hyperv: implement connectGetVersion hyperv: implement vcpu functions hyperv: implement nodeGetFreeMemory hyperv: implement ability to send xml soap requests hyperv: introduce basic network driver hyperv: add domain shutdown function hyperv: add get scheduler functions hyperv: add set memory functions hyperv: set vpcu functions hyperv: domain undefine functions hyperv: domain define and associated functions hyperv: network list functions hyperv: introduce 2012 support
I had a quick look at these patches a while ago, but didn't get around to review them in detail yet.
Adding 2012 support while keeping 2008 supported is a bit tricky but doable I think.
-- Matthias Bolte http://photron.blogspot.com
-- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
-- Philipp Heckel Principal Engineer & Team Lead Datto, Inc. +1-475-288-1277 www.datto.com
Join the conversation!
participants (3)
-
Fernando Casas Schössow
-
Matthias Bolte
-
Philipp Heckel