]> xenbits.xensource.com Git - libvirt.git/commit
qemu: fix domain id after domainCreateWithFlags()
authorSascha Silbe <silbe@linux.vnet.ibm.com>
Wed, 27 Jul 2016 14:05:20 +0000 (16:05 +0200)
committerJán Tomko <jtomko@redhat.com>
Mon, 1 Aug 2016 09:28:20 +0000 (11:28 +0200)
commita5c420471b6de6afa001eb27ef2e4e66a022a381
tree39800c4b05315ed4555e72d1689255fbedb04029
parent71d341e7c6a72de347dd08f35b6819b4ce46e8fd
qemu: fix domain id after domainCreateWithFlags()

Ever since virDomainCreateWithFlags() was introduced by de3aadaa
[drivers: add virDomainCreateWithFlags if virDomainCreate exists], the
domain ID retrieved with virDomainGetID() was incorrect for several
drivers after virDomainCreateWithFlags() was called. The API consumer
had to look up the domain anew to retrieve the correct ID.

For the ESX driver, this was fixed in 6139b274 [esx: Update ID after
starting a domain]. For the openvz driver, it was fixed in fd81a097
[openvzDomainCreateWithFlags: set domain id to the correct value]. The
test driver, the OpenNebula driver (removed in the meantime) and the
vbox driver were already updating the domain ID correctly in
domainCreate().

Copy over the ID in qemuDomainCreateWithFlags() to fix this for the qemu
driver, too.

Fixes: de3aadaa ("drivers: add virDomainCreateWithFlags if virDomainCreate exists")
Reported-by: Marc Hartmayer <mhartmay@linux.vnet.ibm.com>
Signed-off-by: Sascha Silbe <silbe@linux.vnet.ibm.com>
Tested-by: Marc Hartmayer <mhartmay@linux.vnet.ibm.com>
Reviewed-by: Marc Hartmayer <mhartmay@linux.vnet.ibm.com>
src/qemu/qemu_driver.c