Esxi Download Vmdk File

Posted on  by 

  1. Open Vmdk File In Vmware
  2. Vmdk File Size
File

I am trying to download the system / root partition disk from of a virtualized Win2012 server on a ESXI 5.5 server. I have the machine powered down, selected download option of the vdmk file while browsing the datastore form the VSphere client. I am trying to download the system / root partition disk from of a virtualized Win2012 server on a ESXI 5.5 server. I have the machine powered down, selected download option of the vdmk file while browsing the datastore form the VSphere client. As the title says I want to download vmdk file from ESXi host without stopping the virtual machine. I tried to download the file from vSphere Client, from the data store browser, however it said that the file operation filed, later I was able to find that this is caused by the fact that the virtual machine is running, however I can't stop it, since the component is critical. Free tools to convert VHD into VMDK disk files. I was wondering on how many tools can be found to convert virtual hard disks files from VHD (Microsoft) into VMDK (VMware) and vice versa. Well, sort of. Because not all the tools here are able to do the conversion both ways -:). Those tools, one.

I have a Windows 10 virtual machine hosted on a VMWare ESXi 5.5 server at home. I use it for simple things like a Plex media server, Calibre book server, and I run a Python script from GitHub (PlexConnect) to steer all traffic from my Apple TV back to the Plex instance. However, the system wouldn’t boot up this weekend and I noticed I was receiving continuous errors from within vSphere itself. As it turns out, the VMDK file was damaged. I had to recreate it in order to restore the functionality of the Windows 10 system and I thought I’d document the process I went through in case it could help someone else.

Before we begin, it’s important to understand how a VM works with virtual hard disks within VMware.

Since the .vmdk file is the disk descriptor, and not the data file itself, we’re in luck. We’ll be able to recreate it and be back up and running in less than 5 minutes.

First, ssh to your ESXi box as root. cd to the location of your virtual machine disk by typing:

You will need to know the type of SCSI controller your virtual disk is using, which can be found by viewing the .vmx file and looking at the scsi#.virtualDev line. The # will be the controller number and it will reference the controller type such as lsisas1068, which mine was. Note: If yours is also lsisas1068, you will want to take note of it as lsilogic. I’ll explain that later.

Next, take note of the exact size of the –flat file:

Then create a new virtual disk:

A corresponding temp-flat.vmdk file will be created, too. Type the following to delete it:

Repair vmdk file

Rename the temp.vmdk to match the name of your existing flat file:

Edit the .vmdk. I chose vim in this case:

Open Vmdk File In Vmware

Edit the Extent Description section and update the -flat.vmdk file reference to match your existing flat file. If necessary, also remove the following line if the original .vmdk was not a thin disk.

Esxi Download Vmdk File

Check the file for consistency:

If the file is good, you will see: “Disk chain is consistent”

If you’re successful, your VM should now properly boot and you should see something similar to the following:
A newly created vmdk file and your pre-existing flat.vmdk file

Vmdk File Size

There is a KB article on VMware’s website here, which explains the above commands a little more in depth, but for the sake of getting back online quickly and efficiently, I just made this quick how-to.

Coments are closed