Set up vagrant VM with KVM/qemu without VirtualBox

Is it feasible, and if it is what should i change in config files?

Hi @daweed93,

I haven’t done it but I have seen many students coming up with their own solutions if they are not able to setup the environment that we recommend in our course.

However, I will suggest you to go with the recommended solution if it works for you.

That being said, if for some reason you are interested in setting up your own environment then you will have to make modifications in the Vagrantfile that is present in the file.

You can also refer this post, where a user has shared his solution for some other environment.

Hope it helps!

Shubham Ranjan
Curriculum Support Engineer

Thanks for help man. I have one more question. Since I had to modify = “ubuntu/trusty64” to = “centos/7” does it affect connecting to because im getting following error:

Bringing machine ‘mongod-m103’ up with ‘libvirt’ provider…
==> mongod-m103: Creating image (snapshot of base box volume).
==> mongod-m103: Creating domain with the following settings…
==> mongod-m103: – Name: m103-vagrant-env_mongod-m103
==> mongod-m103: – Domain type: kvm
==> mongod-m103: – Cpus: 1
==> mongod-m103: – Feature: acpi
==> mongod-m103: – Feature: apic
==> mongod-m103: – Feature: pae
==> mongod-m103: – Memory: 512M
==> mongod-m103: – Management MAC:
==> mongod-m103: – Loader:
==> mongod-m103: – Nvram:
==> mongod-m103: – Base box: centos/7
==> mongod-m103: – Storage pool: default
==> mongod-m103: – Image: /home/david/.local/share/libvirt/images/m103-vagrant-env_mongod-m103.img (41G)
==> mongod-m103: – Volume Cache: default
==> mongod-m103: – Kernel:
==> mongod-m103: – Initrd:
==> mongod-m103: – Graphics Type: vnc
==> mongod-m103: – Graphics Port: -1
==> mongod-m103: – Graphics IP:
==> mongod-m103: – Graphics Password: Not defined
==> mongod-m103: – Video Type: cirrus
==> mongod-m103: – Video VRAM: 9216
==> mongod-m103: – Sound Type:
==> mongod-m103: – Keymap: en-us
==> mongod-m103: – TPM Path:
==> mongod-m103: – INPUT: type=mouse, bus=ps2
==> mongod-m103: Creating shared folders metadata…
Network is not available. Specify available network
name, or an ip address if you want to create a new network.

Hi @daweed93,

Sorry for the delayed response. Can you please share the content of the modified vagrantfile ?

Shubham Ranjan
Curriculum Support Engineer

Here is the content of the vagrantfile

if Vagrant::VERSION < “2.0.0”
$stderr.puts “Must redirect to new repository for old Vagrant versions”

Vagrant.configure(“2”) do |config| = “centos/7”
config.vm.box_check_update = false
config.vm.synced_folder “shared/”, “/shared”, create: true
config.vm.synced_folder “dataset/”, “/dataset”, create: true

config.vm.define “mongod-m103” do |server|
server.vm.provider “:libvirt” do |vb|
vb.customize [“modifyvm”, :id, “–cpus”, “2”] = “mongod-m103”
vb.memory = 2048
server.vm.hostname = “” :private_network, ip: “”
server.vm.provision :shell, path: “provision-mongod”, args: ENV[‘ARGS’]

Hi @daweed93,

I am sorry I am new to this scenario, so correct me if I am wrong, in this post, user has mentioned to remove below lines which I see in your code, can that be the issue?

vb.customize [“modifyvm”, :id, “–cpus”, “2”] = “mongod-m103”