Add syntax check for block devices
PATCH 1/1 Add syntax check for block devices
Hi,
If we define wrong values to a disk parameter in domain configuration files, we get an error message or a guest OS panic.
1. If we define a wrong disk type, xm create command error occurs about 100 seconds later.
e.g. disk=['xyz:/xen/root-vm1.img,hda1,w']
2. If we forget a disk type, a guest OS panic occurs.
e.g. disk=['/xen/root-vm1.img,hda1,w']
This patch adds syntax checks of disk types.
Best regards,
Kan
tools/python/xen/xend/server/blkif.py +5 -1
@@ -56,8 +56,12 @@ class BlkifController(DevController): else: try: (typ, params) = string.split(uname, ':', 1) + if typ not in ('phy', 'file'): + raise VmError( + 'Block device must have "phy" or "file" specified to type') except ValueError: - (typ, params) = ("", "") + raise VmError( + 'Block device must have physical details specified') mode = config.get('mode', 'r') if mode not in ('r', 'w', 'w!'):
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Hi,
I cannnot boot a guest with disks of 'tap' type specified in the config file since cs 17617, unfortunately :-( Attached patch would fix the issue.
Thanks,
-- Yosuke
Quoted 22 lines · Masaki Kanno
Hi,
If we define wrong values to a disk parameter in domain configuration files, we get an error message or a guest OS panic.
1. If we define a wrong disk type, xm create command error occurs about 100 seconds later.
e.g. disk=['xyz:/xen/root-vm1.img,hda1,w']2. If we forget a disk type, a guest OS panic occurs.
e.g. disk=['/xen/root-vm1.img,hda1,w']This patch adds syntax checks of disk types.
Signed-off-by Masaki Kanno <[email protected]>Best regards,
Kan
Quoted 6 lines
------------------------------------------------------------------------
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Xend: Fix blkif type check for tap devices.
tools/python/xen/xend/server/blkif.py +3 -2
@@ -56,9 +56,10 @@ class BlkifController(DevController): else: try: (typ, params) = string.split(uname, ':', 1) - if typ not in ('phy', 'file'): + if typ not in ('phy', 'file', 'tap'): raise VmError( - 'Block device must have "phy" or "file" specified to type') + 'Block device must have "phy", "file" or "tap" ' + 'specified to type') except ValueError: raise VmError( 'Block device must have physical details specified')
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Quoted 8 lines · Yosuke Iwamatsu
Hi,
I cannnot boot a guest with disks of 'tap' type specified in the config file since cs 17617, unfortunately :-( Attached patch would fix the issue.
Thanks,
-- Yosuke
Oops! Thank you, Yosuke.
Best regards,
Kan
Quoted 37 lines
Quoted 22 lines · Masaki Kanno
Hi,
If we define wrong values to a disk parameter in domain configuration files, we get an error message or a guest OS panic.
1. If we define a wrong disk type, xm create command error occurs about 100 seconds later.
e.g. disk=['xyz:/xen/root-vm1.img,hda1,w']2. If we forget a disk type, a guest OS panic occurs.
e.g. disk=['/xen/root-vm1.img,hda1,w']This patch adds syntax checks of disk types.
Signed-off-by Masaki Kanno <[email protected]>Best regards,
KanQuoted 6 lines
------------------------------------------------------------------------
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel-------------------------------text/plain-------------------------------
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel