Vagrant
from https://www.vagrantup.com
--
Install libvirt and qemu:
dnf -y install qemu libvirt libvirt-devel ruby-devel gcc
source: https://github.com/vagrant-libvirt/vagrant-libvirt#possible-problems-with-plugin-installation-on-linux
https://www.vagrantup.com/docs/installation/index.html
https://www.vagrantup.com/downloads.html
Install vagrant plugin for libvirt:
vagrant plugin install vagrant-libvirt--
To list all the plugins:
vagrant plugin list
To repair the plugins if you run into issues:
vagrant plugin repair
To update the plugin:
vagrant plugin update
--
First init the Vagrantfile
vagrant init fedora/29-cloud-base
// Note: You can check whether the corresponding image present here
// https://app.vagrantup.com/fedora
--
// without any specific OS:
vagrant init
You need to update Vagrant file with specific OS before proceeding.
--
To create and configure and to bring up the VM
vagrant up --provider=libvirt
--
You can find your downloaded box here:
ls ~/.vagrant.d/boxes/
--
vagrant status
// only for current directory
--
vagrant global-status
// global for this user
--
vagrant halt <id>
id is received in global-status command above
--
To start again:
vagrant provision
or you can run the same command as:
vagrant up --provision
You can also avoid running it by
vagrant up --no-provision
--
// To login
vagrant ssh
--
// To destroy specific box
vagrant destroy
// Note, the above will not remove the box from the system (from backend).
vagrant init fedora/29-cloud-base
// Note: You can check whether the corresponding image present here
// https://app.vagrantup.com/fedora
--
// without any specific OS:
vagrant init
You need to update Vagrant file with specific OS before proceeding.
--
To create and configure and to bring up the VM
vagrant up --provider=libvirt
--
You can find your downloaded box here:
ls ~/.vagrant.d/boxes/
--
vagrant status
// only for current directory
--
vagrant global-status
// global for this user
--
vagrant halt <id>
id is received in global-status command above
--
To start again:
vagrant provision
or you can run the same command as:
vagrant up --provision
You can also avoid running it by
vagrant up --no-provision
--
// To login
vagrant ssh
--
// To destroy specific box
vagrant destroy
// Note, the above will not remove the box from the system (from backend).
// To remove it you can use
vagrant box remove
--
// remembers the state saving the state of VM
vagrant suspend
// To resume back
vagrant resume
--
// To stop:
vagrant halt
--
// List all the boxes in your system:
vagrant box list
--
// To share files between host and VM
// option in Vagrantfile
config.vm.synced_folder "../data", "/vagrant_data"
Here ../data => directory in Host
/vagrant_data => directory in VM
Ensure you have working NFS server in host.
Also, udp=y in /etc/nfs.conf in the host machine.
--
vagrant reload -> vagrant halt + vagrant up
// along with provision
vagrant reload --provision
--
// provider specific changes in Vagrantfile
vb.memory = "value"
vb.cpus = "value"
--
// to package a new vagrant box
vagrant package
--
Refer this gist for additional info:
vagrant box remove
--
// remembers the state saving the state of VM
vagrant suspend
// To resume back
vagrant resume
--
// To stop:
vagrant halt
--
// List all the boxes in your system:
vagrant box list
--
// To share files between host and VM
// option in Vagrantfile
config.vm.synced_folder "../data", "/vagrant_data"
/vagrant_data => directory in VM
Ensure you have working NFS server in host.
Also, udp=y in /etc/nfs.conf in the host machine.
--
vagrant reload -> vagrant halt + vagrant up
// along with provision
vagrant reload --provision
--
// provider specific changes in Vagrantfile
vb.memory = "value"
vb.cpus = "value"
--
// to package a new vagrant box
vagrant package
--
Refer this gist for additional info:
No comments:
Post a Comment