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.
649
questions
3
votes
1
answer
1k
views
Why do I need restart a VM after restarted a bridge to get network working?
I have a VM with an interface on a bridge(e.g. br0). After restarting the bridge(bring down, bring up) VM doesn't see the network and I must do "power cycle"(shutdown and then power on) to get VM see ...
3
votes
2
answers
2k
views
Undefine all inactive domains
I have multiple inactive domains in libvirt and I want to delete them all:
# virsh list --inactive
Id Name State
----------------------------------
- instance-0000000c shut off
...
3
votes
4
answers
7k
views
libvirt and qemu/kvm -snapshot option
Using libvirt, I want to use QEMU's '-snapshot' option. That way, when the machine shuts down, all of the disk changes that were made get destroyed.
Here is the manual for the -snapshot option:
...
3
votes
2
answers
2k
views
Is there a way (non network-based) to share host (ubuntu) file system with guest (centos 7) using libvirt?
I am trying to use virsh and domain xml to launch a Centos 7 guest from ubuntu 16.04 LTS host. The "filesystem" node that i am using in domain xml is as below:
<filesystem type='mount' accessmode='...
3
votes
4
answers
11k
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....
3
votes
2
answers
5k
views
Qemu+libvirt+kvm significant performance lag in VM's
I am troubleshooting poor performance on our new VM host machine which is a Dell PowerEdge R415 with hardware RAID.
We've got about 20 VM's running like this:
qemu-system-x86_64 \
-enable-kvm \
...
3
votes
1
answer
2k
views
libvirt - Restart VMs after return from power failure?
Is there any way to make KVM automatically restart any VMs that have been shut down due to power failure? Here is my scenario: I run a small VM tank, mostly with development VMs on it. I now have a VM ...
3
votes
1
answer
5k
views
qemu-kvm guest OS can access host using bridge, but cannot access other devices on same network
I want to run a qemu-kvm guest with Debian 9 as its OS on a Debian 10 host. The host is connected to the local network, and I would like the guest to be "visible" to the local network as if ...
3
votes
3
answers
5k
views
Can't port forward with iptables KVM NAT
I have a debian 10 host and I am running a debian 10 guest using NAT. I am using libvirt/KVM/QEMU
host public ip: x.x.x.x
guest ip: 192.168.122.99
I am trying to forward port 22221 to port 22 in the ...
3
votes
1
answer
2k
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. ...
3
votes
2
answers
5k
views
Permission denied error when launching instance ("Could not open backing file")
Working with OpenStack, installed from packages available on Debian testing (buster). When I try to launch an instance, it fails after building with this message in nova-compute.log:
Could not open ...
3
votes
1
answer
6k
views
How to create a new domain from an existing base image in virsh
Is there a way of creating a domain with virsh from a base image? I have looked around and found that it is possible using virt-install, however I would prefer it if this was done purely through virsh,...
3
votes
2
answers
8k
views
Installing a Windows guest with virtio in a single step (Debian)
I am trying to create a Windows 7 (32bits) with virtio disk and network in a single step using virt-manager.
I've been trying to follow the step-by-step procedure here.
However there is no such ...
3
votes
2
answers
8k
views
Running Vagrant/libvirt: trying to establish public/private networks
I'm running Vagrant 1.7 (from their official 1.7 packages) on Ubuntu 14.04 LTS and I'm trying to provision several private VMs and one public one. My Ansible provisioning scripts change all the ...
3
votes
2
answers
1k
views
Cut'n'paste between X11 Desktop and the virt-manager VNC graphical console of a Win7 VM guest on a Server
I have a licensed copy of MicroSoft Windows 7 professional installed and running as guest on my Linux server running qemu-kvm. This works just fine.
But I was unable to figure out how to Cut'n'...
3
votes
3
answers
7k
views
How to setup IPTables on KVM host - iptables-persistent is being ignored
I'm trying to setup some specific IPTables rules on an ubuntu 14.04.1 host that runs some KVM guests.
The box has multiple NICs with multiple IP addresses and the guests use different addresses based ...
3
votes
1
answer
6k
views
How to replace QEMU binary with newer version for libvirt live snapshots
This is my first post, so please be gentle. :)
My CentOS 6.5 box has a QEMU binary that does not support live external snapshots. This is the command I attempt on the virsh CLI, and its output:
...
3
votes
1
answer
3k
views
Allowed cgroup devices for libvirt/lxc container
I want to allow my libvirt/lxc containers to use tun/tap device. In order to do so I for a running container I can add it to the allowed devices by:
# echo "c 10:200 rwm" > /sys/fs/cgroup/devices/...
3
votes
1
answer
1k
views
Any non-custom way to manage iptables with fail2ban and libvirt+kvm?
I have an Ubuntu 9.04 server running libvirt/kvm and fail2ban (for SSH attacks).
Both libvirt and fail2ban integrate with iptables in different ways. Libvirt uses (I think) some XML config and ...
3
votes
1
answer
508
views
libvirtd kvm networking on Centos5.4
I've got KVM installed on CentOS 5.4, and am attempting to set up a virtual network to allow each VM to communicate with services on the host, namely DHCP to allow PXE boot installations.
I'm having ...
3
votes
1
answer
3k
views
libvirt: set hostname using dhcp in virtual network
I've configured a host-only (aka private) network for a group of VMs on a CentOS 7 host. I've created static leases in the DHCP section for the virtual network.
The IP address is getting set ...
3
votes
1
answer
2k
views
How to disable lbvirt network DNS
Is there a way to disable DNS in libvirt network? I want to have custom configured dnsmasq for local DNS caching but libvirt's dnsmasq holds 53 port.
3
votes
1
answer
9k
views
Restarting the networking on the HOST makes GUEST lose connection
I am probably missing something but have a KVM virtualized HOST/GUEST setup.
The GUEST is using a bridge (br0) on the HOST for internet connectivity.
When I make a "/etc/init.d/networking stop ; ...
3
votes
1
answer
5k
views
How to make my linux vm attach to an openvswitch bridge?
I am following this tutorial: http://networkstatic.net/wp-content/uploads/2012/04/openvswitch.openflow.gre_.tutorial1.pdf
In brief: br0 is connected to the actual net, br1 is an isolated bridge to ...
3
votes
4
answers
827
views
Assign KVM VM to a user (KVM user authorization)
I would like to give my friend a VM on my dedicated server, and I want him to be able to restart the VM or change the iso - so basically I would like the same features as a VM hosting provider, e.g. ...
3
votes
1
answer
2k
views
Virt-manager: unable to open a connection to the libvirt management daemon
I'm having a bit of trouble connecting to my virtual machine host, which is an Ubuntu server running KVM/Libvirt. I can connect to the server using an Ubuntu client and I can connect via virsh on a ...
3
votes
3
answers
1k
views
libvirt + ESX (HTTP response code 400 for call to 'Login')
I'm trying to connect to a vSphere cluster using the information from the libvirt documentation.
$ virsh -c "vpx://[email protected]/dc1/dc1-cluster-e01/dc1-vsphere-e04/?no_verify=1"
Enter root's ...
3
votes
1
answer
270
views
centos libvert vm network can't get IP address
I have a host machine running centos 6.2 and it has 2 VM's using libvirt. I had it all working, but then I had a power outage and now the host has connectivity, but the VM's cant get an IP when they ...
3
votes
1
answer
4k
views
Best options for KVM/qemu/libvirt VM migrations without shared storage
My team has recently been tasked with improving the virtualization infrastructure at the company and one thing we're looking into doing is speeding up migrations. We use local storage only on all VM ...
3
votes
1
answer
2k
views
XFS/EXT4: Why is actual file size on disk larger than apparent size? Clarification
On a CentOS 7.1.1503 (3.10.0-229.el7.x86_64) system running KVM/qemu on an XFS filesystem, I'm attempting to work out what specifically is adding additional space to a VM diskimage file.
$ ls -ls --...
3
votes
1
answer
504
views
LibVirt (QEMU) Shutting down from inside guest
I am currently running LibVirt with Qemu on Debian Wheezy:
Versions:
libvirtd (libvirt) 1.2.4
qemu-x86_64 version 2.0.0 (Debian 2.0.0+dfsg-4~bpo70+1), Copyright (c) 2003-2008 Fabrice Bellard
It's ...
3
votes
1
answer
5k
views
Guest system managed by libvirt doesn't start after successful installation
Host system — Ubuntu 12.04.
Virtualization — KVM.
Disks — LVM.
Guest system installation was successful.
But after restart:
Booting from Hard Disk...
Boot failed: could not read the boot disk
...
3
votes
1
answer
1k
views
capping VM IO with cgroups
I'm using cgroups to cap disk IO that a VM does by using libvirt's support for cgroups.
So, I'm getting the major/minor number of the device from a 'ls -lL' on the drive where the '.img' file for the ...
3
votes
4
answers
5k
views
KVM-Guest does not boot: qemudParsePCIDeviceStrs
I have a Server running Ubuntu 10.10 Server-Edition kvm, and libvirt (both ubuntu-native packages)
HDD-Partitioning was done with LVM. Then I created some VMs with Virt-Manager and assigned LVM-...
3
votes
1
answer
4k
views
libvirt, qemu, reboot hook
Is it possible to detect that the guest VM has rebooted and perform an action using libvirt / qemu? The hooks here only support the "start" and "stop" events. I would like to detect if my VM has ...
3
votes
2
answers
1k
views
How do I run a stable Windows XP kvm guest on Ubuntu 10.04?
I have three Windows XP guests running on a recently upgraded 64-bit Ubuntu 10.04 system. Occasionally (on the order of once every few days), one of the guests will become non-responsive and the kvm ...
3
votes
0
answers
661
views
Apparmor and libvirt - warnings and errors
I have a fresh Debian 12 installed and updated. Along with Cockpit and Cockpit virtual machines.
I am getting the following errors and warning when looking at the log section in Cockpit:
Failed to ...
3
votes
0
answers
3k
views
how to allow outgoing traffic with firewalld / libvirt on CentOS 8?
I installed a CentOS 8 guest on a CentOS 8 host using libvirt. However firewalld is blocking all outgoing traffic from the guest to the internet unless I use target=ACCEPT for the libvirt zone.
The ...
3
votes
0
answers
3k
views
Windows 10 KVM guests cause Ubuntu 20.04 host to crash (revised)
I got extremely confused and decided to re-write the question from scratch, so if some of the comments do not make sense, that is why. Apoplogies to anyone whose time I wasted.
I am having a problem ...
3
votes
1
answer
610
views
Libvirt pool cannot see or create rbd clones
While trying to get a cloned disk running from my OS snapshot I run into the problem that Libvirt cannot see existing images cloned from a snapshot. Created via:
$ rbd -p vmdisks clone vmdisks/...
3
votes
0
answers
4k
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 ...
3
votes
0
answers
679
views
How to provision DRBD to libvirt storage pool?
I want to expose DRBD replicated storage (2 nodes Active/Passive) to libvirt as a storage pool for qcow2 files. However, I have the following error message:
virsh pool-create-as qcow2 --type=logical -...
3
votes
0
answers
99
views
Libvirt LXC leaked processes
I'm trying to run several lxc containers on an ubuntu 16.04 server. (libvirt version is 1.3.1). The nature of my team's use of these containers means that they are constantly booting and then being ...
3
votes
0
answers
1k
views
OpenVSwitch with Libvirt
Here's my situation: I'm running CentOS 7 with Openvswitch and Libvirt/Qemu. My domains are configured to use the virtualport type openvswitch, so when I start a VM it creates a port in the ovs bridge....
3
votes
0
answers
3k
views
qcow2 Disk size much bigger than virtual size
What would cause this? ls shows the qcow2 to be 241G, in the VM it only has ~ 160 GB drive, no unpartitioned space. Win 7 VM, Host = EXT4 2.6 Kernel virsh 0.9.10
file format: qcow2
virtual size: ...
3
votes
0
answers
2k
views
How to config libvirt network setting about disabling dnsmasq "except-interface=lo"?
Here is the thing.
My VMs run with libvirt and use default network libvirt-provide, and I've mad each VM registers its hostname to dnsmasq set by libvirt. so I want to look up its hostname for ...
3
votes
0
answers
1k
views
Debian Squeeze Preseed Installation “The current kernel doesn't support the Logical Volume Manager. You may need to load the lvm-mod module.”
I'm attempting to install Debian Squeeze via an instalinux.com image pre-seeded with more or less default settings. (Only notable addition is the openssh server, which is a clickable option in the ...
3
votes
1
answer
354
views
2xAMD Opteron 6128 with libvirt, Physical CPU 13 doesn't exist
I need help with libvirt(?) problem.
Server specs:
ProLiant DL165 G7
2x AMD Opteron(tm) Processor 6128
System:
Debian GNU/Linux testing (wheezy)
3.2.0-3-amd64
libvirt 0.9.12-5
kvm 1:1.1.2+dfsg-2
$ ...
3
votes
1
answer
5k
views
how to install a CentOS 6.0 KVM guest on a CentOS 6.0 host server with virt-install and PXE
The host server (running CentOS 6.0) only has one public IP address and will be hosting many KVM guests so it needs to use a virtual network switch configuration in NAT mode.
I have previously used ...
3
votes
5
answers
10k
views
KVM virt-clone while the VM is running
Is it possible to clone a running kvm machine without tools like virt-clone?
They already have the original vm in production, I cannot shut it down. If I don't care about temporary data corruption (...