Migrate to ProxMox from Ubuntu KVM-libvirt LVM-based Virtual Machine Server

OsloFats

New Member
Oct 5, 2009
7
0
1
Hi. I read through "Migration of servers to Proxmox VE" and still had some questions. I have two VM servers sitting in front of me. One has Proxmox 1.4 beta2 on it and the 2nd has ubuntu server 9.04 - amd64, with Four KVM-based Virtual Machines running on LVM. I want to move the VMs from the Ubuntu server to the Proxmox server.

What is my best option for migrating the VMs? Here is what I'm thinking.

Option 1: Using the Proxmox web-GUI, create a new VM that is 1 G bigger than the Ubuntu VM that I want to copy. Then dd copy the Ubuntu VM from the Ubuntu LVM to the newly created LVM volume group on the Proxmox server (that the web-GUI created for me). Then I hit start on the Proxmox web-GUI and everything should come up fine.

Option 2: On the Ubuntu server, I apt-get install the proxmox image, modify grub and update software. Proxmox will recognize the LVM volumes but somewhere I need to create the Proxmox VM for those volumes so on creation, Proxmox won't overwrite the partitions. Sounds risky but...?

Option 3: Other options?

Thanks for any help?

Oslo
 
I partially answered my own question. Yes for option one but I am using identical servers. What if the servers were not identical? Should the VM work when moved?

Anyway, if it helps anyone, here is what I did to move a Win2000 VM from a kvm-based Ubuntu 9.04-server amd64 to a server running proxmox 1.4 beta2. My transfer medium was an external usb drive formatted using ext3.

#Backup On Prod Server
# Plug in usb drive and locate drive. You might want to use fdisk to help. In fdisk type 'p' to list partitions. 'm' for help.
fdisk /dev/sdb
# mount drive if not mounted
mkdir /mnt/drive2
sudo mount /dev/sdb1 /mnt/drive2

# Find LVM file to copy
sudo lvdisplay
sudo dd if=/dev/vmgroup/vm52 of=/mnt/drive2/vm_2000.dd
ls -lh /mnt/drive2/
sudo umount /mnt/drive2

#Migrate to New Server
# Plug in usb drive and locate drive. See directions above
mkdir /mnt/drive2
sudo mount /dev/sdb1 /mnt/drive2
ls -lh /mnt/drive2/

# Locate desired VM to replace and rename. They are in the images folder.
ls -hl /var/lib/vz/images/103
mv /var/lib/vz/images/103/*.raw /var/lib/vz/images/103/vm-103-disk-1.raw.back

# Copy the external usb file to the proxmox lvm
dd if=/mnt/drive2/vm_2000.dd of=/var/lib/vz/images/103/vm-103-disk-1.raw

# Clean-up
rm /var/lib/vz/images/103/vm-103-disk-1.raw.back

# Unmount
sudo umount /mnt/drive2

Enjoy!

Oslo
 

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!