@@ -474,7 +474,7 @@ class VM(virt_vm.BaseVM):
lun=None):
name = None
dev = ""
- if self.params.get("use_bootindex") in ['yes', 'on', True]:
+ if not re.search("boot=on\|off", help, re.MULTILINE):
if boot in ['yes', 'on', True]:
bootindex = "1"
boot = "unused"
@@ -550,7 +550,8 @@ class VM(virt_vm.BaseVM):
cmd += _add_option("werror", werror)
cmd += _add_option("serial", serial)
cmd += _add_option("snapshot", snapshot, bool)
- if re.search("boot=on\|off", help, re.MULTILINE):
+ # Only add boot=on/off if necessary (deprecated in newer qemu)
+ if boot != "unused":
cmd += _add_option("boot", boot, bool)
cmd += _add_option("id", name)
cmd += _add_option("readonly", readonly, bool)