[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] Fix the bug that hvm domain network breaks after xm reboot. Root



# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 1c24ee05f8f3e0180d28ac3922ed984b8e0d0735
# Parent  14bfb2eb950508e2a45aeb31cc164704632cd5e5
Fix the bug that hvm domain network breaks after xm reboot.  Root
cause: qemu network related info is not saved in xenstore, so after
reboot, this information is missing, and qemu can not start network.

Signed-off-by: Haifeng Xue <haifeng.xue@xxxxxxxxx>

diff -r 14bfb2eb9505 -r 1c24ee05f8f3 tools/python/xen/xend/server/netif.py
--- a/tools/python/xen/xend/server/netif.py     Tue Mar 14 14:36:40 2006
+++ b/tools/python/xen/xend/server/netif.py     Tue Mar 14 14:40:44 2006
@@ -72,8 +72,6 @@
                               sxp.child_value(config, 'script',
                                               xroot.get_vif_script()))
         typ = sxp.child_value(config, 'type')
-        if typ == 'ioemu':
-            return (None,{},{})
         bridge  = sxp.child_value(config, 'bridge')
         mac     = sxp.child_value(config, 'mac')
         vifname = sxp.child_value(config, 'vifname')
@@ -87,15 +85,19 @@
         back = { 'script' : script,
                  'mac'    : mac,
                  'handle' : "%i" % devid }
+
+        if typ == 'ioemu':
+            front = {}
+            back['type'] = 'ioemu'
+        else:
+            front = { 'handle' : "%i" % devid,
+                      'mac'    : mac }
         if ipaddr:
             back['ip'] = ' '.join(ipaddr)
         if bridge:
             back['bridge'] = bridge
         if vifname:
             back['vifname'] = vifname
-
-        front = { 'handle' : "%i" % devid,
-                  'mac'    : mac }
 
         return (devid, back, front)
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.