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.
654
questions
48
votes
3
answers
148k
views
KVM/libvirt: How to configure static guest IP addresses on the virtualisation host
What I'd like to do is to set the guests' network configuration (IP address, subnet, gateway, broadcast address) from the host system. The used network setup is in bridge mode. How can I configure the ...
47
votes
7
answers
107k
views
Forwarding ports to guests in libvirt / KVM
How can I forward ports on a server running libvirt/KVM to specified ports on VM's, when using NAT?
For example, the host has a public IP of 1.2.3.4. I want to forward port 80 to 10.0.0.1 and port 22 ...
30
votes
5
answers
32k
views
how to rename a VM using libvirt+KVM
How can I rename a VM on KVM+libvirt?
I would like it to change the name in the 'inventory' as well as change the name of the storage etc.
29
votes
2
answers
25k
views
How do I make a persistent domain with virsh?
virsh create somefile.xml creates my machine just fine but when I shut the machine down the whole thing disappears. Machines I made with the virt-manager GUI are persistent (stick around after ...
27
votes
1
answer
44k
views
KVM and Libvirt - How do I hotplug a new virtio disk?
I am trying to hot-add a file-based disk to a running KVM virtual server. I've created a new disk from scratch using the command
dd of=/home/cloud/vps_59/test.img bs=1 seek=5G count=0
and I was ...
27
votes
1
answer
70k
views
how to delete a guest after creating it with virt-install
I created a KVM guest from the command line with virt-install where I used the command line options --disk pool=vg0,size=20 and --name virt1.example.com.
How can I delete this KVM guest from the ...
25
votes
4
answers
64k
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 /...
22
votes
6
answers
26k
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 ...
17
votes
3
answers
34k
views
libvirt: how can I make a domain start when the host starts?
I would like some of my domains to start automatically when my host starts (I'm using libvirt+KVM on ubuntu). I guess I could put some "virsh start..." statements in rc.local, but is there a way to ...
17
votes
2
answers
17k
views
Read/write access for passthrough (9p) filesystems with libvirt/qemu?
I have recently started experimenting with the support for passthrough filesystems in recent versions of KVM/QEMU/libvirt. Making the filesystems available for read access has "just worked", but I'm ...
15
votes
15
answers
46k
views
Web based KVM management for Ubuntu
We've got a single Ubuntu 9.10 root server on which we want to run multiple KVM virtual machines. To administer these virtual machines I'd like a web based KVM management tool, but I don't know which ...
14
votes
5
answers
95k
views
virsh: VM console does not show any output
I have a VM which I can start with virsh. According to virsh dumpxml VM1, this is the allocated pty:
<serial type='pty'>
<source path='/dev/pts/6'/>
<target port='0'/>
<...
14
votes
8
answers
33k
views
Get list of DHCP clients with KVM+libvirt?
I have several VMs running on Ubuntu 9.10 via KVM+libvirt. I want to be able to find out the IP address that has been assigned to each host without physically opening a physical "console" to each ...
14
votes
4
answers
17k
views
Port Forwarding from Host to Guest with libvirt 0.8.3 Using KVM on Ubuntu
The host has a single external IP available, so I set my KVM guests up with NAT.
How do I set up a port forwarding to forward some of the requests from the outside to the guests?
I couldn't find ...
13
votes
7
answers
81k
views
libvirt network error - no 'default' network device found
My original purpose is to create centos image for openstack. Although I did directly with kvm, still wondering about error.
Was using this manual for my task.
After this command:
# virt-install --...
13
votes
1
answer
31k
views
Import XML into libvirt without booting virtual machine
Is it possible to import an XML file into libvirt without having libvirt boot the virtual machine?
If I do:
virsh create centos63.xml
Then libvirt will import the XML file and immediately try to ...
13
votes
3
answers
10k
views
Linux containers (LXC) on Red Hat/CentOS EL6 - lxc-create versus libvirt?
It's tricky trying to stay within the good graces of Red Hat and still plan for system longevity...
I've been a proponent of Linux Containers (LXC) for over a year. My initial installations were ...
12
votes
2
answers
45k
views
Any way to release focus on a KVM guest in virt-manager without having to click Ctrl_L + Alt_L?
Is there a way to move my mouse in and out of a KVM guest in virt-manager without having to click to gain focus of the window and release focus by pressing Ctrl_L+ Alt_L?
BACKGROUND
I typically ...
12
votes
3
answers
16k
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 ...
11
votes
5
answers
26k
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 ...
11
votes
5
answers
12k
views
libvirt: Change dhcp-setup without restarting
I'm using libvirt and kvm to virtualize my server. I configured libvirt to start a dhcp-server on the bridge-network-interface to give the vm's their ips. Every VM's gets always the same ip based on ...
11
votes
3
answers
20k
views
Networking between KVM VM and docker container on same host
On a Debian-Stretch host (connected to physical LAN) I have a new docker installation (v18.09) with one database container (port mapped to the host) and I run KVM/libvirt with some Debian-Stretch VMs. ...
11
votes
5
answers
60k
views
How can I change Qemu KVM machine architecture from 440fx to q35 with virsh edit or virt-manager
Still trying to get GPU passthrough working and decided to change machine type from older 440fx to q35 ie pc-q35 but if I do virsh edit on the config it refuse to save saying "PCI Bridges not ...
11
votes
2
answers
43k
views
Changing boot device for a QEMU-KVM virtual machine
I am trying to change the boot device for a VM. I go to the VM's XML file in /etc/libvirt/qemu and set <boot dev='cdrom' />. Still, it attempts to boot from the harddrive instead of the cdrom.
...
10
votes
4
answers
30k
views
virt-install cannot use ISO file as location
I am using the following script to install a new Fedora Server virtual machine
virt-install \
--name theta-1 \
--ram 8000 \
--disk path=/dev/vg/t1.img \
--vcpus 8 \
--os-type linux \
--os-variant ...
10
votes
1
answer
31k
views
Mapping USB drive direct to libvirt KVM virtual machine?
I am searching for information on mapping an existing drive (USB drive) to a KVM virtual machine using libvirt. I have been going over http://libvirt.org/formatstorage.html#StoragePoolTarget. But I ...
9
votes
4
answers
13k
views
How do I prevent libvirt from adding iptables rules for guest NAT networks?
Similar to this old request on BugZilla for Fedora 8, I'm hoping something has changed since then or someone knows another way.
I want to manage the iptables rules by hand—the one-size-fits-all ...
9
votes
3
answers
20k
views
attaching usb dongle to KVM VM
I'm struggling to connect a usb device, that gets detected correctly by the host, to a kvm vm.
I have a freshly installed Ubuntu Server 14.10 as KVM/QEMU host. I set up an Ubuntu vm using this ...
9
votes
1
answer
3k
views
KVM/Qemu, Ubuntu: Why do more guests CPUs enhance Disk-I/O rapidly?
We have an Heartbeat/DRBD/Pacemaker/KVM/Qemu/libvirt cluster consisting of two nodes.
Each node runs Ubuntu 12.04 64 Bit with the following packages/versions:
Kernel 3.2.0-32-generic #51-Ubuntu SMP
...
9
votes
2
answers
24k
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 ...
8
votes
1
answer
10k
views
How to set keyboard layout with a VNC client to KVM (libvirt)
I have both kvm guests and hosts installed on a Debian 9.9 with kde on an AMD Machine
qemu-kvm 1:2.8+dfsg-6+deb9u7 amd64
When connecting with a virt-viewer, my keyboard ...
8
votes
6
answers
22k
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 ...
8
votes
2
answers
373
views
Can i pause VM's while power-cycling iscsi storage array
Unfortunately I may have to power-cycle my storage array.
In the context of using KVM with libvirt managing the Virtual Machines where i need to power-cycle the storage array, is it possible or even ...
8
votes
4
answers
23k
views
Libvirt has no KVM capabilities even though qemu-kvm works
I've learned that CirrusCI offers nested virtualization in their free package
for public repos and I am trying to make use of it for testing my Ansible
playbooks.
Unfortunately, libvirt is insisting ...
8
votes
4
answers
3k
views
Using virt-install and http preseed to do unattended ubuntu 10.04 install
The virt-install command line I used is below
sudo virt-install kvm ubuntu -v sudo virt-install -v -n golden-egg -r
256 --disk path=/var/lib/libvirt/images/golden-egg.qcow2,size=5
--os-type ...
8
votes
3
answers
573
views
Technology for short-lived private VMs
I'm trying to build a system that will run short-lived (CI and test builds) of software components, it's mandatory according to my requirements that each live on a private host. I'm taking that ...
7
votes
4
answers
12k
views
custom dnsmasq (or custom options) with libvrt?
Currently only two options related to network boot are available in libvirt via bootp options:
server and file
So for config like this:
<bootp file='test.ipx' server='10.10.10.2'/>
this code ...
7
votes
1
answer
11k
views
host port forward with qemu through libvirt in user-mode networking
I'm having trouble editing my libvirt's host-xml to make qemu forward TCP connections to the guest. This questions linked to a blog post which recommended adding -redir to the Qemu command line. But ...
7
votes
2
answers
5k
views
qemu-kvm/virsh: No network connectivity whilst using bridged networking
I'm having an issue with performing virtualisation via libvirt/qemu-kvm, in which my set up for bridged networking doesn't appear to be working correctly. I've followed every tutorial I can find and ...
7
votes
2
answers
16k
views
Monitor VM's resources (CPU, RAM etc)
I'm testing Openstack and i'd like to know how can i find out about resource utilization inside instances (Virtual Machines).
Openstack uses kvm, qemu and libvirt in my testing environment. Is there ...
6
votes
3
answers
18k
views
Routing networking on kvm
There are a lot of configuration used for Kvm-networking. But i'm not able to get to the guest from the host or outside. I'm working on Ubuntu 11.04. On the guest i've a WindowsXp with dhcp.
I want ...
6
votes
2
answers
17k
views
optimal settings for win7 64 guest on kvm 64 host managed with libvirt
I am using libvirt to control kvm on a fairly new (core i3) host running Debian Squeeze amd64.
The Host as well as Linux guests work and feel fast and responsive.
Simply installing Win7 with virt-...
6
votes
2
answers
3k
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 ...
6
votes
1
answer
299
views
Prevent hijacking IPs in KVM/libvirt
How can I prevent a VM user/client from accessing IP addresses he doesn't own but are routed over the same bridge on KVM/Libvirt?
IP addresses are routed to a cisco switch vLan consisting of a /24 ...
6
votes
1
answer
9k
views
Bandwidth monitoring on KVM
Is it possible to monitor/limit bandwidth for KVM guests? I'd like to give people VMs on my server but I want to be careful not to go over my monthly bandwidth limit. The only places I can find that ...
6
votes
2
answers
13k
views
kvm low io performance
performance of my setup is quite good (geekbench, how it 'feels', ...) even disc throughput (libvirt on raw lvm-partition) is very close to the raw performance on the server) but IOP/s are as low as ...
6
votes
2
answers
14k
views
Change VNC listen address in Libvirt without restarting VM
Is there a way to to edit the listen address of a Libvirt-Machine on the fly? At the moment it seems like when I want to edit the listen address, I have to shut down the corresponding VM first, then ...
6
votes
1
answer
6k
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 ...
6
votes
1
answer
8k
views
Clone KVM virtual machine with snapshots
I've created a virtual machine using virt-manager and saved a snapshot of it's current state.
Now I'd like to create an exact duplicate machine with all snapshots from the first machine.
How could I ...
6
votes
2
answers
16k
views
Access libvirt+KVM virtual machines with DNS
I have an Ubuntu Trusty machine running KVM + Libvirt to manage small virtual machines, and using the standard NetworkManager to connect to regular networks.
I want to be able to access the virtual ...