Don't pass kernel args to Xen HVM instances

The refactoring in commit c0f67877 missed setting guest.os_root for
Xen PV instances only.  If set for Xen HVM instances, the xen tools
will invoke qemu-dm with '-append root=/dev/xxx'.  qemu-dm promptly
failes with '-append only allowed with -kernel option'.

Change-Id: Iba8054b728e28463fb221d44417b1ddba323f596
This commit is contained in:
Jim Fehlig
2012-07-30 21:10:19 -06:00
parent 5428e519e3
commit f7a1abff1f

View File

@@ -1422,6 +1422,15 @@ class LibvirtConnTestCase(test.TestCase):
check = (lambda t: t.find('./os/kernel'), None)
check_list.append(check)
# Hypervisors that only support vm_mode.HVM should
# not produce configuration that results in kernel
# arguments
if not expect_kernel and hypervisor_type in ['qemu', 'kvm']:
check = (lambda t: t.find('./os/root'), None)
check_list.append(check)
check = (lambda t: t.find('./os/cmdline'), None)
check_list.append(check)
if expect_ramdisk:
check = (lambda t: t.find('./os/initrd').text.split(
'/')[1], 'ramdisk' + suffix)