Migrating VirtualBox VM to Proxmox VE

Discussion in 'Proxmox VE: Installation and configuration' started by kokoticek, Oct 10, 2018.

  1. kokoticek

    kokoticek Member

    Joined:
    Jun 7, 2010
    Messages:
    121
    Likes Received:
    2
    I know there were already discussions about this in the past, and even some guides. But as far as I could find, all guides/discussions are already way too outdated.

    So, if not bothersome, I'd like to ask, how to do this on current Proxmox?
    Is it still possible?

    Thanks beforehand.
     
  2. dw2412

    dw2412 New Member

    Joined:
    Mar 14, 2013
    Messages:
    21
    Likes Received:
    0
    Hi

    Even they seems to be outdated because of mentioned Proxmox Version... They way is still the same. You've plenty of options to migrate such a VM to Proxmox. Either direct by converting the image using qemu-img or by starting in both (old virtualbox vm / now proxmox vm) some boot image (i.e. System Rescue CD, CloneZilla) and migrating using dd & nc / CloneZilla Device 2 Remote Device.

    Anyway depending of what VM you plan to migrate/convert you have some additional tasks to do (i.e. Windows - enable right controller driver that matches any of the once selectable in proxmox gui). But it is actually not that hard... and everything very well described here:

    https://pve.proxmox.com/wiki/Migration_of_servers_to_Proxmox_VE

    Andreas
     
  3. kokoticek

    kokoticek Member

    Joined:
    Jun 7, 2010
    Messages:
    121
    Likes Received:
    2
    Sorry, I know it's already old, but I think still on-topic.

    I'd like to try the SSH method using dd. I'm trying to migrate an old Windows Server 2008 VirtualBox VM. I already ran the mergeide registry file in the VM.

    In latest Proxmox, at least in my case, I can only create new VMs with raw-type disks -the option is even greyed out-; for a single disk VM numbered "106", the disk file's exact name is "vm-106-disk-1". No extension at the end.

    For all methods, the wiki advises for having the complete VM in Proxmox already created before attempting the migration.

    My question is, if I already created the VM in Proxmox, with disk file "vm-106-disk-1" with enough disk size, wouldn't it be enough to do
    Code:
    dd if=/dev/sda | ssh root@proxmox_ip dd of=/var/lib/vz/images/106/vm-106-disk-1
    or do I really need to specify dd a totally different output file (say, "vm106") to be copied from scratch in the Proxmox server, then manually assign it to the VM, and the "vm-106-disk-1" file being just a useless dummy?
     
  4. LnxBil

    LnxBil Well-Known Member

    Joined:
    Feb 21, 2015
    Messages:
    3,694
    Likes Received:
    329
    The easiest way is to boot a Linux on your VB guest and in your PVE guest and just dd the disk:

    Code:
    dd if=/dev/sda bs=1M | ssh guest-in-pve dd bs=1M of=/dev/sda
    This way, all storage types are abstracted and it just works fine.
     
  5. kokoticek

    kokoticek Member

    Joined:
    Jun 7, 2010
    Messages:
    121
    Likes Received:
    2
    Yes, that'd be indeed the simplest way, for the simplest of cases.

    However, migrating to a *smaller* partition is NOT simple, and it's my case.
    According to the wiki page the only way for that is the fsarchiver way:
    https://pve.proxmox.com/wiki/Migrat...mox_VE#Running_fsarchiver_from_SystemrescueCD

    But guess what, fsarchiver no longer works! Aside being barely maintained and with a forum with very little activity, it's not compatible with Windows versions from Vista/Server 2008 onwards because of this:
    https://forums.fsarchiver.org/viewtopic.php?t=1503
    https://tuxera.com/forum/viewtopic.php?f=2&t=30606

    ntfs-3g developer himself explains, but no fix whatsoever for fsarchiver. At most mentioning another tool called "wimlib", but as far as I read last time it's aimed for stuff other than backup and recovery

    @dcsapak:
    Any other advise by any chance?
     
  6. LnxBil

    LnxBil Well-Known Member

    Joined:
    Feb 21, 2015
    Messages:
    3,694
    Likes Received:
    329
    Personally, I've never successfully migrated Windows (from this decade) from a bigger to smaller disk. I also tried a lot.

    Is thin-provisioning maybe a way to go? You can create a disk that is bigger than your actual disk.

    Another way would be a multi-stage migration. Migrate first to another machine that has enough space, then bootup Windows and make sure everything works. Then just resize your disk in Windows and try shrink the disk afterwards. This could work if it is done from Windows itself. Hopefully, there is no UEFI or GPT involved which could complicate things.
     
  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