Migrate VMWare ESXI to Proxmox and OpenVZ

shadow_man

Executive Member
Joined
May 27, 2005
Messages
7,028
Reaction score
1,752
Location
Cape Town
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,
 
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,

Mount the VMDK, tar it up.

Shove it into your Proxmox image directory and create a container from it, that *should* work for most Linux distro's.

I don't mind assisting if you want free or charge, and may I mention that we're the only listed Proxmox partner in South Africa :)
 
Hi,

I've found the answer to this, even if in the spirit of open source some people refuse to share. I'm extremely glad that others like nkawit do share, as it furthers the Open Source community greatly.

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 - note 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.tar.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.

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,
 
Last edited:
Top
Sign up to the MyBroadband newsletter
X