Computing: Computer Administration

Moving a VMware virtual disk.

During the creation of the virtual machines of my VMware home network, I create their disks (.vmdk files) on partition V:, reserved for this on one of my USB disks. I also use this partition to store the virtual machines' snapshots. At a certain moment, I decided to use the C: partition of my SSD to store the disk (as well as the snapshots) of my IPFire firewall VM. The question was, how to do to move a VMware virtual disk to a new location within the filesystem without corrupting the virtual machine configuration files.

The first action to take is to delete all snapshots of the machine. Only then, it can be safely moved. There is a VMware tool, called vmware-vdiskmanager, to rename and move virtual disks. However, when running it, I got the message "Received signal 11" and nothing was done. Alternative: moving the virtual disk manually.

Run VMware Workstation and in the virtual machine's hardware settings, select the disk. Push the Remove button. Close Workstation and use File Explorer to move the .vmdk file to its new destination. Then open Workstation again and in the VM's settings use the Add button to add a virtual disk. Follow the steps of the wizard, just as you originally did, but choosing Use an existing virtual disk (instead of Create a new virtual disk) and browsing to the folder, where the disk is now located and there selecting the .vmdk file.

As I also wanted to save the disk snapshots onto my C: drive, I had to change the VM's working directory (in Options > General of its settings). When I went to my V: drive to delete the old snapshot folder, I noticed that VMware had created a .lck file there. Later on, there was also a .vmdk.lck folder at the old emplacement of the virtual disk. Run the virtual machine and if all works as it should, you can delete the .lck file and folder at the old disk location.

If you find this text helpful, please, support me and this website by signing my guestbook.