xend: Fix tapdisk creation for managed domains
PATCH 1/1 xend: Fix tapdisk creation for managed domains
Hi,
The first start of a managed domain succeeds. But the second start of the managed domain fails as follows. The problem occurs when tapdisks are given to the managed domain. I think that the problem occurs because the uname of tapdisks is overwritten with "phy:/dev/xen/tadisk-2/tapdev*".
# xm new vm2
Using config file "/etc/xen/vm2".
# xm list --long vm2 | grep uname
(uname tap:aio:/xen/root-vm2.img)
# xm start vm2
# xm list --long vm2 | grep uname
(uname phy:/dev/xen/blktap-2/tapdev0)
# xm shutdown vm2
# xm list --long vm2 | grep uname
(uname phy:/dev/xen/blktap-2/tapdev0)
# xm start vm2
Error: need more than 2 values to unpack
Usage: xm start <DomainName>Start a Xend managed domain
-p, --paused Do not unpause domain after starting it
-c, --console_autoconnect Connect to the console after the domain
is created
--vncviewer Connect to display via VNC after the
domain is created
--vncviewer-autopass Pass VNC password to viewer via stdin and
-autopass
This patch solves the problem.
Best regards,
Kan
tools/python/xen/xend/XendConfig.py +1 -0
@@ -1360,6 +1360,7 @@ if dev_info['uname'].split(':')[1] not in blktap_disk_types: raise XendConfigError("tap:%s not a valid disk type" % dev_info['uname'].split(':')[1]) + dev_info['required_uname'] = dev_info['uname'] if dev_type == 'vif': if not dev_info.get('mac'):
tools/python/xen/xend/server/BlktapController.py +1 -1
@@ -120,7 +120,7 @@ def createDevice(self, config): - uname = config.get('uname', '') + uname = config.get('required_uname', '') try: (typ, subtyp, params, file) = string.split(uname, ':', 3) except:
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel