12

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.

jscott
  • 25,114
Alex
  • 155

4 Answers4

7

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

chicks
  • 3,915
  • 10
  • 29
  • 37
Monsignor
  • 173
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/

pepoluan
  • 5,248
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
Kjetil S.
  • 201