On 1/14/21 2:03 PM, Matt Coleman wrote:
This series starts by fixing a some dangerous behavior due to ambiguous
VM names, since Hyper-V allows multiple VMs to be defined with the same
name. That meant that `virsh dumpxml` could return XML for the wrong
domain. Additionally, when I implemented `undefine`, it would just
select one of the domains with the given name.
The majority of the series implements defining and undefining domains,
as well as attaching storage devices to domains.
Networking functionality will be in the next patch series.
Changes since v1:
* no longer checks domain state when undefining
- avoids a race condition
* does not implement domainCreateXML
- Hyper-V doesn't support transient VMs
* validates the SCSI controller model and address type
* validates the disk address type
* does not update NEWS.rst
- I have more patches after this set.
- Once they're all in, I'll add an entry to the 7.1 section.
Here's a GitLab MR, if you'd prefer to review the changes there:
https://gitlab.com/iammattcoleman/libvirt/-/merge_requests/14
Matt Coleman (10):
hyperv: ambiguous VM names will throw an error
hyperv: implement domainUndefine and domainUndefineFlags
hyperv: implement domainDefineXML
hyperv: add hypervMsvmVSMSAddResourceSettings
hyperv: create SCSI controllers when defining domains
hyperv: attach virtual disks when defining domains
hyperv: attach physical disks when defining domains
hyperv: attach virtual optical disks when defining domains
hyperv: attach floppy disks when defining domains
hyperv: implement domainAttachDevice and domainAttachDeviceFlags
include/libvirt/virterror.h | 1 +
src/hyperv/hyperv_driver.c | 855 ++++++++++++++++++++++++++++++++
src/hyperv/hyperv_wmi.c | 52 ++
src/hyperv/hyperv_wmi.h | 5 +
src/hyperv/hyperv_wmi_classes.h | 1 +
src/util/virerror.c | 6 +-
6 files changed, 918 insertions(+), 2 deletions(-)
Reviewed-by: Michal Privoznik <mpriv...@redhat.com>
and pushed.
Michal