Got my storage, How to migrate maschines

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
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!