Nothing Special   »   [go: up one dir, main page]

Skip to content

KentBrockman/libvirt-vagrant-box

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Making Custom Boxes in Vagrant through libvirt

This is a demo to explain how to make custom boxes in vagrant that use the libvirt provider Recording for posterity, where I will ultimately forget The following guides were used to make this demo:

This is done on Pop!_OS 20.10 which is based on Ubuntu 20.10

General Process

This guide presumes you've already followed general procedure for setting up a box.

Lets say you're at the spot where your libvirt VM is ready to packaging. Follow ./boxit.sh. The steps include:

  1. Copy your box over from /var/lib/libvirt/images to box.img. It must be in the qcow2 format
  2. Create a metadata.json and Vagrantfile
  3. tar the following files:
  • box.img
  • Vagrantfile
  • metadata.json
  1. That should be it. Load into vagrant with vagrant box add --name custom custom_box.box
  2. Upload to https://app.vagrantup.com

Notes

This is following the older box guide where they were just tar archives https://www.vagrantup.com/docs/boxes/format

You can also use:

  • vagrant repackage to get a .box files e.g. vagrant box repackage pop_os_2110 libvirt 1.1.0
  • vagrant cloud provider upload to upload to vagrant cloud e.g. vagrant cloud provider upload kentbrockman/pop_os_2110 libvirt 1.1.0 package.box

About

How to package libvirt/kvm VMs as a vagrant box

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages