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@intel.com>
This commit is contained in:
kaf24@firebug.cl.cam.ac.uk committed 2006-03-14 15:40:44 +01:00
1 parent 3ba36f3595
commit 98b23dd14f
1 file changed
+7 -5
+7 -5
View File
@@ -72,8 +72,6 @@ class NetifController(DevController):
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,6 +85,13 @@ class NetifController(DevController):
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:
@@ -94,9 +99,6 @@ class NetifController(DevController):
if vifname:
back['vifname'] = vifname
front = { 'handle' : "%i" % devid,
'mac' : mac }
return (devid, back, front)
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.