Got my storage, How to migrate maschines

  • Thread starter Thread starter coffe
  • Start date Start date
C

coffe

Guest
Got my storage, How to migrate machines

Hi,
Got my nice SAN , and have it now set up as a ISCSI-> LVM .
Whats the best way of moving local Vservers to this now ?

//Coffe
 
Last edited by a moderator:
Hi,
Got my nice SAN , and have it now set up as a ISCSI-> LVM .
Whats the best way of moving local Vservers to this now ?

//Coffe
Hi,
create a new disk at the SAN-Storage in the VM with the same size as the local one.
Shut down vm.
Look at the logical volume:
Code:
lvdisplay
copy the disk
Code:
dd if=/var/lib/vz/images/124/vm-124-disk-1.raw of=/dev/drbdvg/vm-124-disk-1 bs=1024k
delete both harddisk from the vm and add the san-harddisk as new (e.g. ide0.0).
power on the vm.
After that you can remove the local diskfile (with the webfronend).

Udo
 
Re: Got my storage, How to migrate machines

Tnx,
Problem is that they are 2qcow2 format. i guess i need to convert them first in some way.
 
Re: Got my storage, How to migrate machines

Yes, You need to convert to raw format before dd, for example:
Code:
kvm-img convert -f raw <old image> <new raw image>

You could probably run:
Code:
kvm-img convert -f raw <old image> - | dd of=/dev/drbdvg/<vm disk> bs=1M
to make it faster