[Libvirt-cim] [PATCH] [TEST] Add the emulator to the guest created by LXC cimtest

Richard Maciel rmaciel at linux.vnet.ibm.com
Wed Nov 18 21:54:56 UTC 2009


# HG changeset patch
# User Richard Maciel <richardm at br.ibm.com>
# Date 1258573335 7200
# Node ID 815eeee7df1d386da57a3e1e6a477bebb0be0aab
# Parent  f834593694d2f3eefc3b0285ac62032ddc68edd0
[TEST] Add the emulator to the guest created by LXC cimtest

Signed-off-by: Richard Maciel <rmaciel at linux.vnet.ibm.com>

diff -r f834593694d2 -r 815eeee7df1d suites/libvirt-cim/lib/XenKvmLib/const.py
--- a/suites/libvirt-cim/lib/XenKvmLib/const.py	Wed Nov 18 17:24:36 2009 -0200
+++ b/suites/libvirt-cim/lib/XenKvmLib/const.py	Wed Nov 18 17:42:15 2009 -0200
@@ -104,6 +104,7 @@
 
 #vxml.LXCXML
 LXC_init_path = os.path.join(_image_dir, 'cimtest_lxc_init')
+LXC_default_emulator = '/usr/libexec/libvirt_lxc'
 LXC_default_tty = '/dev/ptmx'
 LXC_default_mp = '/tmp'
 LXC_default_source = '/var/lib/libvirt/images/lxc_files'
diff -r f834593694d2 -r 815eeee7df1d suites/libvirt-cim/lib/XenKvmLib/vxml.py
--- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py	Wed Nov 18 17:24:36 2009 -0200
+++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py	Wed Nov 18 17:42:15 2009 -0200
@@ -987,7 +987,7 @@
                          mem, const.default_mallocunits, None, grstype, 
                          address, port_num, keymap, irstype, btype, vnc_passwd)
         self._os(const.LXC_init_path)
-        self._devices(mac, ntype, net_name, const.LXC_default_tty)
+        self._devices(const.LXC_default_emulator, mac, ntype, net_name, const.LXC_default_tty)
         self.create_lxc_file(CIM_IP, const.LXC_init_path)
 
     def _os(self, os_init):
@@ -995,9 +995,11 @@
         self.add_sub_node(os, 'init', os_init)
         self.add_sub_node(os, 'type', 'exe')
 
-    def _devices(self, net_mac, net_type, net_name, tty_set):
+    def _devices(self, emu, net_mac, net_type, net_name, tty_set):
         devices = self.get_node('/domain/devices')
-      
+    
+        self.add_sub_node(devices, 'emulator', emu) #'/usr/libexec/libvirt_lxc')
+  
         if const.LXC_netns_support is True:
             self.set_interface_details(devices, net_mac, net_type, 
                                        net_name, 'LXC')




More information about the Libvirt-cim mailing list