2015-05-04 22:15:01 +02:00
|
|
|
Use the correct qemu emulator based on the architecture.
|
2015-07-10 16:37:12 +02:00
|
|
|
We want to get away from using the old qemu-dm emulator
|
|
|
|
for Xen HVM guests so default to qemu-system-i386.
|
2015-11-26 00:27:12 +01:00
|
|
|
Index: virt-manager-1.3.0/virtinst/guest.py
|
2014-03-28 15:17:05 +01:00
|
|
|
===================================================================
|
2015-11-26 00:27:12 +01:00
|
|
|
--- virt-manager-1.3.0.orig/virtinst/guest.py
|
|
|
|
+++ virt-manager-1.3.0/virtinst/guest.py
|
|
|
|
@@ -849,14 +849,29 @@ class Guest(XMLBuilder):
|
2014-03-28 15:17:05 +01:00
|
|
|
self.emulator = None
|
|
|
|
return
|
|
|
|
|
|
|
|
- if self.emulator:
|
2014-04-29 00:47:42 +02:00
|
|
|
+ if self.conn.is_qemu():
|
2014-05-01 05:32:04 +02:00
|
|
|
+ if self.os.arch == "s390x":
|
|
|
|
+ preferred_emulator = "/usr/bin/qemu-system-s390x"
|
2015-05-04 22:15:01 +02:00
|
|
|
+ elif self.os.arch == "ppc64" or self.os.arch == "ppc64le":
|
|
|
|
+ preferred_emulator = "/usr/bin/qemu-system-ppc64"
|
2014-05-01 05:32:04 +02:00
|
|
|
+ else:
|
|
|
|
+ preferred_emulator = "/usr/bin/qemu-system-x86_64"
|
2014-12-09 18:47:26 +01:00
|
|
|
+ elif self.conn.is_lxc():
|
|
|
|
+ preferred_emulator = "/usr/lib/libvirt/libvirt_lxc"
|
|
|
|
+ if not os.path.exists(preferred_emulator):
|
|
|
|
+ preferred_emulator = "/usr/lib64/libvirt/libvirt_lxc"
|
2014-04-29 00:47:42 +02:00
|
|
|
+ else:
|
|
|
|
+ preferred_emulator = "/usr/lib/xen/bin/qemu-system-i386"
|
2014-03-28 15:17:05 +01:00
|
|
|
+ if self.emulator and self.emulator == preferred_emulator:
|
|
|
|
return
|
|
|
|
|
2014-04-29 00:47:42 +02:00
|
|
|
- if self.os.is_hvm() and self.type == "xen":
|
2014-03-28 15:17:05 +01:00
|
|
|
- if self.conn.caps.host.cpu.arch == "x86_64":
|
|
|
|
- self.emulator = "/usr/lib64/xen/bin/qemu-dm"
|
2014-04-29 00:47:42 +02:00
|
|
|
- else:
|
|
|
|
- self.emulator = "/usr/lib/xen/bin/qemu-dm"
|
|
|
|
+ if os.path.exists(preferred_emulator):
|
|
|
|
+ self.emulator = preferred_emulator
|
|
|
|
+ elif self.os.is_hvm() and self.type == "xen":
|
2015-07-10 16:37:12 +02:00
|
|
|
+ # We don't want to use the old qemu-dm for xen
|
|
|
|
+ self.emulator = "/usr/lib/xen/bin/qemu-system-i386"
|
2014-05-01 05:32:04 +02:00
|
|
|
+ elif not self.emulator:
|
2014-04-29 00:47:42 +02:00
|
|
|
+ self.emulator = "/usr/bin/qemu-kvm"
|
2014-03-28 15:17:05 +01:00
|
|
|
|
2014-04-29 00:47:42 +02:00
|
|
|
def _set_cpu_defaults(self):
|
|
|
|
self.cpu.set_topology_defaults(self.vcpus)
|