Shrink guest on hosted platform: Difference between revisions

Jump to navigation Jump to search
m
and for Fusion
(Added a few more words to indicate that these commands are to be run from within the VM)
m (and for Fusion)
(3 intermediate revisions by the same user not shown)
Line 106: Line 106:


The trigger to zero space with 0x00 has changed to -z!
The trigger to zero space with 0x00 has changed to -z!
== Zeroing an encrypted disk ==
If you use disk encryption in the guest OS then zero'ing out the disk won't help.
The reason is that a good disk encryption scheme will write out random data to the disk when you write out zero's.
In other words, if you have enabled full disk encryption in the guest then you can not shrink the disk anymore as there is no space to reclaim.


== Shrink the disk ==
== Shrink the disk ==
Line 122: Line 130:


Note that vmware-vdiskmanager is probably not in your search path, so you might have to prepend the vmware-vdiskmanager command with the actual path with the command is located.
Note that vmware-vdiskmanager is probably not in your search path, so you might have to prepend the vmware-vdiskmanager command with the actual path with the command is located.
If you need to use "sudo" in order to be able to run the above then beware that the ownership of the .vmdk files might get changed to root.
You will have to change the ownership back to your own user, eg:
sudo chown username: *.vmdk
If you don't change the ownership back you might see errors like:
"Unable to open file .../Virtual Disk.vmdk: Insufficient permission to access file".


== Shrink using vmware tools ==
== Shrink using vmware tools ==
Line 147: Line 162:


[https://communities.vmware.com/thread/581576 Solved: Shrink an APFS virtual disk]
[https://communities.vmware.com/thread/581576 Solved: Shrink an APFS virtual disk]
== External links ==
* [https://docs.vmware.com/en/VMware-Workstation-Pro/16.0/com.vmware.ws.using.doc/GUID-421A1073-BF16-4BC7-AA76-46B954CA438D.html Clean Up a Virtual Hard Disk on Windows Hosts - Workstation 16 Pro documentation]
* [https://docs.vmware.com/en/VMware-Workstation-Pro/16.0/com.vmware.ws.using.doc/GUID-3F94C7B5-19A5-4E91-9709-B17FAA93FF75.html Configuring and Maintaining Virtual Hard Disks - Workstation 16 Pro documentation]
* [https://docs.vmware.com/en/VMware-Fusion/12/com.vmware.fusion.using.doc/GUID-6BB29187-F47F-41D1-AD92-1754036DACD9.html#GUID-6BB29187-F47F-41D1-AD92-1754036DACD9 Clean up a Virtual Machine - VMware Fusion 12 documentation]
1,274

edits

Navigation menu

Guest

Support my products