[SOLVED] Migrating VMs from KVM to Proxmox.

FaisalALi92

New Member
Nov 17, 2021
22
0
1
31
Hello Everyone,

I am fairly new to Proxmox so bare with me :)

I have a ubuntu machine with KVM with a bunch of (VMs.qcow2) that I need to move to my new Proxmox server.

I need to move them to my proxmox server as I read in the docs the path to vms on pve is /var/lib/vz/images.

My PVE is configured with ZFS and I have two storages local and local-zfs.

So what is the proper way to accomplish that? I already searched but did not find anything.

Any help will be greatly appreciated.

Thank you
 
Hello,

if you transferred your VMs to the Proxmox server, you can create a VM and import the disk to the created VM using (qm importdisk).

[0] https://pve.proxmox.com/wiki/Migration_of_servers_to_Proxmox_VE#Qemu.2FKVM
Hi , Is there a specific path that I need to move my VMs on?

I am asking this because I previously performed the below steps for migrating:

1- Create a VM on Proxmox with the resources as my KVM image testvm.qcow2
2- after that I moved my testvm.qcow2 to the /var/lib/vz/images/101
3- I just renamed testvm.qcow2 to vm-101-disk-0.qcow2
4- I then went to ProxMox and started the VM

but since I configure My Proxmox with ZFS this time when I create a VM on Proxmox I do not find anything /var/lib/vz/images/ its is empty.
 
Last edited:
root@stage-ve-01:/var/lib/vz/images# zfs list
NAME USED AVAIL REFER MOUNTPOINT
rpool 5.90G 862G 104K /rpool
rpool/ROOT 2.61G 862G 96K /rpool/ROOT
rpool/ROOT/pve-1 2.61G 862G 2.61G /
rpool/data 3.29G 862G 96K /rpool/data
rpool/data/vm-100-disk-0 3.29G 862G 3.29G -
 
Forgive me I am still a bit confused.

Now I need to create the VM on Proxmox with same resources as VM from KVM

move it to the following path rpool/data/vm-100-disk-0 then run import disk?
 
Hello,

move it to the following path rpool/data/vm-100-disk-0 then run import disk?
You can transfer the VM image disk to any path you want e.g /tmp/, then do `qm importdisk <VMID> <Your-VM-disk> local-zfs` command.
 
Hello,


You can transfer the VM image disk to any path you want e.g /tmp/, then do `qm importdisk <VMID> <Your-VM-disk> local-zfs` command.
I moved My disk and ran the command

root@stage-ve-01:/var/lib/vz/images# qm importdisk 101 Odoo-test.qcow2 local-zfs
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_ADDRESS = "ar_SA.UTF-8",
LC_NAME = "ar_SA.UTF-8",
LC_MONETARY = "ar_SA.UTF-8",
LC_PAPER = "ar_SA.UTF-8",
LC_IDENTIFICATION = "ar_SA.UTF-8",
LC_TELEPHONE = "ar_SA.UTF-8",
LC_MEASUREMENT = "ar_SA.UTF-8",
LC_TIME = "ar_SA.UTF-8",
LC_NUMERIC = "ar_SA.UTF-8",
LANG = "en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_US.UTF-8").
Configuration file 'nodes/stage-ve-01/qemu-server/101.conf' does not exist
 
Do I need to create VM with the same resources as the KVM machine then run the command using same VMID?
 
I have accomplished the VM migration by following the below.
Steps to migrate from KVM to Proxmox (ZFS)

1-copy the KVM disk .qcow2 to PVE server path /var/lib/vz/images
2- create a VM with same resources as the KVM Vm
3- run qm importdisk <VMID> <Your-VM-disk> local-zfs
4- attach newly created disk to the VM and delete the old one
5- change the boot option to the new disk then start the VM
 
Last edited:

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!