Xenmigrate: Difference between revisions

From Proxmox VE
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
'''Welcome to ''Proxmox VE''!'''
== Migration from Xen ==
We hope you will contribute much and well.
You will probably want to read the [[Help:Contents|help pages]].
Again, welcome and have fun! [[User:Martin|Martin]] ([[User talk:Martin|talk]]) 16:22, 31 March 2015 (CEST)
 
== Xenmigrate ==


Here is the step necessary to migrate a Xen 6.2 vm to proxmox 3.4
Here is the step necessary to migrate a Xen 6.2 vm to proxmox 3.4
Line 18: Line 13:
   sed -i -e s/^co/#co/1 /etc/inittab
   sed -i -e s/^co/#co/1 /etc/inittab


then you poweroff your vm and you can export it
then poweroff the VM and you can export it
   
   
== Export Debian VM ==
== Export Debian VM ==
Line 24: Line 19:
   xe vm-list | grep -i name-of-your-vm
   xe vm-list | grep -i name-of-your-vm


you take note of uuid
take note of uuid and use it with the vm-export command:
 
and then you can export it


   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 25:
== xenmigrate ==
== xenmigrate ==


Now you have an xva file, and you need to have row disk images.
Now you have an 'xva' file and you need to have a raw disk image instead.


Transfer with some unix commend (scp or rsync) this xva file to proxmox server
Transfer it with some unix command (scp or rsync) to the proxmox server, i.e. in /root or wherever fits.


Now you have watyouwant.xva in your /root/ directory of your proxmox server
xva files are tar file and you can use tar command to extract it's content, that are disks
 
xva files are tar file and you should use tar command to extract disks


   tar xf whatyouwant.xva
   tar xf whatyouwant.xva


 
You should download xenmigrate from this url
You should download xenmigrate by this url
 


[https://raw.githubusercontent.com/hswayne77/xenserver_to_xen/master/xenmigrate_new.py xenmigrate]
[https://raw.githubusercontent.com/hswayne77/xenserver_to_xen/master/xenmigrate_new.py xenmigrate]


to generate img files
to generate img files from the result of the above tar command.


1. create a new vm, say 100 vm.
1. create a new vm, say 100 vm.
Line 54: Line 43:
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
   python xenmigrate.py –convert=Ref:3 /var/lib/vz/images/100/{image}.img

Revision as of 21:14, 31 March 2015

Migration from Xen

Here is the step necessary to migrate a Xen 6.2 vm to proxmox 3.4

Changes to Debian VM

These are the changes needed by a Debain 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

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

xenmigrate

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

References:

 http://www.robotics.net/2009/06/06/converting-citrix-xva-to-xenorg-img/