Compact VirtualBox guest disks.

This commit is contained in:
giomba 2022-11-05 20:00:45 +01:00
parent ebcbb5a5d1
commit cb070f4873
1 changed files with 15 additions and 0 deletions

15
virtualbox.md Normal file
View File

@ -0,0 +1,15 @@
# VirtualBox
## Compact Windows disk
1. on Windows guest system:
```
.\sdelete.exe c: -z
```
2. on Linux host system:
```
vboxmanage modifymedium --compact /path/to/vm/disk.vdi
```
Note: disk size will grow during the `sdelete.exe` process; then, it can be compacted.
Note: if you don't have enough disk space to allow the expansion, just do it in multiple steps, by stopping `sdelete.exe` as soon as the host's disk is almost full.