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
4
votes
3 answers

vfio_dma_map error when passthrough GPU using libvirt

here is the qemu log 2016-08-28T02:52:05.699498Z qemu-system-x86_64: -device vfio-pci,host=01:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on: vfio_dma_map(0x7f67ea3b3e10, 0x100000, 0xbff00000, 0x7f6651d00000) = -12 (Cannot allocate…
SirTeddy
  • 61
  • 2
  • 4
4
votes
1 answer

Libvirt on Xenserver 6.5

I am trying to install Libvirt with Xen driver on the Opensource Xenserver 6.5. I found that the XenAPI driver lacks some of the APIs like "virConnectNumOfStoragePools" which I need for my work. Hence, I will need to use the libxl or xenlight driver…
ZephyrPLUSPLUS
  • 2,550
  • 2
  • 18
  • 13
4
votes
1 answer

Sending packet through linux macvtap interface

Linux supports an interface type, macvtap. I can't find great documentation on it, but this is a good starter: http://virt.kernelnewbies.org/MacVTap I'm trying to use this to create a new virtual net device that I can programmatically read and write…
David Terei
  • 1,985
  • 16
  • 18
4
votes
1 answer

Ansible: virt module XML error

I'm trying to define a VM using the virt module and a XML file. This task: - name: Define VM using the XML file virt: command=define name={{ new_vm_name }} xml={{ vm_images_path }}/{{ new_vm_xml }} remote_user: root …
Ignacio Verona
  • 655
  • 2
  • 8
  • 22
4
votes
1 answer

libvirt - Determining the volume that a domain uses via API

In virt-manager, when viewing the Storage tab under Connection Details, there is a "Used By" column that shows the domain using each volume: How can I determine this same information, namely, the domain using a given volume, using the API (python…
billyw
  • 388
  • 1
  • 5
  • 15
4
votes
4 answers

How to build and install libvirt on Mac?

I referred to this article, but used more recent libraries. To be explicit, I downloaded libgpg-error-1.10, libgcrypt-1.5.0,gnutls-3.1.3 and libvirt-1.0.0 libgpg-error-1.10, libgcrypt-1.5.0 installed OK and when configure gnutls-3.1.3, an error…
can.
  • 2,098
  • 8
  • 29
  • 42
4
votes
1 answer

apparmor causes issues on libvirt with custom qemu

I wanted to run libvirt using a customized version of qemu. However, after I installed my version of qemu and rebooted I get the following message in dmesg type=1400 audit(1338385059.381:51): apparmor="DENIED" operation="exec" parent=1700…
neorg
  • 516
  • 7
  • 21
3
votes
1 answer

libvirt and VirtualBox on OS X

I'm trying to access VirtualBox through libvirt on OS X (Lion). I installed libvirt 0.9.4 using Homebrew. However, libvirt fails to connect to VirtualBox: # virsh -c vbox:///session error: internal error unable to initialize VirtualBox driver…
Lorin Hochstein
  • 57,372
  • 31
  • 105
  • 141
3
votes
1 answer

whether openstack instance's time would be slowed down after long time running

in my kolla openstack env, using containerized chrony service to keep controller node and compute node time sync. and by default, the instance guest OS time would be synchronized once with host at instance boot time, but I donot know whether the…
Lufus
  • 31
  • 1
3
votes
1 answer

Assign static/DHCP IP from the hosts network to KVM VM provosioned by Terraform

I have a testserver connected to my home network with static IP address, virtualized with KVM/Libvirt. To test some services inside my network (e.g. with cell phones), I'd like to assign those VMs IPs from my SOHO router network - either statically…
Lion
  • 16,606
  • 23
  • 86
  • 148
3
votes
1 answer

Booting vdi image on virtualbox using libvirt

I am not able to boot a vdi image on virtualbox using libvirt .It keeps showing me "Bootable medium not found". I have tried booting it manually with virtualbox GUI and it boots without any problem. May there is some problem with my libvirt domain…
Yeswantth
  • 81
  • 1
  • 7
3
votes
2 answers

libvirt: virt-install hangs on installation

After reading wiki libvirt I started virt-install to install VM off the Debian10 netinstall ISO image: % sudo virt-install --debug --connect qemu:///system --virt-type kvm --name vm-debian --memory 1024 --disk…
Mark
  • 6,052
  • 8
  • 61
  • 129
3
votes
0 answers

libvirt python for windows

I am trying to create a python script that runs on Windows to remotely control libvirt managed VMs (on a Linux system). If I try to pip install libvirt-python I get the error Exception: pkg-config binary is required to compile libvirt-python. I…
user24591
  • 31
  • 1
3
votes
1 answer

Qemu USB Passthrough iPhone disconnects repeatedly

I've a MacOS Catalina in virtual machine (libvirt/qemu), host machine is Fedora 31. I want to passthrough an iPhone SE for iOS development. When I connect the iPhone I see it in dmesg [11680.439777] usb 3-1: new high-speed USB device number 2 using…
Martin Edlman
  • 665
  • 7
  • 15
3
votes
0 answers

Failed to start libvirtd.service: Unit -.mount is masked

I've removed a disk (mounted at /win-vm) from host which had a kvm volume pool. Now I can't start libvirtd root@ws:/# systemctl start libvirtd Failed to start libvirtd.service: Unit -.mount is masked. Logs root@ws:/# journalctl -u…
Moazzem Hossen
  • 2,276
  • 1
  • 19
  • 30