[Libvirt-cim] [PATCH] [TEST] #2 Add graphics and input devices to XenFV guest XML

Deepti B Kalakeri deeptik at linux.vnet.ibm.com
Thu Jun 12 07:01:08 UTC 2008


+1 for me.

Kaitlin Rupert wrote:
> # HG changeset patch
> # User Kaitlin Rupert <karupert at us.ibm.com>
> # Date 1211564341 25200
> # Node ID fdc71e98f2d1417fcd50bb8b2b6a91300a8296c4
> # Parent  ce82fc9aff4863ee737475bf7eb647138ad000ed
> [TEST] #2 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.
>
> Updates:
>   -Rebased one recent sources.
>   -Fixed compatibility issue with KVM and Xen
>
> Note:  This will not fix issues with tests that use DefineSystem() to create guests.
>
> Signed-off-by: Kaitlin Rupert <karupert at us.ibm.com>
>
> diff -r ce82fc9aff48 -r fdc71e98f2d1 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
> @@ -253,6 +253,11 @@
>      dname = ""                # domain name
>
>      def __init__(self, domain_type, name, uuid, mem, vcpu):
> +        is_XenFV = False
> +        if domain_type == "xenfv":
> +            is_XenFV = True
> +            domain_type = "xen"
> +
>          XMLClass.__init__(self)
>          Virsh.__init__(self, domain_type)
>          # domain root nodes
> @@ -260,6 +265,10 @@
>
>          self.add_sub_node(domain, 'name', name)
>          self.add_sub_node(domain, 'uuid', uuid)
> +        
> +        if is_XenFV is True:
> +            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)
> @@ -631,10 +640,17 @@
>          if not os.path.exists(disk_file_path):
>              logger.error('Error: Disk image does not exist')
>              sys.exit(1)
> -        VirtXML.__init__(self, 'xen', test_dom, set_uuid(), mem, vcpus)
> +        VirtXML.__init__(self, 'xenfv', test_dom, set_uuid(), mem, vcpus)
> +        self._features()
>          self._os(const.XenFV_default_loader)
>          self._devices(const.XenFV_default_emulator,
>                        const.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')
> @@ -646,6 +662,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')
>          disk = self.add_sub_node(devices, 'disk', type='file')
>          self.add_sub_node(disk, 'source', file=disk_img)
>          self.add_sub_node(disk, 'target', dev=disk_dev)
>
> _______________________________________________
> Libvirt-cim mailing list
> Libvirt-cim at redhat.com
> https://www.redhat.com/mailman/listinfo/libvirt-cim
>   




More information about the Libvirt-cim mailing list