mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
Reset migration source after failed VM start
This commit is contained in:
parent
175e1711a6
commit
af10d71cc2
@ -1,3 +1,8 @@
|
||||
Wed Oct 10 15:44:53 EST 2007 Daniel P. Berrange <berrange@redhat.com>
|
||||
|
||||
* src/qemu_driver.c: Reset migration source after failed attempt
|
||||
to start a VM. (Jim Paris)
|
||||
|
||||
Wed Oct 10 13:48:53 EST 2007 Daniel P. Berrange <berrange@redhat.com>
|
||||
|
||||
* src/xm_internal.c: Fixed procesing of vncunused, and vncdisplay
|
||||
|
@ -2083,6 +2083,7 @@ static int qemudDomainRestore(virConnectPtr conn,
|
||||
struct qemud_vm_def *def;
|
||||
struct qemud_vm *vm;
|
||||
int fd;
|
||||
int ret;
|
||||
char *xml;
|
||||
struct qemud_save_header header;
|
||||
|
||||
@ -2161,18 +2162,17 @@ static int qemudDomainRestore(virConnectPtr conn,
|
||||
/* Set the migration source and start it up. */
|
||||
snprintf(vm->migrateFrom, sizeof(vm->migrateFrom), "stdio");
|
||||
vm->stdin = fd;
|
||||
|
||||
if (qemudStartVMDaemon(conn, driver, vm) < 0) {
|
||||
ret = qemudStartVMDaemon(conn, driver, vm);
|
||||
close(fd);
|
||||
vm->migrateFrom[0] = '\0';
|
||||
vm->stdin = -1;
|
||||
if (ret < 0) {
|
||||
qemudReportError(conn, NULL, NULL, VIR_ERR_OPERATION_FAILED,
|
||||
"failed to start VM");
|
||||
if (!vm->configFile[0])
|
||||
qemudRemoveInactiveVM(driver, vm);
|
||||
close(fd);
|
||||
return -1;
|
||||
}
|
||||
close(fd);
|
||||
vm->migrateFrom[0] = '\0';
|
||||
vm->stdin = -1;
|
||||
|
||||
/* If it was running before, resume it now. */
|
||||
if (header.was_running) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user