1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-22 17:34:18 +03:00

xen: recognize device_model_override

Since Xen 4.2 libxl expects device_model_override="/path" instead of
device_model="/path". Adjust the code to parse this as <emulator>.

While libxl also recognizes device_model_version="", this knob is not
required for libvirt. A runtime detection exists in libvirt to select
either "qemu-xen" or "qemu-xen-traditional".
Since qemu-xen-traditional is marked as supported just for stubdoms
there is no need to handle it.

Test data files with 'device_model' were adjusted to use
'device_model_override' instead.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Reviewed-by: Jim Fehlig <jfehlig@suse.com>
This commit is contained in:
Olaf Hering 2020-11-20 13:29:14 +01:00 committed by Jim Fehlig
parent cf4e7e620a
commit df89071faa
61 changed files with 62 additions and 62 deletions

View File

@ -1508,7 +1508,7 @@ xenParseConfigCommon(virConfPtr conf,
if (xenParseTimeOffset(conf, def) < 0)
return -1;
if (xenConfigCopyStringOpt(conf, "device_model", &def->emulator) < 0)
if (xenConfigCopyStringOpt(conf, "device_model_override", &def->emulator) < 0)
return -1;
if (STREQ(nativeFormat, XEN_CONFIG_FORMAT_XL)) {
@ -2242,7 +2242,7 @@ static int
xenFormatEmulator(virConfPtr conf, virDomainDefPtr def)
{
if (def->emulator &&
xenConfigSetString(conf, "device_model", def->emulator) < 0)
xenConfigSetString(conf, "device_model_override", def->emulator) < 0)
return -1;
return 0;

View File

@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
device_model = "/usr/lib/xen/bin/qemu-system-i386"
device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1

View File

@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
device_model = "/usr/lib/xen/bin/qemu-system-i386"
device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1

View File

@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
device_model = "/usr/lib/xen/bin/qemu-system-i386"
device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1

View File

@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
device_model = "/usr/lib/xen/bin/qemu-system-i386"
device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1

View File

@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
device_model = "/usr/lib/xen/bin/qemu-system-i386"
device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1

View File

@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
device_model = "/usr/lib/xen/bin/qemu-system-i386"
device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1

View File

@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
device_model = "/usr/lib/xen/bin/qemu-system-i386"
device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1

View File

@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
device_model = "/usr/lib/xen/bin/qemu-system-i386"
device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1

View File

@ -14,7 +14,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
device_model = "/usr/lib/xen/bin/qemu-system-i386"
device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1

View File

@ -13,7 +13,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
device_model = "/usr/lib/xen/bin/qemu-system-i386"
device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1

View File

@ -15,7 +15,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
device_model = "/usr/lib/xen/bin/qemu-system-i386"
device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1

View File

@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
device_model = "/usr/lib/xen/bin/qemu-system-i386"
device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1

View File

@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
device_model = "/usr/lib/xen/bin/qemu-system-i386"
device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1

View File

@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
device_model = "/usr/lib/xen/bin/qemu-system-i386"
device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1

View File

@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
device_model = "/usr/lib/xen/bin/qemu-system-i386"
device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1

View File

@ -13,7 +13,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
device_model = "/usr/lib/xen/bin/qemu-system-i386"
device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1

View File

@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
device_model = "/usr/lib/xen/bin/qemu-system-i386"
device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1

View File

@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
device_model = "/usr/lib/xen/bin/qemu-system-i386"
device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1

View File

@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
device_model = "/usr/lib/xen/bin/qemu-system-i386"
device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1

View File

@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
device_model = "/usr/lib/xen/bin/qemu-system-i386"
device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1

View File

@ -14,7 +14,7 @@ localtime = 1
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
device_model = "/usr/lib/xen/bin/qemu-system-i386"
device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1

View File

@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
device_model = "/usr/lib/xen/bin/qemu-system-i386"
device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 0
parallel = "none"

View File

@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
device_model = "/usr/lib/xen/bin/qemu-system-i386"
device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1

View File

@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
device_model = "/usr/lib/xen/bin/qemu-system-i386"
device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1

View File

@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
device_model = "/usr/lib/xen/bin/qemu-system-i386"
device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1

View File

@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
device_model = "/usr/lib/xen/bin/qemu-system-i386"
device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1

View File

@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
device_model = "/usr/lib/xen/bin/qemu-system-i386"
device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1

View File

@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
device_model = "/usr/lib/xen/bin/qemu-system-i386"
device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1

View File

@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
device_model = "/usr/lib/xen/bin/qemu-system-i386"
device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1

View File

@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
device_model = "/usr/lib/xen/bin/qemu-system-i386"
device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1

View File

@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
device_model = "/usr/lib/xen/bin/qemu-system-i386"
device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
vif = [ "mac=00:16:3e:66:92:9c,bridge=xenbr1,script=vif-bridge,model=e1000" ]
parallel = "none"
serial = "none"

View File

@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
device_model = "/usr/lib/xen/bin/qemu-system-i386"
device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
vif = [ "mac=00:16:3e:66:92:9c,bridge=xenbr1,script=vif-bridge,model=e1000" ]
parallel = "none"
serial = "none"

View File

@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
device_model = "/usr/lib/xen/bin/qemu-system-i386"
device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1

View File

@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
device_model = "/usr/lib/xen/bin/qemu-system-i386"
device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1

View File

@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
device_model = "/usr/lib/xen/bin/qemu-system-i386"
device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1

View File

@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
device_model = "/usr/lib/xen/bin/qemu-system-i386&test"
device_model_override = "/usr/lib/xen/bin/qemu-system-i386&test"
sdl = 0
vnc = 1
vncunused = 1

View File

@ -13,7 +13,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
device_model = "/usr/lib/xen/bin/qemu-system-i386"
device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1

View File

@ -13,7 +13,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
device_model = "/usr/lib/xen/bin/qemu-system-i386"
device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1

View File

@ -13,7 +13,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
device_model = "/usr/lib/xen/bin/qemu-system-i386"
device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1

View File

@ -12,7 +12,7 @@ localtime = 1
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
device_model = "/usr/lib/xen/bin/qemu-system-i386"
device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1

View File

@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
device_model = "/usr/lib/xen/bin/qemu-system-i386"
device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1

View File

@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
device_model = "/usr/lib/xen/bin/qemu-system-i386"
device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1

View File

@ -13,7 +13,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
device_model = "/usr/lib/xen/bin/qemu-system-i386"
device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1

View File

@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
device_model = "/usr/lib/xen/bin/qemu-system-i386"
device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1

View File

@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
device_model = "/usr/lib/xen/bin/qemu-system-i386"
device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1

View File

@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
device_model = "/usr/lib/xen/bin/qemu-system-i386"
device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1

View File

@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
device_model = "/usr/lib/xen/bin/qemu-system-i386"
device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1

View File

@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
device_model = "/usr/lib/xen/bin/qemu-system-i386"
device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1

View File

@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
device_model = "/usr/lib/xen/bin/qemu-system-i386"
device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1

View File

@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
device_model = "/usr/lib/xen/bin/qemu-system-i386"
device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1

View File

@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
device_model = "/usr/lib/xen/bin/qemu-system-i386"
device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1

View File

@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
device_model = "/usr/lib/xen/bin/qemu-system-i386"
device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1

View File

@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
device_model = "/usr/lib/xen/bin/qemu-system-i386"
device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1

View File

@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
device_model = "/usr/lib/xen/bin/qemu-system-i386"
device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1

View File

@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
device_model = "/usr/lib/xen/bin/qemu-system-i386"
device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1

View File

@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
device_model = "/usr/lib/xen/bin/qemu-system-i386"
device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1

View File

@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
device_model = "/usr/lib/xen/bin/qemu-system-i386"
device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1

View File

@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "destroy"
on_crash = "destroy"
device_model = "/usr/lib/xen/bin/qemu-system-i386"
device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1

View File

@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "destroy"
on_crash = "destroy"
device_model = "/usr/lib/xen/bin/qemu-system-i386"
device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1

View File

@ -12,7 +12,7 @@ localtime = 0
on_poweroff = "destroy"
on_reboot = "destroy"
on_crash = "destroy"
device_model = "/usr/lib/xen/bin/qemu-system-i386"
device_model_override = "/usr/lib/xen/bin/qemu-system-i386"
sdl = 0
vnc = 1
vncunused = 1