ID #1024

How to upload a vmdk from Workstation to ESX ?

This is the virtual disk of a typical Workstation VM.

It may also be a the result of the first step of a Coldclone ...



To use this virtual disk with ESXi it must be uploaded and converted to a format that ESXi can handle.
This can be done in one step if it is possible to share the directory
where the vmdk is located right now via NFS.

In the example I created a NFS-share with the buildin NFS-server of Windows 2003 R2.
Every other NFS will probably work as well. The small one from Hanewin is nice for exaple ....

On the ESXi side this share will be added temporarily.
Launch the vSphere Client and add storage.
Enter the IP of the Windows NFS-server - here 10.0.0.1
Enter the share-name with a leading slash.
Assign a nice name.




Then log in to the ESXi via Putty.
Note that all commands were run from / and the friendly names were used.

First command ls was just used to know where we are ...
The next one mkdir creates a new directory on the datastore that will be used.
The next ls command was used to look up the name of the vmdk and check if the NFS connection is working.
The actual convert is done by vmkfstools





The vmkfstools -i command needs the full path to the source vmdk and the full path to the target vmdk.
With -d you can set the vmdk format. Options are:

  • zeroedthic
  • thin
  • eagerzeroedthick
  • 2gbsparse

In the example the option -d thin was used.
The result looks like:





Tags: esx, v2v, vmkfstools, ws

Related entries:

You cannot comment on this entry