Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Migrate VMWare ESXI to Proxmox and OpenVZ
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Migrate VMWare ESXI to Proxmox and OpenVZ

jeromezajeromeza Member

Hi,

I'm thinking of doing this due to licensing constraints.

Is there a way to migrate VMDK to OpenVZ?

I know I can just import the .VMDK file to Proxmox but then I wouldn't get the resource benefits of the shared OpenVZ Kernel so I'd prefer to convert the .VMDK images to work in OpenVZ - any tips / tricks on doing this?

Thanks,

Comments

  • GunterGunter Member

    I don't believe this is possible. Considering that OpenVZ is container based virtualization and VMWare is full fledged virtualization.

    Correct me if I'm wrong, I'm not totally sure, but I was in the same predicament some while ago.

  • geekalotgeekalot Member
    edited May 2014

    @jeromeza, Yes, you can do it.

    I migrated a bunch of my VMware Server (not ESXi) VM's to Proxmox (both as OpenVZ & as KVM on Proxmox). Linux is smooth as silk. Windows can be a PITA due to drivers (disk and video).

    Some standard rules apply: 1) disable VMware tools 2) Best IMHO to create new image and (for Linux) tar/untar into the new container.

    Going to OpenVZ is easy. Going to KVM is a bit trickier. I've also done it for encrypted containers, so I know it can be done.

  • @geekalot could you please provide steps for the OpenVZ conversion? Thanks

  • @jeromeza, I will not be posting that on this website.

    If you want to discuss sending your VM for conversion, offline/via PM, we can do that. I am sure after posting this some of the experts here may likely provide their version of doing it for you. In fact, I think others may have posted their version of doing this already in another thread; try searching LET.

  • Hi,

    I've found the answer to this, even if in the spirit of open source some people refuse to share.

    Simply:

    1.) In your VMWare VM - boot in to a LiveCD with a Linux environment

    2.) Ensure you have sufficient space to create a tar.gz of your VM

    3.) Create a tar.gz of your root directory after mounting it.

    3.1.) mkdir /media/hddorig (this is where we will mount our volume we wish to convert)

    3.2.) mount /dev/sda1 /media/hddorig (we mount or volume on our created mount point)

    3.3.) We browse to our mounted point so we can start adding to archive.
    cd /media/hddorig/ (important to archive from here to avoid path issues)

    3.4.) We create our tar.gz volume - not I specify the current working directory so as to avoid pathing issues when extracting as i've noticed proxmox keeps paths and breaks things if you don't.

    tar -pczf /media/mystorage/myvmdkvm.tar.gz .

    Where /media/mystorage is where I want to store my new archive.

    4.) SCP the tar.gz to Proxmox
    scp myvmdkvm.gz root@proxmoxhost:/var/lib/vz/template/cache/

    5.) In Proxmox add a new OpenVZ container and select your tar.gz as it's template and deploy.

    1. Finished

    NOTES:
    1.) Make sure you have enough space on your OpenVZ container to restore the tar.gz
    2.) I had some pathing issues when I didn't create the tar.gz within the current working directory, so I've opted to create the tar.gz within that volume so as to avoid issues.

    I hope this helps someone out.

    I'd like to thank nkawit from http://allworldit.com/ for showing me that this was possible.

    Cheers,

Sign In or Register to comment.