Created
November 15, 2013 05:58
-
-
Save cjcolvar/7479811 to your computer and use it in GitHub Desktop.
Commands I used to zero out space on a virtual disk from the host without running the guest vm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Magic to zero out space on host without running guest | |
modprobe nbd max_part=16 | |
qemu-nbd -c /dev/nbd0 /home/cjcolvar/VirtualBox\ VMs/avalon-installer_default_1383930303/box-disk1.vdi | |
partprobe | |
vgchange -a y VolGroup | |
zerofree /dev/mapper/VolGroup-lv_swap | |
zerofree /dev/mapper/VolGroup-lv_root | |
vgchange -a n VolGroup | |
qemu-nbd -d /dev/nbd0 | |
#End magic |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment