Xenmigrate: Difference between revisions
(9 intermediate revisions by 6 users not shown) | |||
Line 1: | Line 1: | ||
[[Category:Archive]] | |||
= | = Direct Export Over HTTP = | ||
Here | There's an unofficial, community provided script to directly export and convert a Xen VM disk: | ||
https://github.com/guestisp/xen-to-pve | |||
= Manual Migration from Xen = | |||
Here are the steps necessary to migrate a Xen 6.2 VM to Proxmox VE 3.4 | |||
== Changes to Debian VM == | == Changes to Debian VM == | ||
These are the changes needed by a | These are the changes needed by a Debian 6/7: | ||
changes to grub | changes to grub | ||
Line 18: | Line 21: | ||
sed -i -e s/^co/#co/1 /etc/inittab | sed -i -e s/^co/#co/1 /etc/inittab | ||
then | then poweroff the VM and you can export it. | ||
See [[Serial Terminal]] for adding a Serial Console on your VM after the migration. | |||
== Export Debian VM == | == Export Debian VM == | ||
Line 24: | Line 29: | ||
xe vm-list | grep -i name-of-your-vm | xe vm-list | grep -i name-of-your-vm | ||
take note of uuid and use it with the vm-export command: | |||
and | |||
xe vm-export uuid=xxxxx-xxxx-xxxxx-xxxxxx filename=whatyouwant.xva | xe vm-export uuid=xxxxx-xxxx-xxxxx-xxxxxx filename=whatyouwant.xva | ||
Line 32: | Line 35: | ||
== xenmigrate == | == xenmigrate == | ||
Now you have an xva file | Now you have an 'xva' file and you need to have a raw disk image instead. | ||
Transfer it with some unix command (scp or rsync) to the proxmox server, i.e. in /root or wherever fits. | |||
xva files are tar file and you | xva files are tar file and you can use tar command to extract it's content, that are disks | ||
tar xf whatyouwant.xva | tar xf whatyouwant.xva | ||
You should download xenmigrate from [https://github.com/derekjhyang/xenserver_to_xen this url] | |||
You should | (or [https://github.com/akh13/xenmigrate.py this url] if the the other does not work) | ||
to generate img files from the result of the above tar command. | |||
[https:// | |||
to generate img files | |||
1. create a new vm, say 100 vm. | 1. create a new vm, say 100 vm. | ||
Line 54: | Line 51: | ||
2. add disks to your new 100 vm. | 2. add disks to your new 100 vm. | ||
3. delete images disks, use xenmigrate to replace them | 3. delete images disks, use xenmigrate and mv to replace them with the appropriate name | ||
python xenmigrate.py --convert=Ref:3 /var/lib/vz/images/100/{image}.img |
Latest revision as of 08:50, 12 September 2023
Direct Export Over HTTP
There's an unofficial, community provided script to directly export and convert a Xen VM disk:
https://github.com/guestisp/xen-to-pve
Manual Migration from Xen
Here are the steps necessary to migrate a Xen 6.2 VM to Proxmox VE 3.4
Changes to Debian VM
These are the changes needed by a Debian 6/7:
changes to grub
sed -i -e s/console=hvc0//g /boot/grub/grub.cfg
changes to inittab
sed -i -e s/^co/#co/1 /etc/inittab
then poweroff the VM and you can export it.
See Serial Terminal for adding a Serial Console on your VM after the migration.
Export Debian VM
xe vm-list | grep -i name-of-your-vm
take note of uuid and use it with the vm-export command:
xe vm-export uuid=xxxxx-xxxx-xxxxx-xxxxxx filename=whatyouwant.xva
xenmigrate
Now you have an 'xva' file and you need to have a raw disk image instead.
Transfer it with some unix command (scp or rsync) to the proxmox server, i.e. in /root or wherever fits.
xva files are tar file and you can use tar command to extract it's content, that are disks
tar xf whatyouwant.xva
You should download xenmigrate from this url (or this url if the the other does not work) to generate img files from the result of the above tar command.
1. create a new vm, say 100 vm.
2. add disks to your new 100 vm.
3. delete images disks, use xenmigrate and mv to replace them with the appropriate name
python xenmigrate.py --convert=Ref:3 /var/lib/vz/images/100/{image}.img