mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 02:30:03 +01:00
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:
1 parent
3ba36f3595
commit
98b23dd14f
1 file changed
+7
-5
@@ -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)
|
||||
|
||||
|
||||
|
||||