-
Notifications
You must be signed in to change notification settings - Fork 35
Create Libvirt Box
ppggff edited this page Oct 11, 2022
·
4 revisions
Notes: this is the temp solution.
Use shell script create_box.sh.
This is edited version of create_box.sh
from vagrant-libvirt.
Steps:
-
stop the vm
vagrant stop # wait 10 - 20 seconds # check vagrant status # or, check qemu process ps -ef | grep qemu
-
find the image (in the same dir with the
Vagrantfile
)find . -name "*.img"
-
create box with
create_box.sh
./create_box.sh [path to img, from step 2] [box name] # for example ./create_box.sh ./.vagrant/machines/default/qemu/bU6uTtFoXTE/linked-box.img mybox
Notes:
- Each box contains a default
Vagrantfile
, you can change it by:- Provide the third argument (path to the addition config file) to add more info to the default
Vagrantfile
(seecreate_box.sh
for detail) - Edit the
create_box.sh
directly to change the defaultVagrantfile
- Provide the third argument (path to the addition config file) to add more info to the default
- You may need to check the original default
Vagrantfile
with the source box (you can find it byfind ~/.vagrant.d -name Vagrantfile
) - In the default
Vagrantfile
, all parts related to libvirt will be ignored by this vagrant-qemu provider