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.
52
questions
46
votes
6
answers
103k
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 ...
6
votes
1
answer
10k
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 ...
47
votes
3
answers
140k
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 ...
17
votes
2
answers
16k
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 ...
14
votes
4
answers
16k
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 ...
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 ...
5
votes
4
answers
2k
views
How to create a environment where each user's vm is isolated
I want to know if it is possible to create a multi user environment using KVM libvirt
that is each user can create there own vm but that must not be accessible by others
saw this Multiuser use of virt-...
2
votes
1
answer
2k
views
Persistent Network Configuration using KVM and libvirt
Our environment will have a KVM host setup dynamically using kickstart (easy enough).
The hard part is dealing with network configuration and keeping VLAN configuration (and possibly bridge/host ...
1
vote
2
answers
20k
views
How do I configure bridged networking for VMs
I'm setting up a KVM virtualization server in CentOS 6. How do I configure bridged networking? (I think I need network interface eth0 to be accessible to VMs)
I have tried to follow this guide:
How ...
27
votes
1
answer
43k
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
68k
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 ...
22
votes
6
answers
25k
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 ...
14
votes
8
answers
32k
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 ...
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 ...
10
votes
4
answers
28k
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 ...
9
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
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
...
8
votes
6
answers
20k
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 ...
7
votes
1
answer
9k
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 ...
5
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 ...
5
votes
3
answers
16k
views
KVM booting off-image kernel and existing partition
I am in the process of switching from Xen to qemu-kvm. My current Xen installation has a number of LVM volumes each with a partition (rather than a full disk image). In Xen, I start each VM with a ...
5
votes
4
answers
9k
views
Wake-on-lan to trigger virtual-machine with kvm and libvirt
I'm doing virtualization with KVM and managing it via the Libvirt daemon.
How do I configure Libvirt or KVM to listen for Wake-On-Lan packets sent the the Virtual Machine's NIC's MAC address and to ...
5
votes
2
answers
2k
views
Network freezes with KVM/libvirt and ip_forward = 1
I'm using KVM and libvirt and experience small network freezes on the host and the guests every 2-3 minutes or so. The freezes last 1-2 seconds. The used OS is Ubuntu 10 LTS server edition.
I'm ...
4
votes
3
answers
28k
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
|...
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
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
3
answers
2k
views
KVM "live migration finished" detection
I'm using KVM (through libvirt actually) for a research project. We're live-migrating a virtual machine between different subnets, so after the migration the IP address and routing tables have to be ...
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
0
answers
2k
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
2
answers
10k
views
KVM/Libvirt bridged/routed networking not working on newer guest kernels
I have a dedicated server running Debian 6, with Libvirt (0.9.11.3) and Qemu-KVM (qemu-kvm-1.0+dfsg-11, Debian).
I am having a problem getting bridged/routed networking to work in KVM guests with ...
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
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....
2
votes
1
answer
2k
views
KVM Networking - assign IP to each VM by outside DHCP
I am new to KVM and am having a problem with setting up the networking. I want each VM to get its IPs assigned by the network's DHCP, not the internal DHCP that the KVM keeps trying to set up. In ...
2
votes
2
answers
1k
views
Terraform Libvirt - How to use local qcow2 file in the hypervisor instead of cloud images?
It seems like the libvirt provider only takes pre-defined cloud images. I create my own base qcow2 image that is local to the hypervisor and wish to use it as source file with terraform libvirtd.
Is ...
2
votes
3
answers
5k
views
Create iPXE UEFI bootable image for QEMU/Libvirt with custom next-server and filename
I can create a VM with libvirt/qemu to boot in UEFI mode. I know that it does iPXE by default, but I want to create/modify a iPXE image in order to override filename and next-server properties.
How ...
2
votes
0
answers
1k
views
KVM .img can not boot after resized by virt-resize
I have a CentOS 6.4 image install by KVM on Ubuntu 12.04 amd64 host. Here is the disk layout of centos.img
# virt-filesystems --long -h --all -a centos.img
Name Type VFS ...
2
votes
1
answer
12k
views
KVM guest cannot connect to host, but works vice versa
I have debian 7 on my host machine and I run a KVM vm on it.
My hosts network configuration is this (the relevant parts):
br0 Link encap:Ethernet HWaddr 68:b5:99:ae:8f:11
inet ...
2
votes
2
answers
12k
views
Adding Virtio block devices at runtime in Libvirt KVM
I'm running Debian Wheezy Beta 4 with KVM based guest systems which run the same operating system. I'm using LibVirt to manage the virtualisation.
What I would like to do is to attach an LVM based ...
2
votes
1
answer
12k
views
virt-install ignoring vnc port/listen?
I'm trying to create kvm machine on remote host.
The host is running debian testing.
Did use this command:
virt-install --name debian-test \
--os-type=linux \
--os-variant=debianwheezy \
...
1
vote
1
answer
1k
views
port forwarding with libvirt
I'm trying to get port forwarding working through libvirt on top of QEMU and KVM. I found this article (https://snippets.webaware.com.au/howto/running-qemu-with-port-redirection-through-libvirt/), but ...
1
vote
1
answer
4k
views
Use Thin LVM Volume for KVM VM
I now we cannot use thin LVM volumes with libvirt. Is there any other alternative allowing use of LVM thin provisioning in KVM/QEMU virtual machines?
1
vote
1
answer
381
views
Assign ethernet alias to KVM guest
I have a pool of IP addresses and a single ethernet cable. I have set aliases:
auto enp2s0:0
iface enp2s0:0 inet static
address x.x.x.x
netmask x.x.x.x
I want to dedicate some of the aliases to ...
1
vote
2
answers
3k
views
How do I connect to my libvirt/qemu/guests ? (with no ip address)
I have inherited the administration of a trusty ubuntu server with several virtual servers, also ubuntu using libvirt and qemu. I have the problem I cannot connect to these virtual servers/guests.
...
1
vote
0
answers
2k
views
Disadvantages of creating a volume with lvm instead of with libvirt? Storage pool present
When creating the virtual machine on server A, virt-install created a libvirt-volume "VM" in the libvirt storage-pool "POOL".
virsh-install --disk pool=POOL,size=$HDDSIZE,$DISKOPT -n VM
As expected,...
1
vote
3
answers
9k
views
Unable to connect Xend with virt-manager
I have installed debian 6.0.1a. I have install all XEN stuff. including xen kernel, libvirtd, ... but when i want to connect xend, virt-manager shows me this:
Verify that:
A Xen host kernel was ...
1
vote
2
answers
5k
views
libvirt and network filtering with nat - iptables overrides
At first, I want to say: I know, it was done initially wrong and I want to avoid doing everything again from the scratch because of general downtime.
I am running libvirt/KVM on RHEL. I've got VM ...
0
votes
2
answers
1k
views
Forward Port on Guest Operating system With Libvirt
I am currently running a Xen Hypervisor underneath Ubuntu 14.04. On the host machine I am running a guest VM.
From what I understand, In order to be able to receive incoming connections on the ...
0
votes
2
answers
3k
views
How can I make Windows Server 2012 running on KVM boot with virtio rather than IDE?
I have Windows Server 2012 Essentials running on KVM in Ubuntu 14.04. I've had some problems detailed here Windows Server 2012 on KVM on Ubuntu 14.04. Runs well for a while and then slows down
I ...
0
votes
1
answer
2k
views
How to mount a URL as a CD-ROM on QEMU?
I'm wondering if it's possible to specify a URL for the cdrom option on QEMU, and if so how would I go about doing that?
Normally I'd mount an iso like this:
<disk type='file' device='cdrom'>
&...
0
votes
1
answer
6k
views
How to disable default DHCP on virbr0 and obtain IP from DHCP on host
I have a Ubuntu Desktop, with Libvirt based Virtual Machines setup over
virbr0 bridge. Currently libvirt's default DHCP server (dnsmasq) provides
IP address assignments.
root@ngadre-Inspiron-3542:/...