Olivier Pernet
2006-Jun-20 09:12 UTC
[Xen-users] Problem passing command-line parameters to xm create
Hello, I''m trying to create domains using xm create by passing all the parameters on the command line, instead of putting them in /etc/xen/xmdefconfig (I''m generating them from a script). But, the very same configuration, while working when in the file, fails with inline parameters :>xm create name="domainFoo" kernel="/boot/vmlinuz-2.6-xen" memory=256root="/dev/sda1 ro" "disk=[ "file:/var/xen/domainFoo.img,sda1,w" ]" Using config file "xmdefconfig". Error: Device 2049 (vbd) could not be connected. Hotplug scripts not working. It seems that the "disk" parameter isn''t parsed correctly. Can you see what I''m doing wrongly ? Thanks in advance, -- Olivier Pernet Summer Student, CERN Openlab We are the knights who say echo ''16i[q]sa[ln0=aln100%Pln100/snlbx]sbA0D4D465452snlbxq''|dc _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Andrej Radonic
2006-Jun-20 09:20 UTC
Re: [Xen-users] Problem passing command-line parameters to xm create
> But, the very same configuration, while working when in the file, > fails with inline parameters : >> xm create name="domainFoo" kernel="/boot/vmlinuz-2.6-xen" memory=256 > root="/dev/sda1 ro" "disk=[ "file:/var/xen/domainFoo.img,sda1,w" ]" > Using config file "xmdefconfig". > Error: Device 2049 (vbd) could not be connected. Hotplug scripts not > working. >Olivier, according to the xm man page you should specify /dev/null as "config file" like this (taken from man): xm create /dev/null ramdisk=initrd-xen \ kernel=/boot/vmlinuz-xen \ name=ramdisk nics=0 vcpus=1 \ memory=64 root=/dev/ram0 Looks like in this case you should omit the quotation marks. Cheers, Andrej _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Olivier Pernet
2006-Jun-20 12:24 UTC
Re: [Xen-users] Problem passing command-line parameters to xm create
On 6/20/06, Pablo Javier Roca Mendez <pablo_javier_roca_mendez@linux.intel.com> wrote:> On Tue, Jun 20, 2006 at 11:12:57AM +0200, Olivier Pernet wrote: > > Hello, > > Hi! > > > I''m trying to create domains using xm create by passing all the > > parameters on the command line, instead of putting them in > > /etc/xen/xmdefconfig (I''m generating them from a script). > > > > But, the very same configuration, while working when in the file, > > fails with inline parameters : > > >xm create name="domainFoo" kernel="/boot/vmlinuz-2.6-xen" memory=256 > > root="/dev/sda1 ro" "disk=[ "file:/var/xen/domainFoo.img,sda1,w" ]" > > Using config file "xmdefconfig". > > Error: Device 2049 (vbd) could not be connected. Hotplug scripts not > > working. > > > > It seems that the "disk" parameter isn''t parsed correctly. Can you see > > what I''m doing wrongly ? > > Yes, the double quotes are interpreted by the shell. > Try surrounding them with single quotes like this instead: > ''disk=[ "file:/var/xen/domainFoo.img,sda1,w" ]'' > > Regards, > Pablo >It does not work this was either : [618] root@oplaslim9 [/etc/xen]>xm create /dev/null kernel="/boot/vmlinuz-2.6-xen" memory=256root="/dev/sda1 ro" disk=''[ "file:/var/xen/domainFoo.img,sda1,w" ]'' Using config file "/dev/null". Error: Device 2049 (vbd) could not be connected. Hotplug scripts not working. But somobody suggested another way, which is working : [613] root@oplaslim9 [/etc/xen]>xm create /dev/null kernel="/boot/vmlinuz-2.6-xen" memory=256root="/dev/sda1 ro" disk="file:/var/xen/domainFoo.img,sda1,w" Using config file "/dev/null". Started domain null Notice the removal of the [ ]. And it looks like it is possible to use several disks by putting several disk= parameters on the command line. -- Olivier Pernet We are the knights who say echo ''16i[q]sa[ln0=aln100%Pln100/snlbx]sbA0D4D465452snlbxq''|dc _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users