mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-26 18:41:17 +00:00
Fix lookup of xen VM after define (Cole Robinson)
This commit is contained in:
parent
ff7ecc1d5b
commit
8f762e34f3
@ -1,3 +1,8 @@
|
||||
Thu Aug 28 12:58:15 BST 2008 Daniel P. Berrange <berrange@redhat.com>
|
||||
|
||||
* src/xend_internal.c: Fix lookup of Xen VMs after define
|
||||
(patch from Cole Robinson)
|
||||
|
||||
Thu Aug 28 11:08:15 CEST 2008 Jim Meyering <meyering@redhat.com>
|
||||
|
||||
improve parallel build support
|
||||
|
@ -4270,7 +4270,6 @@ xenDaemonDomainMigratePerform (virDomainPtr domain,
|
||||
virDomainPtr xenDaemonDomainDefineXML(virConnectPtr conn, const char *xmlDesc) {
|
||||
int ret;
|
||||
char *sexpr;
|
||||
char *name = NULL;
|
||||
virDomainPtr dom;
|
||||
xenUnifiedPrivatePtr priv;
|
||||
virDomainDefPtr def;
|
||||
@ -4292,15 +4291,17 @@ virDomainPtr xenDaemonDomainDefineXML(virConnectPtr conn, const char *xmlDesc) {
|
||||
goto error;
|
||||
}
|
||||
|
||||
DEBUG("Defining w/ sexpr: \n%s", sexpr);
|
||||
|
||||
ret = xend_op(conn, "", "op", "new", "config", sexpr, NULL);
|
||||
VIR_FREE(sexpr);
|
||||
if (ret != 0) {
|
||||
virXendError(conn, VIR_ERR_XEN_CALL,
|
||||
_("Failed to create inactive domain %s\n"), name);
|
||||
_("Failed to create inactive domain %s\n"), def->name);
|
||||
goto error;
|
||||
}
|
||||
|
||||
dom = virDomainLookupByName(conn, name);
|
||||
dom = virDomainLookupByName(conn, def->name);
|
||||
if (dom == NULL) {
|
||||
goto error;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user