]> git.ipfire.org Git - thirdparty/libvirt.git/commit
hyperv: ambiguous VM names will throw an error
authorMatt Coleman <mcoleman@datto.com>
Thu, 14 Jan 2021 13:03:32 +0000 (08:03 -0500)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 21 Jan 2021 09:18:21 +0000 (10:18 +0100)
commit65e1b4fd266d903e0cde71643692061c20e7f273
tree800ff5e10b7d0ad68e462ec98281ee0b6326f1f5
parenta79ac43f04311e17afb01fc87e53bb1b5770e411
hyperv: ambiguous VM names will throw an error

Since Hyper-V allows multiple VMs to be created with the same name,
some commands produce unpredictable results due to
hypervDomainLookupByName's WMI query selecting the wrong domain.

For example, this prevents `virsh dumpxml` from outputting XML for the
wrong domain.

Signed-off-by: Matt Coleman <matt@datto.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
include/libvirt/virterror.h
src/hyperv/hyperv_driver.c
src/util/virerror.c