Quantcast
Channel: Ubuntu Forums - Virtualisation
Viewing all articles
Browse latest Browse all 4211

[ubuntu] Can not create VM using libvirt on KVM host

$
0
0
I've been following this guide to set up a virtual machines on my xeon (banana) to be run from my laptop (cherry);

here's my complete install process with the few errors I've been getting;

CPU can handle virtualisation;
Code:

rhys@banana:~$ egrep -c '(vmx|svm)' /proc/cpuinfo
8

Code:

rhys@banana:~$ cat /sys/hypervisor/properties/capabilities
cat: /sys/hypervisor/properties/capabilities: No such file or directory

the guide says;
You must see hvm flags in the output.

Alternatively, you may execute:
kvm-ok


so I assume that missing sys/hypervisor/properties/capabilities does not matter.

Code:

rhys@banana:~$ kvm-ok
INFO: /dev/kvm exists
KVM acceleration can be used

Code:

rhys@banana:~$ egrep -c ' lm ' /proc/cpuinfo
8

Code:

rhys@banana:~$ uname -m
x86_64

everything for KVM is installed;
Code:

rhys@banana:~$ sudo apt-get install qemu-kvm libvirt-bin ubuntu-vm-builder bridge-utils
Reading package lists... Done
Building dependency tree     
Reading state information... Done
bridge-utils is already the newest version.
ubuntu-vm-builder is already the newest version.
libvirt-bin is already the newest version.
qemu-kvm is already the newest version.

Code:

rhys@banana:~$ sudo adduser `id -un` libvirtd
The user `rhys' is already a member of `libvirtd'.

according to this everything has been installed correctly.
Code:

rhys@banana:~$ virsh -c qemu:///system list
 Id    Name                          State
----------------------------------------------------

sock appears to have the correct permissions;
Code:

rhys@banana:~$ sudo ls -la /var/run/libvirt/libvirt-sock
srwxrwx--- 1 root libvirtd 0 Feb 16 11:59 /var/run/libvirt/libvirt-sock

/dev/kvm is now in the correct group.
Code:

rhys@banana:~$ ls -l /dev/kvm
crw-rw---- 1 root kvm 10, 232 Feb 16 12:21 /dev/kvm
rhys@banana:~$ sudo chown root:libvirtd /dev/kvm
rhys@banana:~$ ls -l /dev/kvm
crw-rw---- 1 root libvirtd 10, 232 Feb 16 12:21 /dev/kvm

I had to run this with sudo;
Code:

rhys@banana:~$ sudo rmmod kvm
sudo modprobe -a kvm

I then switch to the client and install virt-manager;

Code:

rhys@cherry:~$ sudo apt-get install virt-manager
Reading package lists... Done
Building dependency tree     
Reading state information... Done
virt-manager is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.

I open the Virtual Machine Manager and add connection;
Hypervisor: QEMU/KVM
Connect to remote host
Method: SSH
Username: rhys
Hostname banana

Everything seems to connect, I then have; banana (QEMU) in the queue, which I right click and select New;

Name: plum
Connection: banana(QEMU/KVM)

Choose how you would like to install the operating system


If I choose Local install media or Network Install and manually type in the location of 13.10 iso, I get;

Error setting install media location.

I've tried putting the iso on the client and the server and referenced them as if it's local. ie /home/rhys/13.10.iso.


Can anyone see where I'm going wrong?

Cheers

Viewing all articles
Browse latest Browse all 4211

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>