Created
March 2, 2015 18:44
-
-
Save mgagne/95046681c59e4e20989c to your computer and use it in GitHub Desktop.
Migration fails between QEMU 1.5 and QEMU 2.0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- a/src/qemu/qemu_migration.c | |
+++ b/src/qemu/qemu_migration.c | |
@@ -2109,6 +2109,13 @@ | |
VIR_STRDUP(def->os.machine, "pc-1.0-precise") < 0) | |
goto cleanup; | |
} | |
+ if (STREQ_NULLABLE(vm->def->os.machine, "pc-i440fx-1.5")) { | |
+ VIR_FREE(vm->def->os.machine); | |
+ VIR_FREE(def->os.machine); | |
+ if (VIR_STRDUP(vm->def->os.machine, "pc-i440fx-1.5-saucy") < 0 || | |
+ VIR_STRDUP(def->os.machine, "pc-i440fx-1.5-saucy") < 0) | |
+ goto cleanup; | |
+ } | |
} | |
rv = qemuDomainDefFormatLive(driver, def, false, true); | |
@@ -2447,6 +2454,11 @@ | |
if (VIR_STRDUP(vm->def->os.machine, "pc-1.0-precise") < 0) | |
goto endjob; | |
} | |
+ if (STREQ_NULLABLE(vm->def->os.machine, "pc-i440fx-1.5")) { | |
+ VIR_FREE(vm->def->os.machine); | |
+ if (VIR_STRDUP(vm->def->os.machine, "pc-i440fx-1.5-saucy") < 0) | |
+ goto endjob; | |
+ } | |
} | |
/* Start the QEMU daemon, with the same command-line arguments plus |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- a/hw/i386/pc_piix.c | |
+++ b/hw/i386/pc_piix.c | |
@@ -438,6 +438,46 @@ | |
}, | |
}; | |
+/* PC machine init function for qemu-kvm 1.5 */ | |
+static void pc_init_pci_1_5_qemu_kvm(QEMUMachineInitArgs *args) | |
+{ | |
+ piix4_pm_class_fix_compat(); | |
+ pit_common_class_fix_compat(); | |
+ pc_compat_1_5(args); | |
+ pc_init_pci(args); | |
+} | |
+ | |
+#define PC_COMPAT_1_5_QEMU_KVM \ | |
+ PC_COMPAT_1_5,\ | |
+ {\ | |
+ .driver = "cirrus-vga",\ | |
+ .property = "vgamem_mb",\ | |
+ .value = stringify(8),\ | |
+ },{\ | |
+ .driver = "virtio-net-pci", \ | |
+ .property = "romfile", \ | |
+ .value = "pxe-virtio.rom", \ | |
+ },{\ | |
+ .driver = "rtl8139",\ | |
+ .property = "romfile",\ | |
+ .value = "pxe-rtl8139.rom",\ | |
+ },{\ | |
+ .driver = "e1000",\ | |
+ .property = "romfile",\ | |
+ .value = "pxe-e1000.rom",\ | |
+ } | |
+ | |
+static QEMUMachine pc_i440fx_machine_v1_5_qemu_kvm = { | |
+ PC_I440FX_1_6_MACHINE_OPTIONS, | |
+ .name = "pc-i440fx-1.5-qemu-kvm", | |
+ .alias = "pc-i440fx-1.5-saucy", | |
+ .init = pc_init_pci_1_5_qemu_kvm, | |
+ .compat_props = (GlobalProperty[]) { | |
+ PC_COMPAT_1_5_QEMU_KVM, | |
+ { /* end of list */ } | |
+ }, | |
+}; | |
+ | |
#define PC_I440FX_1_4_MACHINE_OPTIONS \ | |
PC_I440FX_1_6_MACHINE_OPTIONS, \ | |
.hot_add_cpu = NULL | |
@@ -863,6 +903,7 @@ | |
qemu_register_machine(&pc_i440fx_machine_v1_7); | |
qemu_register_machine(&pc_i440fx_machine_v1_6); | |
qemu_register_machine(&pc_i440fx_machine_v1_5); | |
+ qemu_register_machine(&pc_i440fx_machine_v1_5_qemu_kvm); | |
qemu_register_machine(&pc_i440fx_machine_v1_4); | |
qemu_register_machine(&pc_machine_v1_3); | |
qemu_register_machine(&pc_machine_v1_2); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment