Installing Vagrant with KVM on Ubuntu 18.04

Start by installing necessary packages:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
apt-get install nfs-kernel-server qemu-kvm libvirt-daemon libvirt-daemon-system virtinst bridge-utils vagrant-libvirt
apt-get install nfs-kernel-server qemu-kvm libvirt-daemon libvirt-daemon-system virtinst bridge-utils vagrant-libvirt
apt-get install nfs-kernel-server qemu-kvm libvirt-daemon libvirt-daemon-system virtinst bridge-utils vagrant-libvirt

Create an ordinary user and add it to the sudo and the libvirt group:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
adduser mike
usermod -G libvirt,sudo mike
adduser mike usermod -G libvirt,sudo mike
adduser mike
usermod -G libvirt,sudo mike

Now you should be able to switch into this user and give Vagrant a spin:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
su - mike
mkdir testmachine
cd testmachine
vagrant init debian/stretch64
vagrant up
su - mike mkdir testmachine cd testmachine vagrant init debian/stretch64 vagrant up
su - mike
mkdir testmachine
cd testmachine
vagrant init debian/stretch64
vagrant up

 

Dette indlæg blev udgivet i KVM, Links, Programmering, Vagrant. Bogmærk permalinket.

Skriv et svar