11

Is there a command-line tool to extract files from a VMDK file? WinImage seems to be able to do it, but it's GUI only.

4 Answers 4

4

Mount the VMDK using VMware's Disk Mount utility, then copy the file you want, then unmount it.

See this page: http://www.vladan.fr/mounting-your-vmdk-disks-directly-to-your-windows-box-how-to/

7

7ZIP is able to open and extract VMDK files. You may try out its command-line version.

1
  • 1
    Only seems to work if the VMDK is one single file. For VMDKs split into chunks (e.g. to stay below 2-GB limit), 7-zip tells me "file cannot be opened as an archive" Dec 29, 2018 at 0:42
2

Use 7zip with full path extraction to folder:

7z x -o<destination-folder> box-disk1.vmdk
1

Using the guestmount command on linux works for me. I'm able to mount both an Ubuntu VM with multiple .vmdk files and a Windows10 VM with a single .vmdk like this:

sudo apt-get install libguestfs-tools
guestmount --help
sudo mkdir /mnt/u1 /mnt/u2
sudo guestmount -i -r /mnt/u1 -a ~/vmware/Ubuntu1804/Ubuntu.vmdk      #1st .vmdk
sudo guestmount -i -r /mnt/u2 -a ~/vmware/Windows10/Windows10-disk1.vmdk
sudo cat /mnt/u1/etc/lsb-release             #see if ubuntu vm file is readable
sudo cat /mnt/u2/Windows/system.ini          #see if windows vm file is readable
sudo guestunmount /mnt/u1
sudo guestunmount /mnt/u2

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .