Migration from KVM to Proxmox

Discussion in 'Proxmox VE: Installation and configuration' started by Pourya Mehdinejad, Nov 9, 2017.

  1. Pourya Mehdinejad

    Proxmox Subscriber

    Joined:
    Nov 8, 2017
    Messages:
    48
    Likes Received:
    0
    Hello
    I have some Virtual Machines which is currently in a different Node with KVM and Virtualizor (web-gui), and I want to move them to my newly created proxmox cluster.
    The old KVM and New Proxmox Cluster are using a shared iscsi storage with different LUNs.
    The old KVM is hosting VMs with LVM same as my new Proxmox so they both are using LVM on top of the Iscsi.
    Is there any way to move the machines to new cluster ?

    Thanks in advanced for your help.
     
  2. jameshsi

    jameshsi New Member

    Joined:
    Nov 9, 2017
    Messages:
    1
    Likes Received:
    0
    I am using virtualizor too, wondering if proxmox will be a better choice.
     
  3. jeffwadsworth

    jeffwadsworth Member

    Joined:
    Jan 13, 2016
    Messages:
    148
    Likes Received:
    12
    KVM to Proxmox VE (KVM)
    Just create an new VM on Proxmox VE and add the existing disk image to this new VM, set the boot order and start.
     
    #3 jeffwadsworth, Nov 9, 2017
    Last edited: Nov 9, 2017
    fireon likes this.
  4. Pourya Mehdinejad

    Proxmox Subscriber

    Joined:
    Nov 8, 2017
    Messages:
    48
    Likes Received:
    0
    Depending on your scenario, We have swtiched to Proxmox because of it's High availability features.
     
  5. Pourya Mehdinejad

    Proxmox Subscriber

    Joined:
    Nov 8, 2017
    Messages:
    48
    Likes Received:
    0
    what you mean by "existing disk image to this new VM" .
    my previous setup on virtualizor is based on LVM and each VM has its own LV, I really don't have an idea how to move it to proxmox.
     
  6. Denny

    Denny Member

    Joined:
    Jul 28, 2016
    Messages:
    66
    Likes Received:
    13
    I am not familiar with Virtualizer but chances are you will find the virtual machines' disk (Virtualizer side) under /dev/mapper. The process would then be to backup or dump the contents of that lvm partition to a file. Create a VM under proxmox with comparable settings (disk size, memory etc) using local-lvm. You will find the vms disk on the proxmox server under /dev/mapper/pve-vm-<some number>--disk--1 . You may use it as the target for a restore using the same tool you used on the Virtualizer side. I recommend using dd as it is likely to be available on both servers.
     
    jeffwadsworth likes this.
  7. Pourya Mehdinejad

    Proxmox Subscriber

    Joined:
    Nov 8, 2017
    Messages:
    48
    Likes Received:
    0
    I already tried with your method using dd to move LV from virtualior to proxmox , the first issue is taking too long,
    it was 1 hour for 30GB VM
    second issue was I couldn't boot the Machine after transfer
    So I was looking for a faster and more reliable method
     
  8. udo

    udo Well-Known Member
    Proxmox Subscriber

    Joined:
    Apr 22, 2009
    Messages:
    5,835
    Likes Received:
    159
    Hi,
    if you have an backup of all your vms you can use a fast way.

    Connect the hdd/raid/whatever to the pve-server.
    Define the lvm-storage in pve
    rename the lv according new VMID and pve-naming sheme (and adapt vm-config)
    Start VM and use storage migration to the "right" storage.

    Udo
     
    Pourya Mehdinejad likes this.
  9. Pourya Mehdinejad

    Proxmox Subscriber

    Joined:
    Nov 8, 2017
    Messages:
    48
    Likes Received:
    0
    I liked your solutions but since the VMs were online and on production, I preferred the less risky method :
    I've done the migration with less risky method :

    Turned off the VM on the source machine and convert it to a RAW Image :
    qemu-img convert -p /dev/VG_Group/LV_specific_for_vm -O raw /root/tempdisk/vm.raw.img

    On the proxmox on target machine, first create the VM so its LV with it's schema get created.
    Then on the target host, we've transfered the image into our LV

    dd if=/dev/tempdisk/vm.raw.img of=/dev/VG_Group/LV_VM
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice