[libvirt-users] Can't get PCI passthrough working
by Phill Edwards
I'm trying to get PCI passthrough working by passing through a DVB-T TV
card to a VM running MythTV. When I assign the PCI devices in virt-manager
and attempt to start the VM I get this error:
Error starting domain: internal error: process exited while connecting to
monitor: 2015-09-06T12:41:09.725990Z qemu-kvm: -device
vfio-pci,host=05:02.0,id=hostdev0,bus=pci.0,addr=0x9: vfio: error, group 11
is not viable, please ensure all devices within the iommu_group are bound
to their vfio bus driver.
2015-09-06T12:41:09.726034Z qemu-kvm: -device
vfio-pci,host=05:02.0,id=hostdev0,bus=pci.0,addr=0x9: vfio: failed to get
group 11
2015-09-06T12:41:09.726049Z qemu-kvm: -device
vfio-pci,host=05:02.0,id=hostdev0,bus=pci.0,addr=0x9: Device initialization
failed.
2015-09-06T12:41:09.726064Z qemu-kvm: -device
vfio-pci,host=05:02.0,id=hostdev0,bus=pci.0,addr=0x9: Device 'vfio-pci'
could not be initialized
I've followed a whole load of instructions and made teh settings below:
- Updated /etc/sysconfig/grub tp add intel_iommu=on:
GRUB_CMDLINE_LINUX="rd.lvm.lv=centos/root rd.lvm.lv=centos/swap rhgb quiet
intel_iommu=on"
- Allowed unsafe interrupts in /etc/modprobe.d/PME-vfio_iommu_type1.conf:
options vfio_iommu_type1 allow_unsafe_interrupts=1
- Blacklisted the PCI card's drivers in /etc/modprobe.d/blacklist.conf so
they don't get grabbed by the CentOS hypervisor host:
blacklist cx8800
blacklist cx8802
blacklist cx88_dvb
blacklist cx88-mpeg
Can anyone please advise why I'm getting that error preventing the VM from
booting?
9 years, 3 months
[libvirt-users] Can't get cable connection working on virtual router machine
by Phill Edwards
I'm pretty new to KVM and have a KVM CentOS 7.1 hypervisor running a few
VMs. I'm moving all my VMs from an ESXi host as I want to use KVM in
future. Most of my VMs are working except for one which is running a Sophos
UTM router (Sophos UTM is similar to products like pfSense
<https://www.pfsense.org/>, Smoothwall <http://www.smoothwall.org/> etc).
The host has 3 physical NICs which are configured on the Sophos VM as:
1) LAN (fixed IP)
2) DMZ (fixed IP)
3) WAN (which is directly plugged into a cable modem for the internet
connection and is configured DHCP).
I have imported the settings from the "old" Sophos machine so I know the
configuration of the new one is identical to the old one. I have even tried
configuring the NICs to have the same MAC addresses as the old one.
The problem is that no matter what I try I cannot get the WAN NIC to get an
internet link up and running with my cable modem. I have re-installed the
VM countless times, turned off the modem and VM, done a factory reset of
the modem, and, as I mentioned, ensured the MAC addresses are the same.
Nothing I try has been successful.
The network interfaces on the new Sophos VM look like this:
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state
UP group default qlen 1000
link/ether 00:0c:29:79:d4:de brd ff:ff:ff:ff:ff:ff
inet 192.168.0.254/24 brd 192.168.0.255 scope global eth0
valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1472 qdisc pfifo_fast state
UP group default qlen 1000
link/ether 00:0c:29:79:d4:e8 brd ff:ff:ff:ff:ff:ff
4: eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state
UP group default qlen 1000
link/ether 00:0c:29:79:d4:f2 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.254/24 brd 192.168.1.255 scope global eth2
valid_lft forever preferred_lft forever
I also found this in the /var/log/system.log of the Sophos VM:
2015:08:29-12:04:05 sop dhclient: DHCPDISCOVER on eth1 to 255.255.255.255
port 67 interval 6
2015:08:29-12:04:11 sop dhclient: DHCPDISCOVER on eth1 to 255.255.255.255
port 67 interval 13
2015:08:29-12:04:24 sop dhclient: DHCPDISCOVER on eth1 to 255.255.255.255
port 67 interval 2
2015:08:29-12:04:26 sop dhclient: No DHCPOFFERS received.
I have shut down firewalld on the KVM host so I don't think there are any
firewall rules blocking this.
As soon as I fire up the original Sophos VM on ESXi the internet connection
works perfectly again.
If I can't get this VM running on KVM it's a show-stopper. Can anyone
suggest what might be going on that is preventing the WAN link from
connecting? Or suggest a way of troubleshooting this?
Thanks in advance.
9 years, 3 months
[libvirt-users] Error during virt-install, error is not for the guest being instantiated
by DeVincentis, Joseph
Hi,
I have two processes spinning up independent sets of guests, letting the guests run for a while, and tearing them down.
The two processes are generally giving their set of guests a different "run-period", so the guest spin-up/tear-down will happen during different cycles/phases.
Call these processes A and B, each is currently managing 32 guests.
I am seeing an issue, where when process A is spinning guests up, and process B is tearing them down, where on process A, a virt-install will fail, but the error identifies a recently terminated guest which is managed by process B. The guest being instantiated does not get instantiated.
"ERROR Error: --network default: Domain not found: no domain with matching uuid 'd39587cb-a2e8-4989-8dce-12a12eb2815e' (process-B-guest-name)"
This message is logged by my script at 3:29:23PM.
This message is in /var/log/messages;
Sep 1 15:29:21 splat04 systemd-machined: Machine qemu-process-B-guest-name terminated.
Seems to me that there is some sort of mixup going on, process-B-guest-name is terminated during the virt-install for process-A-guest-name.
Any thoughts on this? Like hints on what to look for? This is on Centos7, the version of libvirt is 1.2.8, virt-install is 1.1.0
Thanks - Joe
9 years, 3 months
[libvirt-users] New libvirt guide
by David Ashley
All -
Let me introduce myself. I am W. David Ashley, the primary author of the
"Libvirt Application Development Guide Using Python" which will soon be
published on the libvirt.org web site. I hope all of you will enjoy the
new guide when it becomes available.
I have multiple decades of experience in writing documentation and
training guides and I have about eight years of experience using libvirt
and qemu/kvm virtual machines. Most of that experience was in creating
and maintaining VM on-demand systems.
In the meantime, I am planning a new guide and I would appreciate some
feedback from the libvirt user community concerning the potential
usefulness and contents of the new guide. The proposed title of the
guide will be "Automating Virtual Machines". The current (very) rough
outline is:
Introduction
Intro to virtual machines
Installing virtual machines
Using virtual machines
Using Python to access VMs
A sample problem
Problem statement
Solution requirements
Using VMs to solve the problem
New problems introduced by using VMs
How to programmatically access VMs
Intro to the python libvirt module
How to connect to a VM
How to access and control a guest domain
Information the python libvirt module can not provide
Storing information about VMs
Deciding what information should be stored
Using simple text files
Using a simple database
Securing your information
How to set up a VM on demand environment
Discovering a VMs ip address
Using cron to start processes
Starting up a VM
Invoking a program on the VM
Using SSH to access a VM
Shutting down a VM
Alternatives to starting/stopping a VM
Using the libvirt guest agent
Installing the libvirt guest agent
Red Hat, Fedora, CentOS
openSuse, SuSE
Ubuntu, Debian, Mint
Using (querying) the libvirt guest agent
Logging VM activities
Host activities
VM activities
Securing your VMs
Host security
VM security
Any feedback/suggestions you have will be appreciated and I assure you
they will be given serious consideration. At this point, nothing has
been written except this rough outline so this is your chance to help
form the contents or even make suggestions for a completely different guide.
Feel free to post back to this list or send me private email.
W. David Ashley
w.david.ashley(a)gmail.com
9 years, 3 months
[libvirt-users] VM locking
by Prof. Dr. Michael Schefczyk
Dear All,
I am trying to use VM (disk) locking on a two node Centos 7 KVM cluster. Unfortunately, I am not successful.
Using virtlockd (https://libvirt.org/locking-lockd.html), I get each host to write the zero length file with a hashed filename to the shared folder specified. Regardless of which host I start a VM (domain) on, they do produce the identical filename per VM. What does not work, however, is to prevent the second host to start the VM already running on the first VM.
Using sanlock (https://libvirt.org/locking-sanlock.html), no domains do start at all. However, the file "__LIBVIRT__DISKS__" is also not written to the shared folder. Hence, nothing works.
Can someone please point me to the right direction?
My system is current Centos 7 using a gluster storage setup like suggested for oVirt (https://community.redhat.com/blog/2014/10/up-and-running-with-ovirt-3-5/) based on the oVirt 3.5 repo but without an engine. I do this, because I want to retain VM files in qcow2 format for live backups and with human readable names. What does work then is, e.g., live migration. A locking mechanism to prevent starting a VM twice would be good.
Please note that this configuration - both according to redhat and to my own trial and error - requires Lock=False in /etc/nfsmount.conf. Is there a connection with my findings? My issues occur regardless of the files being in NFS or Gluster folders. KVM must load the Gluster storage indirectly via NFS rather than straight via Gluster, as Gluster storage does not seem to fully work, at least in virt-manager.
My software versions are:
libvirt 1.2.8-16.el7_1.3.x86_64
qemu-kvm ev-2.1.2-23.el7_1.3.1.x86_64
Regards,
Michael
9 years, 3 months