After upgrading app-emulation/xen app-emulation/xen-tools from 4.1 to 4.2, guests that previous worked without issue no longer seem able to read the file:/*.img files. When I mount the image file via loopback, and move the kernel and initrd to dom0, the guest boots normally. Here are the changes needed. /data/xen/prime.pv (-)disk = ['file:/data/xen/prime.img,xvda,w'] (+)disk = ['phy:/dev/loop0p2,xvda,w'] (-)kernel = "/usr/lib/xen/boot/pv-grub-x86_64.gz" (+)kernel = "/data/xen/kernel-genkernel-x86_64-3.7.5-hardened-2013-02-18-1632" (+)ramdisk = "/data/xen/initramfs-genkernel-x86_64-3.7.5-hardened-2013-02-18-1632" Here is the full error I get when pvgrub tries to use the image files. xl -vvv create -c /data/xen/prime.pv http://pastebin.com/92PW3QRH Reproducible: Always Steps to Reproduce: 1. dd if=/dev/zero of=/root/hd.img bs=512 count=0 seek=4M 2. losetup /dev/loop0 /root/hd.img 3. fdisk /dev/loop0 (create part 1 for ext2 boot and part 2 for root ext4) 4. partprobe /dev/loop0 5. mkfs.ext2 /dev/loop0p1 6. mkfs.ext4 /dev/loop0p2 7. mount /dev/loop0p2 /mnt/gentoo && mkdir /mnt/gentoo/boot 8. mount /dev/loop0p1 /mnt/gentoo/boot 9. copy or create filesystem (optional copy kernel and initrd to host) 10. umount /mnt/gentoo{/boot,/} 11. losetup -d /dev/loop0 12. try to boot via pvgrub or using copied kernel and initrd with disk = ['file:/root/hd.img,xvda,w'] 13. repeat steps 2 & 4 then boot with disk = ['phy:/dev/loop0p2,xvda,w'] Actual Results: Fails to boot but can access shell where no /dev/xvd? or /dev/sd? is listed. When booting from physical device, /dev/xvd? is appropriately created. Expected Results: There should be no change is ability to read file:/*.img files in xen-tools 4.2 emerge --info http://pastebin.com/VKSfKjCW xl info http://pastebin.com/ba2Xxv7w Submitted to the xen mailing list http://lists.xen.org/archives/html/xen-users/2013-02/msg00344.html as well.
It looks like xen-tools did not create /var/run/xen # cat /var/log/xen/qemu-dm-prime.log bind(unix:/var/run/xen/qmp-libxl-4): No such file or directory chardev: opening backend "socket" failed: No such file or directory # ls /var/run/xen* /var/run/xenconsoled.pid /var/run/xenstored.pid /var/run/xenstored: socket socket_ro After manually creating /var/run/xen, *.img files are read appropriately. The codebase should probably be updated to reflect this. Thanks to Ian on the xen mailing list for diagnosing the problem http://lists.xen.org/archives/html/xen-users/2013-02/msg00356.html.
I have exactly the same problem with app-emulation/xen-tools-4.2.0-r3. I tried to set up a domU-machine using a qcow2 disk image (dynamically expanding) and the disk just wasn't attached to the domU-machine. Creating /var/run/xen manually fixed the problem and the domU booted right up.
I can still not use the raw disk file in my config when the steps outlined above are used. I'll try it with a qcow2 disk like Janis, but I'm not sure what the difference is. For now, I can mount my disk images on /dev/loop and use those w/o a problems. That's a bad work around for large systems though.
I just put mkdir -p /run/xen in the start() block of /etc/init.d/xenstored and it solved the problem permanently. I hope this will be applied to the xen-tools initscript soon, file based storage is a main feature of Xen (I think) and it doesn't work at the moment, without manually editing the init script, or creating the directory with other boot time initscript.
Any news on this one? It's basically adding one line to an init script and it's a pretty obscure error that might keep some people from using Xen on Gentoo
ok tomorrow's homework
15 May 2013; Ian Delaney <idella4@gentoo.org> files/xenstored.initd: Fix to xenstored.initd wrt Bug #459082