5

Is there a manual available that covers the proper setup of a Virtual Machine Server with no GUI with an Ubuntu workstation with a GUI and Virtual Machine Manager installed? Both are 12.04 version.

I get the following error message:

unable to connect to libvirt
Verify that
-The libvirt-bin package is installed
-The libvirt daemon has been started
-you are a member of the libvirtd group

the package is installed
for some reason starting the daemon seems to crash

libvirtd start
info:  libvirt version 0.9.8
error: virExecWithHook:328 : cannot find 'pm-is-supported' in path: No such file or directory
also
qemucapsInit:856: Failed to get host power management capabilities

So I guess I did not set the server up correctly. All manuals I found do not mention "Virtual Machine Manager". I only chose the packages to connect with SSH remotely and the "Virtual Machine Server" for the server installation.

So I would like to find a manual that covers this combo or then covered only GUI machines that have both on the same machine, which will not really help with system performance as a hypervisor.

1
  • This might be a problem with AppArmor. Please have a look into /var/log/kern.log. Do you find DENIED entries mentioning libvirt-bin?
    – qbi
    Jan 14, 2013 at 10:37

4 Answers 4

5

First, make sure your hardware supports virtualization:

egrep '(vmx|svm)' /proc/cpuinfo

If this doesn't spit out some data, your hardware doesn't support virtualization, and you can't use KVM. (Note: hardware virtualization must also be enabled in BIOS/UEFI for the machine. It typically is not already enabled by default. You need to check for it.)

sudo apt-get update && sudo apt-get install kvm libvirt-bin virtinst bridge-utils

This gets you the requisite packages.

sudo adduser `id -un` libvirtd

This puts you in the requisite group to play with virtualization. Note: if you are running in a GUI, and expect to run virt-manager, you will have to log out and back in again in order to make this take effect!

sudo virsh -c qemu:///system list

This should get you a (currently empty) list of VMs on the system:

 Id Name                 State
----------------------------------

You are now ready to use virt-manager to manage VMs from the GUI, or virsh to manage them from the command-line. If you need help using virsh to create and manage guests, please ask that as a separate question - it gets pretty chewy. :)

If you want to use virt-manager running on a remote workstation, be aware that you will need working SSH access to the server from that workstation. As long as you have that, and as long as the user you're SSHing in as has been added to the libvirt-bin group as shown above, it will 'just work' from there - you'll set up the connection in virt-manager on the remote machine as "type SSH" and specify username and ip address from there, and it will prompt you for a password on connection (unless you've set up passwordless public-key auth, in which case it'll use that).

0
2

I have run into the same issue.

To get past it, open up the terminal and enter:

sudo virt-manager

Then enter your password and the GUI should open right up.

I hope this helps!

0

You haven't mentioned what your virtualization flavor is.

I have no experience with libvirt; nonetheless, like you, I've found myself in need of a virtual-machine manager. Here is how I solve the problem.

I'm using Virtualbox, currently version 4.2. This version installs a service called vboxweb-service, and with this service activated at boot, apache web server and phpvirtualbox now I've got a fully function virtual-machine-manager that I can use even when I'm not at the office.

Unfortunately the virtualbox script that is supposed to boot and shutdown the virtual machines automatically isn't completely functional, so I've created a script with some code I've found online, it's a bit slow, but will do the job until vboxautostart-service gets completed.

Follow this guide: How to autostart a virtualbox vm and of course the phpvirtualbox guide too.

0
  1. The user is a member of libvirtd.

  2. The end user does not have rights to the socket. For example:

    srwxrwx--- 1 root libvirt 0 Apr 16 10:53 /var/run/libvirt/libvirt-sock
    
  3. The group is libvirt.

  4. Add the user to the libvirt group, for example:

    sudo adduser frank libvirt
    
  5. Log out and log in.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .