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
8
votes
1 answer

How can I create a transient domain in libvirt?

How can I create a transient domain using libvirt? (Using QEMU/KVM as back-end) The documentation discusses the difference between transient and persistent domains at this link:…
reyammer
  • 194
  • 2
  • 7
8
votes
3 answers

Create Virtual Machine using libvirt error related to AppArmor

I am trying to create a virtual machine using libvirt using the command: virsh create file Contents of "file": testvm 100 1
Rasesh
  • 307
  • 1
  • 4
  • 11
7
votes
1 answer

QEMU+Virt-manager can't connect to virtlxcd-sock

I've installed qemu virt-manager libvirt on Linux Mint 20, I have a AMD FX(tm)-4300 Quad-Core Processor with AMD-V enabled in the bios, restarted a lot but virt-manager(Virtual Machine Manager) is saying: Unable to connect to libvirt lxc:///. Failed…
Scott Hather
  • 443
  • 5
  • 15
7
votes
1 answer

Alternative to virsh (libvirt)

I am using virsh list to display the list of vms running on the computer. I want the information printed in the process in the form of a 2d array. One way to go about this is to have the output, use tokenizer and store it in the array. But is there…
w2lame
  • 2,774
  • 6
  • 35
  • 48
7
votes
1 answer

host doesn't support requested feature: CPUID.01H:EDX.ds [bit 21] Does this warn affect virtual machine performance or use?

I found a lot of warning from the VM qemu log, Does this warn affect virtual machine performance or use? , is my libvirt.xml file problem? Or support hot-plug will have these warnings This is my libvirt xml configuration:
Paul
  • 195
  • 2
  • 4
  • 12
7
votes
1 answer

Python libvirt API - create a Virtual Machine

I am trying to create a python script to handle basic VM operations like: create a VM, delete a VM, start, stop, etc. Currently I'm rather "stuck" on create From the command line you would do something like: qemu-img create -f qcow2 vdisk.img…
Pandrei
  • 4,843
  • 3
  • 27
  • 44
7
votes
1 answer

File download speed from Amazon S3 drops to <2 kb/s = very slow download (on the machine it has been uploaded from)

Basic Problem: We've been experiencing very strange behaviour in our current infrastructure setup: file download speed from Amazon S3 drops to <2 kb/s (after ~10 downloads that have perfectly normal download speed) if the file is downloaded from…
pangdudu
  • 391
  • 2
  • 6
6
votes
1 answer

Can I register event callbacks using the libvirt Python module with a QEMU backend?

I would like to write some code to monitor events for domains running under QEMU, managed by libvirt. However, trying to register an event handler yields the following error: >>> import libvirt >>> conn = libvirt.openReadOnly('qemu:///system') >>>…
larsks
  • 277,717
  • 41
  • 399
  • 399
6
votes
1 answer

How to deal with interactive API in python

I'm in a situation where I need to pass some texts to a prompt generate by a API (seems for API it's a pretty weird behavior, this is the first time I ran into this), like below: kvm_cli = libvirt.open("qemu+ssh://han@10.0.10.8/system") then a…
Ripley
  • 664
  • 1
  • 6
  • 16
6
votes
2 answers

How to solve "Permission denied" error for qemu:commandline in libvirt?

Please find below a sample of my dom xml. I am running the command virsh create and I get this error: Unable to open file The permissions for this file are all good. Are there any special permissions needed…
Deepti
  • 113
  • 1
  • 2
  • 9
6
votes
0 answers

Udev rule with ACTION=="add" not being triggered when device is already connected at boot

Here is my simple udev rule: ACTION=="add",SUBSYSTEM=="usb",DEVPATH=="/devices/pci0000:00/0000:00:14.0/usb3/3-13",RUN+="/opt/usb-libvirt-hotplug/usb-libvirt-hotplug.sh…
Vain
  • 130
  • 1
  • 9
6
votes
3 answers

get running domains info using python + libvirt

I'm trying to do a simple script that will get various informations about running domains on a xen host. So far, i have : import libvirt import pprint conn = libvirt.open('xen:///') for id in conn.listDomainsID(): dom = conn.lookupByID(id) …
Disco
  • 4,226
  • 11
  • 58
  • 76
6
votes
1 answer

Dynamic memory allocation in KVM

I have Ubuntu 16.04 host over which I installed a Virtual guest (Windows server 2012) using KVM. The total RAM available is 16 GB. I have installed virtio balloon drivers. I have allocated 4GB current memory and 12GB maximum memory to the windows.…
raks
  • 329
  • 1
  • 5
  • 11
6
votes
4 answers

KVM installation in Ubuntu

I have tried installing KVM according to the guidelines provided on Ubuntu wiki but when I open Virtual Machine Manager it says that, 'Warning: KVM is not available. This may mean the KVM package is not installed, or the KVM kernel modules are not…
user3855944
6
votes
3 answers

libvirtError: internal error Cannot find suitable CPU model for given data

I am trying to run a simple instance after a fresh installation of OpenStack. The instance cannot start and in the log I found "libvirtError: internal error Cannot find suitable CPU model for given data". Please help. Some info: libvirt.x86_64 …
Leandro
  • 499
  • 1
  • 5
  • 13
1
2
3
37 38