Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [libvirt]

libvirt is an API and toolkit for developing applications which manage virtual machine hypervisors, the virtual machines running under them, and virtual machine storage.

7
votes
2answers
6k views

WARNING KVM acceleration not available, using 'qemu'

Running debian (Linux Rick 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt11-1+deb8u6 (2015-11-09) x86_64 GNU/Linux) Looking at my cpuinfo I can see I have vmx support: flags: fpu vme de pse tsc msr pae mce ...
4
votes
2answers
5k views

How to repair a broken-resized qcow2 disk image for libvirt/kvm?

Today I wanted to increase the size of a VM, so I did what I always do (have done it before): qemu-img resize diskimage.qcow2 +22GB Then the file broke and the VM does not start any more. I tried ...
-1
votes
0answers
11 views

Libvirt - adding pool on external drive - no search permission [migrated]

I am running ubuntu 18.04. First off, how can libvirt access /var/lib/libvirt/images when root is the owner and group? Is there another of security letting libvirt access root files in only some ...
0
votes
1answer
23 views

Is it possible to make OpenSSL work with gnutls?

I have libvirt, one client and one server. Libvirt uses gnutls implementation of tls. I want to use mitmproxy and put in the middle between client and remote server. But mitmproxy uses different ...
0
votes
0answers
23 views

Mount a disk image as mmc flash in libvirt

I'm trying to run the OS of my x64 NAS in a VM with kvm and libvirt. I made an image of the internal flash with dd. The image has a few partitions, starting with an EFI partition. virt-install -n ...
0
votes
0answers
26 views

redirect all web trafic from network through proxy server to a specific URL

I have a network env, which has outgoing traffic using proxy only. I want to create some sort of "unproxying GW" for my specific internal network. I am okey to use any Linux based solution for this, ...
3
votes
4answers
5k views

iptables / KVM forward port

I have a server with one external IP address (e.g. 1.2.3.4). On that server I use libvirt to run virtual machines. Now I want to access a virtual server on my host via ssh (port 1234) from the outside....
2
votes
0answers
39 views

XP KVM stuck at “Booting from Hard Disk”

Just to see if it could be done (and if so, move other physical XP machines to VM environments), I took the hard drive out of a decommissioned laptop, captured a WIM of it, and applied it to a QCOW2 ...
0
votes
1answer
60 views

Missing KVM snapshots in virt-manager

I need to resize an image and receive an error when using qemu-img the resize is not supported because snapshots exist. Sure enough, even though virt-manager does not show any snapshots, I see the ...
1
vote
0answers
37 views

KVM guest gets into paused state shortly after being started

I have two very similar x86_64 machines running the same kernel (4.7.8), and the same version of libvirt. The only difference between the two machines is the amount of memory they have, machine A has ...
0
votes
1answer
29 views

Include cloudinit config to new VM

On my KVM hypervisor I would like to add a new VM with CentOS-7-x86_64-GenericCloud.qcow2 disk but with my custom cloudinit config to make sure that the new VM will start up with all users, correct ...
-2
votes
1answer
50 views

Live migration without stopping source VM after migration

Is there any possible way to perform live migration using KVM/QEMU/libvirt without stopping source VM after migration? I want to make full consistent backup of VM under KVM hypervisor without stopping ...
3
votes
3answers
10k views

Pass an USB hub from a KVM host to a guest with libvirt

I have the following USB devices on a Linux server: # lsusb -t /: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ehci_hcd/2p, 480M |__ Port 1: Dev 2, If 0, Class=hub, Driver=hub/6p, 480M |...
0
votes
1answer
52 views

KVM: guest with FQDN DNS resolution / no bridge

I have a (Hetzner) server with a public IP of eg. 123.123.123.123, and an additional IP of eg. 456.456.456.456. I want to serve some private webspace apps on 123.123.123.123, including a hidden ...
0
votes
1answer
29 views

Disable or change port of dnsmasq service in libvirt

I'm using libvirt to manage my VMs, but I don't need the dnsmasq DNS server that gets automatically started with the service as it conflicts with my acme-dns setup. Is there a way to change disable ...
0
votes
0answers
24 views

No write permissions in shared folders KVM

I shared a folder from my host to guest using this guide https://www.linux-kvm.org/page/9p_virtio In example they are using old GUI version and now you cant set Type Passthrough and Squash. You need ...
0
votes
0answers
41 views

Configure public ipv6 address to kvm guest in macvtap network mode

Host(ubuntu16.04) has /64 ipv6 assigned to it and one ipv4 address. Trying to create a ubuntu virtual machine in macvtap network mode and assign a public ipv6. So I Created 'macvtap' network using ...
0
votes
2answers
52 views

Libvirt networking: Set default gateway for guest VMs via DHCP

Is it possible to set a default gateway for the guest VMs via DHCP in libvirt? I have the following config <ip address='192.168.123.1' netmask='255.255.255.0'> <dhcp> <range ...
1
vote
0answers
103 views

libvirt connection as non-root user

I'm trying to configure a libvirt compute resource in Foreman and have both KVM and Foreman installed on the same Centos 7 host. Adding the compute resource with qemu+ssh://root@hypervisor.example....
1
vote
1answer
124 views

How I increase GPU video RAM in virt-manager?

I have this text in my XML <video> <model type='qxl' ram='65536' vram='65536' vgamem='16384' heads='1' primary='yes'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x02' ...
0
votes
1answer
74 views

KVM public ip setup with subnet /29

I have a dedicated server from hetzner with one additional /29 subnet i have configured a bridge network which looks fine to me 2: eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq ...
2
votes
2answers
330 views

Mount URL as cdrom/iso KVM/QEMU

I am looking for a way to mount an ISO as a cd rom, according to libvirt docs (referenced below) it should be possible, additionally in the question referenced below. I am aware of this question, ...
0
votes
0answers
24 views

cannot shutdown virtual domain until connected to it

I have a rather weird problem. I'm going to try and present facts but the truth is that my problem seems so awkward that I don't really know what is happening. I run a Debian 8.11 host with libvirt-1....
3
votes
3answers
2k views

Cpu pinning strategy for kvm / centos7

I am migrating from Xen to Kvm. In Xen I was able to easily pin host cpus to guest vms, and also to pin host cpus to the "dom0" . In Kvm I can also easily pin host cpus to guests vms, but, as far as ...
0
votes
0answers
36 views

How to list iptables/ebtables rules corresponding to a libvirt network filter?

libvirt network filter webpages says, The network filtering subsystem is currently only available on Linux hosts and only works for QEMU and KVM type of virtual machines. On Linux it builds ...
1
vote
1answer
195 views

kvm/libvirt backup: how to ensure a consistent fs during online blockcommit?

I want to create online backups of a KVM Windows 10 virtual machine that is managed by libvirt. I have the qemu agent setup in the guest. If found this wiki entry that suggests the following: 1. ...
0
votes
0answers
132 views

Delayed start for Guests KVM/libvirt

Looking for any pointers anyone may have to introduce a delayed start for KVM guests i.e. 30 seconds between starting each virtual server rather than starting them all at once which thrashes the disks ...
4
votes
4answers
3k views

How to add virtual storage as SSD in KVM

Being previously a VirtualBox user, I moved to KVM(QEMU/libvirt or whatever it's called) recently. I know that in VirtualBox, when you add a new storage device to the VM, there is a checkbox labeled ...
0
votes
0answers
25 views

Connect a physical interface to a linux bridge through libvirt

I am trying to create two VMs with libvirt which are connected to a linux bridge (my_bridge). I also want that linux bridge to be connected to the physical interface eth0 of the host. Can I do that? ...
1
vote
1answer
328 views

Do not start guest after virt-install

I like to set up a new guest but do not want to start it immediately. I use virt-install with these options: virt-install \ --connect qemu:///system \ --import \ --virt-type kvm \ --...
4
votes
1answer
353 views

KVM/libvirt: how to migrate between 2 hosts with different CPUs

I tried to migrate my KVM host from a host with AMD cpu to a host with Intel CPU but when I run virsh start guest_name I got error: unsupported configuration: CPU model ... is not supported by ...
1
vote
1answer
91 views

libvirt / KVM: forwarding ssl to VM breaks internet on VM

My qemu hook script looks like this: #!/bin/bash # IMPORTANT: Change the "VM NAME" string to match your actual VM Name. # In order to create rules to other VMs, just duplicate the below block and ...
1
vote
0answers
160 views

Setup routing in nested virtualization cluster on vagrant / hyper-v / libvirt

I'm trying to setup a specific VMs cluster using vagrant on my local notebook. I have a Win10 Pro with HyperV as a host. Unfortunately I cannot change it thus I want to create a Linux VM on HyperV (I ...
17
votes
5answers
12k views

How to keep time on resumed KVM guest with libvirt?

On my host I am using libvirt and a KVM guest. When the host is shutting down, libvirt suspends the guest. When the host is starting up, libvirt resumes the guest. The problem is, if the guest is ...
0
votes
0answers
49 views

How to clone a KVM guest which is RBD back-end?

I was using KVM with libvirt(virsh) & file back-end,I can easily clone a guest with ''virt-clone -o vm01 -n vm02 -f /tmp/vm02.img''. Now I move to ceph's rbd back-end,here comes the question,...
3
votes
4answers
8k views

How to detect hypervisor host name/IP from inside a KVM virtual machine?

We have a small fleet of KVM/libvirt hosts with a few hundred virtual machines on it, managed by a group of sysadmins in disparate locations. I've run into a problem where I am connected to a virtual ...
3
votes
1answer
8k views

Windows guest on KVM/Qemu suffers horrible key lag

Host OS is Arch Linux with the following versions:- qemu 2.1.0-2 libvirt 1.2.7-1 linux 3.15.8-1 Guest OS is Windows 7 64-bit. This problem did not exist when I first created this VM and started ...
3
votes
4answers
14k views

libvirtError that domain already exists, but virsh list doesn't show it

When I try to launch an instance with OpenStack, I get the following error in nova-compute.log: (nova.rpc): TRACE: libvirtError: operation failed: domain 'instance-0000000a' already exists with uuid ...
8
votes
3answers
9k views

How to change the default Storage Pool from libvirt?

I'm trying to use a different Storage Pool on KVM in order to store the virtual disks of my VMs and also the ISOs from the operating systems which I'm using. For example: I want to use the directory /...
0
votes
0answers
86 views

virsh: Cannot restore snapshot in VirtualBox

I establish the connection to Virtual Box locally using the command: virsh -c vbox:///session The connection is established successfully and allows me to execute some commands without problems. But ...
1
vote
0answers
163 views

KVM: What is stored in var/lib/libvirt/qemu

My Question is "What is stored in the /var/lib/libvirt/qemu folder?" Is this used as somekind of backup folder ? Backgroundinformation: I have a Debian Server with a running KVM installation(+libvirt)...
0
votes
0answers
94 views

Network data/bandwidth accounting on a VM's network from the host/hypervisor side (libvirt/KVM, bridged networking)

On a server a few KVM/libvirt virtual machines are running. Sometimes these use lots of GB in network bandwidth. I would like to do statistics on network transfers (bandwidth usage, ideally by IP ...
0
votes
0answers
39 views

qemu error while restoring snapshot

I made a snapshot of a Windows 10 VM and now if I try to restore it with virt-manager or with this command virsh snapshot-revert win10 "bef kg" I get this error: error: internal error: qemu ...
0
votes
1answer
119 views

Handling VMCALL with libvirt (qemu-kvm)

I am using libvirt with qemu-kvm to manage virtual machines. The guest makes a vmcall which I want to be notified of, e.g. via a callback function. I know it's possible with 'pure' KVM, but does the ...
0
votes
0answers
121 views

Host loses internet connection after libvirt VM starts

Recently libvirt networking has caused me headaches - host loses connection once libvirt sets up a route in the kernel routing table. What I found was a strange default entry (interface vnet0, which ...
4
votes
2answers
2k views

upstart pre-stop script

I have libvirt/KVM set up on my Ubuntu and before shutting down the machine I would like it to attempt shutting down the VM's using an ACPI poweroff (virsh shutdown), then I want it to stop shutdown ...
6
votes
2answers
1k views

How to Restart Centos 7 KVM Host safely without corrupting guest VMs/data?

I want to have a KVM virtualized server with few VMs (with different Guest OSs) in production. Now when I want to install kernel/package updates for the host machine, how to restart the hypervisor ...
0
votes
1answer
164 views

Does enabling SELinux “enforcing” in KVM host causing problems in the guests?

I've KVM hypervisor with (Software Raid1) and I've few created VMs .. Does Enable "SELinux" IN the host affects badly on Raid1 and The guests (VMs) ? or there is no relation? Is it a recommended ...
0
votes
0answers
95 views

Libvirt nwfilter with multiple IPs

I'm trying to apply a nwfilter rule for two networks on the same guest interface, like so: ~ # virsh nwfilter-dumpxml 1081532-private-both <filter name='1081532-private-both' chain='root'> &...
0
votes
1answer
57 views

Domain.xml not Updating For Console Directive

Good afternoon, I'm following the instructions here in order to get console access from libvirt The problem I'm having is the domain.xml does not accept the new changes. I have also done the ...