1. Create Xen VM with similar specs as original OpenVZ VM. Ensure Xen VM can boot and SSH OK.

2. Shutdown both VMs.

3. Backup Xen VM.
- SSH Destination Xen node ( e.g. server09 )
- Identify VM ID from SolusVM
# cd /home/xen/VMID
# grep disk VMID.cfg
ramdisk = '/boot/solus-initrd.img'
disk = ['phy:/dev/VolGroup00/vm307_img,sda1,w', 'phy:/dev/VolGroup00/vm307_swap,sda2,w']
- Copy this disk image device, and paste to mount it as below:-
# mount /dev/VolGroup00/vm307_img ./mnt
# df -h
15G 631M 14G 5% /home/xen/vm307/mnt
- Make backup of original Xen VM:-
# cd /home/xen/VMID
# cp -ai mnt mnt.orig

4. Transfer Source VM to Destination VM
- SSH Source OpenVZ node ( e.g. server04 )
- Identify VM ID (VZID) from SolusVM
- Create exclusion files list:-
# vim /root/exclude.txt
[ For CentOS: See APPENDIX I ]
[ For Ubuntu / Debian: See APPENDIX II ] 
- Perform the transfer ( Use private IP address of destination Xen node, e.g. for server09, use ):-
# rsync --exclude-from="/root/exclude.txt" --delete --numeric-ids -avpogtStlHz -e "ssh -p 22222" /vz/private/VZID/

5. Unmount destination VM and boot new VM.
- SSH Destination Xen Node
- Unmount destination Xen VM
# umount /home/xen/VMID/mnt
- Boot VM via SolusVM
- Verify all OK

6. Backup and Remove old OpenVZ VM
- SSH Source OpenVZ Node
# cd /vz/private
# cp -ai VZID VZID.backup
- Remove Source OpenVZ Node via SolusVM.



1.When booting new Xen VM, watch the Xen Console and see if any kernel modules failing to load due to file not found, e.g.:-
- SSH destination Xen Node

# xm console VMID

modprobe: FATAL: Could not load /lib/modules/2.6.18-194.26.1.el5xen/modules.dep: No such file or directory

- If so, copy the desired node kernel modules from node to VM

- Shutdown VM
- Mount VM storage (see above)
- Copy kernel modules from node
# rsync -av /lib/modules/2.6.18.xxxxxxx /home/xen/VMID/mnt/lib/modules/
- Unmount storage ( see above)
- Boot VM and confirm no more kernel load errors.

APPENDIX 1: /root/exclude.txt : CentOS VM


APPENDIX 2: Ubuntu / Debian VM


Kas see vastus oli kasulik? 0 Kasutajad peavad seda kasulikuks (0 Hääled)