Questions tagged [libvirt]

libvirt is an open source API, daemon and management tool for managing platform virtualization.[1] It can be used to manage Linux KVM, Xen, VMware ESX,qemu and other virtualization technologies. These APIs are widely used in Orchestration Layer for Hypervisors in the development of a cloud based solution.

The virtualization API

libvirt is:

  • A toolkit to interact with the virtualization capabilities of recent versions of Linux (and other OSes), see our project goals for details.
  • Free software available under the GNU Lesser General Public License.
  • A long term stable C API
  • A set of bindings for common languages
  • A CIM provider for the DMTF virtualization schema
  • A QMF agent for the AMQP/QPid messaging system

libvirt supports:

  • The KVM/QEMU Linux hypervisor
  • The Xen hypervisor on Linux and Solaris hosts.
  • The LXC Linux container system
  • The OpenVZ Linux container system
  • The User Mode Linux paravirtualized kernel
  • The VirtualBox hypervisor
  • The VMware ESX and GSX hypervisors
  • The VMware Workstation and Player hypervisors
  • The Microsoft Hyper-V hypervisor
  • Virtual networks using bridging, NAT, VEPA and VN-LINK.
  • Storage on IDE/SCSI/USB disks, FibreChannel, LVM, iSCSI, NFS and filesystems

libvirt provides:

  • Remote management using TLS encryption and x509 certificates
  • Remote management authenticating with Kerberos and SASL
  • Local access control using PolicyKit
  • Zero-conf discovery using Avahi multicast-DNS
  • Management of virtual machines, virtual networks and storage
  • Portable client API for Linux, Solaris and Windows

More infos:

556 questions
2
votes
1 answer

libvirt changing kernel direct boot to boot from HDD

World! Could smb, please, help me with the following problem: I need to change boot options in input.xml file for a virtual machine FOO to boot (any time) from hdd. Are there any mistakes, will that work? Should I add smth to…
2
votes
1 answer

Error monitoring VM migration using libvirt and qemu

I'm implementing a live migration management tool using libvirt, qemu and python. In my original setup, which includes two Debian boxes I can migrate and monitor the migration without any issues, however, in my production setup, which uses CentOS…
René
  • 83
  • 3
  • 6
2
votes
1 answer

libvirt/virsh unable to destroy vm

I have a big problem with my kvm: I wanted to shut down my machine "Owncloud", after the power state of "Owncloud" is "in shutdown". When I try to destroy this machine with "virsh destroy Owncloud" I got the following: error: Failed to destroy…
WhiteIntel
  • 697
  • 1
  • 9
  • 24
2
votes
1 answer

Perl and CPAN Sys::Virt - connect to vm console

I'm using Sys::Virt CPAN module to "talk" to my kvm hypervisors and manage the domains. I can do nearly everything the noramlly used bash virsh command can do, except for virsh console, which (who would guess it) opens a text console to a domain.…
eye
  • 450
  • 1
  • 4
  • 14
2
votes
1 answer

Making a connection to QEMU with Libvirt Java API

i'm having a problem with connecting to QEMU with Libvirt API, here is the code: import org.libvirt.Connect; import org.libvirt.ConnectAuth; import org.libvirt.ConnectAuthDefault; import org.libvirt.LibvirtException; import…
Johann Gomes
  • 3,813
  • 5
  • 23
  • 25
2
votes
1 answer

QEMU-KVM Libvirt Java Binding Error: Forbidden for read only access

so I'm currently doing my thesis and a part of it is to communicate with KVM (Kernel Based Virtual Machine). I was already able to establish a connection through the use of the libvirt Java Binding. The virtual machine i created in KVM (centostest)…
joanna
  • 117
  • 1
  • 4
  • 12
2
votes
1 answer

cpuset.cpu_exclusive doesnt gives desired results in libvirt

So, basically the flag cpuset.cpu_excluvie restrict the the processor to run processes present in a particular cpuset only. Now, I have a VM with 3 cpus and I launched three VM instances making one cpu exclusive for each of them. That means, my…
Pensu
  • 3,263
  • 10
  • 46
  • 71
2
votes
2 answers

What is the best way to generate java classes from libvirt relaxng schemas?

Here is the thing: I do not wish (yet) to do some operation in a vm via libvirt. What I want to do is take the libvirt relaxng schemas and get java classes from them. This way I can produce an xml configuration file representing a virtual machine.…
user1310388
2
votes
1 answer

How to automatically obtain the dom0's vm state?

The My server is CentOS5.X, the CCP has been installed, but the python version 2.4, libvirt 0.7.x version. I from dom0 obtain the domU state Libvirt 0.7 virEventRunDefaultImpl provided (libvirt 0.8 only) method In addition to the round robin Now,…
2
votes
1 answer

Libvirt Build Failure On Fedora 17 After Update

I recently installed the updates for Fedora 17, among which was an upgrade from Linux Kernel 3.7.x to 3.8.x. Now I can't build Libvirt! It is giving me this error: checking linux/if_bridge.h usability... no checking linux/if_bridge.h presence...…
Freedom_Ben
  • 11,247
  • 10
  • 69
  • 89
2
votes
1 answer

How to detach a disk from KVM correctly

When I try to detach a drive in KVM, I get the following error: virsh detach-disk vps_99 vde error: operation failed: disk vde cannot be detached - no PCI address for device I have tried google, but can't find anyone else with the same…
Daniele Testa
  • 1,538
  • 3
  • 16
  • 34
2
votes
3 answers

how to create a VM's snapshot using libvirt?

I am trying to create a snapshot of active/idle virtual machine on KVM hypervisor using the following code: It looks like the xmlDesc doesnt have enough information to create a snapshot of neither running nor idle virtual machine or maybe something…
user2023107
  • 65
  • 1
  • 9
2
votes
1 answer

KVM and libvirt: wrong CPU type in virtual host

We us KVM and libvirt on a 6 core (12 HT cores) machine for virtualization. Problem: wrong CPU type in virtual host. used KVM, libvirt, kernel version: libvirt version: 0.9.8 QEMU emulator version 1.0 (qemu-kvm-1.0), Copyright (c) 2003-2008 Fabrice…
simUser
  • 756
  • 2
  • 7
  • 15
2
votes
2 answers

Kvm/Qemu maximum vm count limit

For a research project I am trying to boot as many VM's as possible, using python libvirt bindings, in KVM under Ubuntu server 12.04. All the VM's are set to idle after boot, and to use a minimum amount of memory. At the most I was able to boot 1000…
Alfred Bratterud
  • 523
  • 1
  • 4
  • 12
2
votes
4 answers

Problems getting ruby-libvirt extensions to compile Mountain Lion

I bought a new Mac this week and have had big problems getting this gem installed. It was never a problem on my old Mac but seems to be particularly difficult on this one. I have installed libvirt via Homebrew, Xcode4.4 (with command line tools) and…
Johan
  • 554
  • 1
  • 4
  • 10