# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1211564341 25200
# Node ID d1f390aa4b58329816be4f562c6a75e28e8b15aa
# Parent 10f6cc2ec9940971f636bfd10b9f518c4c5d1487
[TEST] Add graphics and input devices to XenFV guest XML.
Also add pae, acpi, apic features.
Adding these tags fixes several issues:
-The ramdisk is 32 bit, so we need to use pae in order to boot properly.
-The guest uses a graphical console, so we need to define one in order to start the
guest.
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r 10f6cc2ec994 -r d1f390aa4b58 suites/libvirt-cim/lib/XenKvmLib/vxml.py
--- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py Fri May 23 10:39:01 2008 -0700
+++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py Fri May 23 10:39:01 2008 -0700
@@ -260,6 +260,7 @@
self.add_sub_node(domain, 'name', name)
self.add_sub_node(domain, 'uuid', uuid)
+ self.add_sub_node(domain, 'features')
self.add_sub_node(domain, 'os')
self.add_sub_node(domain, 'memory', mem * 1024)
self.add_sub_node(domain, 'vcpu', vcpu)
@@ -601,9 +602,16 @@
logger.error('Error: Disk image does not exist')
sys.exit(1)
VirtXML.__init__(self, 'xen', test_dom, set_uuid(), mem, vcpus)
+ self._features()
self._os(const.XenFV_default_loader)
self._devices(const.XenFV_default_emulator,
const.XenFV_default_net_type, mac, disk_file_path, disk)
+
+ def _features(self):
+ features = self.get_node('/domain/features')
+ self.add_sub_node(features, 'pae')
+ self.add_sub_node(features, 'acpi')
+ self.add_sub_node(features, 'apic')
def _os(self, os_loader):
os = self.get_node('/domain/os')
@@ -615,6 +623,9 @@
devices = self.get_node('/domain/devices')
self.add_sub_node(devices, 'emulator', emu)
+ self.add_sub_node(devices, 'graphics', type='vnc',
port='5900',
+ keymap='en-us')
+ self.add_sub_node(devices, 'input', type='mouse',
bus='xen')
interface = self.add_sub_node(devices, 'interface', type=net_type)
self.add_sub_node(interface, 'mac', address=net_mac)