edit vagrant box for vagrant-libvirt

check file

$ file trusty64_vagrant_box_image.img
trusty64_vagrant_box_image.img: QEMU QCOW Image (unknown version)

init

apt-get install -qqy lvm2
modprobe nbd

attach

cd /var/lib/libvirt/images
qemu-nbd -c /dev/nbd0 `pwd`/trusty64_vagrant_box_image.img
vgscan
vgchange -ay
mount /dev/mapper/vagrant--vg-root /mnt

detach

cd /
umount /mnt
vgchange -an vagrant-vg
qemu-nbd -d /dev/nbd0
comments powered by Disqus