3

i have a fresh ubuntu 18.04 install. I am trying to run cisco virl images on GNS3. When i start the image it throws me an error

"QEMU process has stopped, return code: 1 Start QEMU with /usr/bin/qemu-system-x86_64 -name CiscoIOSvL215.2.4055-1 -m 768M -smp cpus=1 -enable-kvm -machine smm=off -boot order=c -drive file=/home/aj/GNS3/projects/switchinstall/project-files/qemu/2a28d664-2c5b-4cb5-bca0-dc3c7b28999a/hda_disk.qcow2,if=virtio,index=0,media=disk -uuid 2a28d664-2c5b-4cb5-bca0-dc3c7b28999a -serial telnet:127.0.0.1:5001,server,nowait -monitor tcp:127.0.0.1:42319,server,nowait -net none -device e1000,mac=0c:7d:d6:99:9a:00,netdev=gns3-0 -netdev socket,id=gns3-0,udp=127.0.0.1:10001,localaddr=127.0.0.1:10000 -device e1000,mac=0c:7d:d6:99:9a:01,netdev=gns3-1 -netdev socket,id=gns3-1,udp=127.0.0.1:10003,localaddr=127.0.0.1:10002 -device e1000,mac=0c:7d:d6:99:9a:02,netdev=gns3-2 -netdev socket,id=gns3-2,udp=127.0.0.1:10005,localaddr=127.0.0.1:10004 -device e1000,mac=0c:7d:d6:99:9a:03,netdev=gns3-3 -netdev socket,id=gns3-3,udp=127.0.0.1:10007,localaddr=127.0.0.1:10006 -device e1000,mac=0c:7d:d6:99:9a:04,netdev=gns3-4 -netdev socket,id=gns3-4,udp=127.0.0.1:10009,localaddr=127.0.0.1:10008 -device e1000,mac=0c:7d:d6:99:9a:05,netdev=gns3-5 -netdev socket,id=gns3-5,udp=127.0.0.1:10011,localaddr=127.0.0.1:10010 -device e1000,mac=0c:7d:d6:99:9a:06,netdev=gns3-6 -netdev socket,id=gns3-6,udp=127.0.0.1:10013,localaddr=127.0.0.1:10012 -device e1000,mac=0c:7d:d6:99:9a:07,netdev=gns3-7 -netdev socket,id=gns3-7,udp=127.0.0.1:10015,localaddr=127.0.0.1:10014 -device e1000,mac=0c:7d:d6:99:9a:08,netdev=gns3-8 -netdev socket,id=gns3-8,udp=127.0.0.1:10017,localaddr=127.0.0.1:10016 -device e1000,mac=0c:7d:d6:99:9a:09,netdev=gns3-9 -netdev socket,id=gns3-9,udp=127.0.0.1:10019,localaddr=127.0.0.1:10018 -device e1000,mac=0c:7d:d6:99:9a:0a,netdev=gns3-10 -netdev socket,id=gns3-10,udp=127.0.0.1:10021,localaddr=127.0.0.1:10020 -device e1000,mac=0c:7d:d6:99:9a:0b,netdev=gns3-11 -netdev socket,id=gns3-11,udp=127.0.0.1:10023,localaddr=127.0.0.1:10022 -device e1000,mac=0c:7d:d6:99:9a:0c,netdev=gns3-12 -netdev socket,id=gns3-12,udp=127.0.0.1:10025,localaddr=127.0.0.1:10024 -device e1000,mac=0c:7d:d6:99:9a:0d,netdev=gns3-13 -netdev socket,id=gns3-13,udp=127.0.0.1:10027,localaddr=127.0.0.1:10026 -device e1000,mac=0c:7d:d6:99:9a:0e,netdev=gns3-14 -netdev socket,id=gns3-14,udp=127.0.0.1:10029,localaddr=127.0.0.1:10028 -device e1000,mac=0c:7d:d6:99:9a:0f,netdev=gns3-15 -netdev socket,id=gns3-15,udp=127.0.0.1:10031,localaddr=127.0.0.1:10030 -nographic

Execution log: Could not access KVM kernel module: Permission denied qemu-system-x86_64: failed to initialize KVM: Permission denied

error while starting CiscoIOSvL215.2.4055-1: Could not start QEMU console [Errno 111] Connect call failed ('127.0.0.1', 5001)

Could not start QEMU console [Errno 111] Connect call failed ('127.0.0.1', 5001)"

But when i run as super user in terminal it works fine.

infact gns3 creates a file in ~/.conf/GNS3/run_as_root and after exiting the active connection it can only be started if i run as root or remove that file.

I am sure its related to permissions and privileges .

Newbie here and will appreciate an sort of guidance.

Thank you.

3

As your normal user:

sudo usermod -aG kvm $(whoami) && sudo reboot
| improve this answer | |
1

You'd need to be in the kvm group to be able to access /dev/kvm. You can check that with id Furthermore as your user you can run kvm-ok which should look like

$ kvm-ok
INFO: /dev/kvm exists
KVM acceleration can be used

In other cases e.g. through libvirt it is the daemon that needs to be allowed to do so (it is by default), but you need to be able to talk to it which depending on the setup is either networking or a socket based on group libvirtd.

I don't know gns3, but if it has a similar special setup it might need similar extra permissions like my libvirt example to be allowed to run through it.

Also in case this does not fully solve it, please report with the exact command to start your guest that you use. If through libvirt or other tools also provide your guest configuration in those tools.

| improve this answer | |
0

I too had this issue running GNS3 2.2.5 on Ubuntu 18.04 LTS. I ran the command recommended in this thread:

sudo usermod -aG kvm $(whoami) && sudo reboot

This worked like a charm and I am now able to run VIRL images in GNS3. Thank you so much for this!!!

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.