Thursday, June 30, 2011

Error: Device 768 (vbd) could not be connected. Hotplug scripts not working

You may get an error like this in xen vps.

When booting from solusvm it boots to paused state and then exits.

From backend :
[root@test ~]# xm create /home/xen/vm699/vm699.cfg
Using config file "/home/xen/vm699/vm699.cfg".
Error: Device 768 (vbd) could not be connected. Hotplug scripts not working.

Check the hotplug error log :
[root@test ~]# tail /var/log/xen/xen-hotplug.log
stat: cannot stat `/dev/xensan/vm699_img': No such file or directory
Nothing to flush.
[root@test ~]#

If you are configured the vps images in lvm, activating the corresponding logical volumes will

solve this problem.

For example :
lvchange -ay /dev/xensan/vm699_img

Wednesday, June 29, 2011

How to increase the memory size of Domain-0 or Dom0

You can increase the size of the xen domain-0 or Dom0 by editing the grub.conf file as fowllows.

Here in this example we have given the size as 2Gb thats 2048Mb. You can change it according to your requirement. dom0_mem=2048M

And the save the file and restart the system.

default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu

title CentOS (2.6.18-238.12.1.el5xen)
root (hd0,0)
kernel /xen.gz-2.6.18-238.12.1.el5 dom0_mem=2048M
module /vmlinuz-2.6.18-238.12.1.el5xen ro root=LABEL=/
module /initrd-2.6.18-238.12.1.el5xen.img
title CentOS (2.6.18-238.12.1.el5)
root (hd0,0)
kernel /vmlinuz-2.6.18-238.12.1.el5 ro root=LABEL=/
initrd /initrd-2.6.18-238.12.1.el5.img
title CentOS (2.6.18-238.el5)
root (hd0,0)
kernel /vmlinuz-2.6.18-238.el5 ro root=LABEL=/
initrd /initrd-2.6.18-238.el5.img

Error: Device (vbd) could not be connected. /etc/xen/scripts/block failed

Error on xen vps :

[root@1test~]# xm create /home/xen/vm747/vm747.cfg
Using config file "/home/xen/vm747/vm747.cfg".
Error: Device 5632 (vbd) could not be connected. /etc/xen/scripts/block failed; error detected.

Checking free loop devices :
[root@test ~]# losetup -f
losetup: not found any public free loop device

Checking status of loop devices :
[root@test ~]# losetup -a
/dev/loop0: [fd1c]:3997699 (/home/solusvm/xen/iso/2003_server.iso)
/dev/loop1: [fd1c]:3997700 (/home/solusvm/xen/iso/2008_Spanish_32.iso)
/dev/loop2: [fd1c]:3997709 (/home/solusvm/xen/iso/2003server.iso)
/dev/loop3: [fd1c]:3997698 (/home/solusvm/xen/iso/2008_Spanish_x64.iso)
/dev/loop4: [fd1c]:3997709 (/home/solusvm/xen/iso/2003server.iso)

/dev/loop5: [fd1c]:3997702 (/home/solusvm/xen/iso/Windows_2008_R2_64Bit_Spanish.iso)
/dev/loop6: [fd1c]:3997700 (/home/solusvm/xen/iso/2008_Spanish_32.iso)
/dev/loop7: [fd1c]:3997700 (/home/solusvm/xen/iso/2008_Spanish_32.iso)
[root@test ~]#

This can be solved by unmounting unused loop devices from other vps.

Or you can just increase the no.of loop devices.
#vim /etc/modprobe.conf
...
options loop max_loop=64
...