Christian Nitschmann
2008-Jun-18 07:40 UTC
[Xen-users] vm create test ="losetup /dev/loop0 /data/xen/domains/test/disk.img failed"
Dear mailing-list after several attempts to start a xen linux-vm on a Fedora 8 XEN-System (Quadcore Xeon-System with 8GB RAM and VT/PAE enabled), i now really need your help. I sucessfully created and installed a new debian etch-vm with the well known debootstrap-script. I got 10 unused loop-devices which should be more than enough for at least one xen-machine. When i try to start the new debian-etch-machine with "*xm create /etc/xen/test -c*" i always get the following error message: ------------------------------- Using config file "./test". Error: Device 2049 (vbd) could not be connected. losetup /dev/loop0 /data/xen/domains/test/disk.img failed ------------------------------- *xen-hotplug.log:* ------------------------------- Nothing to flush. /data/xen/domains/test/disk.img: Permission denied xenstore-read: couldn''t read path backend/vbd/2/2049/node ------------------------------- The entire directory is world-accessible and writable, so there should be no permission-problems with accessing the disk-images (VBD). I am using the root-account to start the xen-vm. *The configuration-file for the "test"-vm looks like this:* ------------------------------- # Configuration file for the Xen instance vm01.example.com, created on # Mon Jun 2 17:06:01 2008. # Kernel + memory size kernel = ''/boot/vmlinuz-2.6.21.7-3.fc8xen'' ramdisk = ''/boot/initrd-2.6.21.7-3.fc8xen.img'' memory = ''128'' # Disk device(s). root = ''/dev/sda1 ro'' disk = [ ''file:/data/xen/domains/test/disk.img,sda1,w'', ''file:/data/xen/domains/test/swap.img,sda2,w'' ] # Hostname name = ''test'' # Networking dhcp = ''dhcp'' vif = [ '''' ] # Behaviour on_poweroff = ''destroy'' on_reboot = ''restart'' on_crash = ''restart'' --------------------------------- An attempt to mount the disk-images to an unused-loop-device with losetup works without any problems. ---------------------------------- [root@dmxen xen]# losetup /dev/loop0 /data/xen/domains/test/disk.img [root@dmxen xen]# losetup -a /dev/loop0: [0902]:192479239 (/data/xen/domains/test/disk.img) ---------------------------------- System details: _Kernel:_ Linux dmxen 2.6.21.7-3.fc8xen #1 SMP Thu Mar 20 14:57:53 EDT 2008 i686 i686 i386 GNU/Linux Xen-Version: Xen 3.1.2 Any help or information would be very welcome. Thanks in advance Christian _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
jim burns
2008-Jun-18 09:54 UTC
Re: [Xen-users] vm create test ="losetup /dev/loop0 /data/xen/domains/test/disk.img failed"
On Wednesday June 18 2008 03:40:18 am Christian Nitschmann wrote:> When i try to start the new debian-etch-machine with "*xm create > /etc/xen/test -c*" i always get the following error message: > ------------------------------- > Using config file "./test". > Error: Device 2049 (vbd) could not be connected. losetup /dev/loop0 > /data/xen/domains/test/disk.img failedMaybe selinux? If it is set to enforcing, your images have to be in /var/lib/xen/images. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Mark Williamson
2008-Jun-18 21:00 UTC
Re: [Xen-users] vm create test ="losetup /dev/loop0 /data/xen/domains/test/disk.img failed"
I''ll second the suggestion of SELinux; you either need to: a) switch it off (not ideal since you''ll lose the security benefits) b) make sure the image is in the right place to satisfy it c) educate SELinux about your preferred domain image path. I''d also note that using tap:aio: instead of file: has been the preferred means of serving a block device from a file for a while now and might be worth trying. Cheers, Mark> On Wednesday June 18 2008 03:40:18 am Christian Nitschmann wrote: > > When i try to start the new debian-etch-machine with "*xm create > > /etc/xen/test -c*" i always get the following error message: > > ------------------------------- > > Using config file "./test". > > Error: Device 2049 (vbd) could not be connected. losetup /dev/loop0 > > /data/xen/domains/test/disk.img failed > > Maybe selinux? If it is set to enforcing, your images have to be > in /var/lib/xen/images. > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users-- Push Me Pull You - Distributed SCM tool (http://www.cl.cam.ac.uk/~maw48/pmpu/) _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Christian Nitschmann
2008-Jun-20 06:59 UTC
Re: [Xen-users] vm create test ="losetup /dev/loop0 /data/xen/domains/test/disk.img failed"
Thank you for the fast answer. It seems that SELinux was the culprit. After disabling it, there were no problems with starting a xen-domu with disk-images in my own directories. Greetings from Germany Chris Mark Williamson schrieb:> I''ll second the suggestion of SELinux; you either need to: > > a) switch it off (not ideal since you''ll lose the security benefits) > b) make sure the image is in the right place to satisfy it > c) educate SELinux about your preferred domain image path. > > I''d also note that using tap:aio: instead of file: has been the preferred > means of serving a block device from a file for a while now and might be > worth trying. > > Cheers, > Mark > > >> On Wednesday June 18 2008 03:40:18 am Christian Nitschmann wrote: >> >>> When i try to start the new debian-etch-machine with "*xm create >>> /etc/xen/test -c*" i always get the following error message: >>> ------------------------------- >>> Using config file "./test". >>> Error: Device 2049 (vbd) could not be connected. losetup /dev/loop0 >>> /data/xen/domains/test/disk.img failed >>> >> Maybe selinux? If it is set to enforcing, your images have to be >> in /var/lib/xen/images. >> >> _______________________________________________ >> Xen-users mailing list >> Xen-users@lists.xensource.com >> http://lists.xensource.com/xen-users >> > > > >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users