Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Commands I used to zero out space on a virtual disk from the host without running the guest vm
#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
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
You can’t perform that action at this time.