I'm working with Xen 4.0 on a debian Lenny (5.0) . I wanted to clone a VM , but it seems that i didn't do it well . What i did is the following :
Creating the config file of the new VM and setting it up.
#cd /etc/xen/vms/ #cp original.foo.com.cfg copy.foo.com.cfg
Copying virtual disks
#cd /dev/mapper/ #cp -rv vg--xen-original.foo.com--disk vg--xen-copy.foo.com--disk #cp -rv vg--xen-original.foo.com--swap vg--xen-copy.foo.com--swap #chmod g+w vg--xen-copy.foo.com--* #chown root:disk vg--xen-copy.foo.com--*
Symlinks
#cd /dev/vg-xen/ #ln -s ../mapper/vg--xen-copy.foo.com--disk copy.foo.com-disk #ln -s ../mapper/vg--xen-copy.foo.com--disk copy.foo.com-disk
Everything is set up, let's create the VM
#xm create /ect/xen/vms/copy.foo.com.cfg #Using config file "./copy.foo.com.cfg". #Error: Device 51714 (vbd) could not be connected. #Device /dev/mapper/vg--copy.foo.com--disk is mounted in a guest domain, #and so cannot be mounted now.
Could you please help me sort out that issue ?
All i wanted was to duplicate original.foo.com
Thanks