libvirt-python for alpine linux
by Tom Ammon
Hi everybody,
Is there a libvirt-python package for alpine linux? I'm looking to
containerize an app that uses libvirt-python, using alpine linux, but all I
found that looked similar to libvirt-python was py-libvirt (
https://pkgs.alpinelinux.org/package/v3.3/main/x86/py-libvirt) and it looks
pretty old.
Tom
--
-----------------------------------------------------------------------------
Tom Ammon
M: (737) 400-9042
thomasammon(a)gmail.com
-----------------------------------------------------------------------------
2 years, 9 months
SSH VM from outside, but not from host
by Wolf
Hi!
1) I have two network ports on my server.
- eno1 has the IP: XX1.XX1.XX1.150
- bridge0 has the IP: XX2.XX2.XX2.100
and has the interface member: port eno2.
eno2 is not set up with an IP address.
2) The host runs on IP: XX1.XX1.XX1.150
3) A VM uses the bridge: bridge0, and has the IP: XX2.XX2.XX2.100
I have a problem with this setup:
I can ssh the VM on XX2.XX2.XX2.100 from outside, but from the host, XX1.XX1.XX1.150, I can't ssh the VM on XX2.XX2.XX2.100.
Have I set up this wrong or is it something I can do to solve this?
Thanks!
Wolf
2 years, 9 months
Public IP on virtual machine network issue
by Marcin Groszek
I have been struggling with this for weeks and I was unable to find an
answer on line. Perhaps someone here can help me.
Oracle linux 8 running virtualization:
hardware node has a public IP address on interface bridge0 and physical
eno1 is a member of the bridge0
a virtual OS has interface bridged to lan and source is bridge0, Ip
address of virtual OS is also a public from same class as the hardware node.
I can route in and out of virtual, I can ping from hardware node to
virtual and vice versa, so the routing works as it should, sort of.
When I try tracepath or traceroute from outside to virtual I get !H on
last hup
same result when I try to do the same form hardware node to virtual I get !H
Also, when I telnet (TCP) to a specific port on virtual where I have a
daemon LISTENING OR NOT I get: No route to host. Same experiment works
just fine for ssh port.
Firewalld is not running, and I just have very basic iptables rules like
allowing external address block to ssh to hardware node and to virtual
dropping connections from all other sources
This issue presented it self when I attempted to setup a galera node on
virtual and ports 4567 is responding but 4568 and 4444 are not, but the
daemons are running and I can clearly see lsoft showing "LISTENING"
I capture the traffic and the tcp as well as udp are getting to the
virtual. Is there a preconfigured netfiltering that I am not aware of?
What am I missing?
--
Best Regards:
Marcin Groszek
Business Voip Resource.
http://www.voipplus.net
2 years, 9 months
libvirtd daemon missing in LFS
by Sai Kiran Kumar Reddy
Hi,
I am Sai Kiran. I am trying to build libvirt from source on my Linux From
Scratch(LFS) system. I have successfully installed libvirt and its
dependencies. When I start virt-manager, there is a prompt in GUI saying
that "libvirtd service is not installed". I also do not see any libvirtd
in my system. I would like to install the libvirtd service(build from
source). But I am not able to find the source code for it and also, I am
not sure about the build process for the daemon. Could you please help me
out here.
Thanks in advance for your time and support.
--
Regards,
Sai Kiran.
2 years, 9 months
qemu+ssh connections to a remote libvirt fail as ssh banner configured
by Yalan Zhang
Hi there,
I have a system configured with ssh login banner like as below:
# cat ~/.bashrc
...
echo
"================================================================================="
echo "====== This machine is occupied by xxx for testing now. If you are
about to use it, contact xxx first ======"
echo
"================================================================================="
It works as expected that whenever someone logs into this system by ssh,
he/she will see this warning message.
But it seems such settings will impact a virsh client connection with ssh,
when I try to connect the libvirt daemon on this system, it will error out :
# virsh -c qemu+ssh://${my_host}/system list --all
root@${my_host}'s password:
error: failed to connect to the hypervisor
error: packet 1027423545 bytes received from server too large, want 33554432
I have searched and found some related explanations[1], and [2] says "The
virsh man page doesn't mention ssh, so it sounds like the file
/usr/share/doc/libvirt-doc/remote.html shipped with libvirt-doc could use a
patch mentioning this."
But I can not find anything about this currently on
file:///usr/share/doc/libvirt-docs/html/remote.html.
Could we have this documented for reference with all the possibilities?
Thank you!
[1]
https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/868753/comments/17
[2]
https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/868753/comments/14
-------
Best Regards,
Yalan Zhang
IRC: yalzhang
2 years, 9 months
NVMe drive PCI passthrough and suprise hotplug
by Kalra, Ashish
[AMD Official Use Only]
Hi,
I am using Fedora 33, with the following KVM, qemu and libvirt versions:
QEMU 5.1.0
libvirt 6.6.0
KVM 5.14.18
We have done pass-through of a PCIe NVMe device to the guest running on FC33
using either virt-manager or virsh and then we do the hot-unplug of the device
while it is attached to the guest.
The device is no longer seen on the guest hardware device list on virt-manager
and then we hotplug the device again and we are able to use it on the Host,
but when we try to re-attach it to the guest, we get the following error message:
Requested operation is not valid, PCI device 0000:c4::00.0 is in use by driver QEMU,
Domain fedora 33.
So somehow libvirt still thinks the hot-unplugged device is attached.
Tracing the flow of hot un-plug event from guest to host :
->Guest pcie hotplug support detected the NVMe driver unplug (from guest kernel logs):
pciehp: Slot (0-6): Attention button pressed
pciehp: Slot (0-6): Powering off due to to button press.
-> Also looks like the guest notified Host/KVM (from host kernel logs):
pcieport: 0000:c4:0000.0: pciehp: Slot (208): Card not present
-> Correspondingly, vfio-pci module notified Qemu :
vfio-pci: 0000:c4:0000.0: Relaying device request to user (#0)
-> Then the un-plugged device reset is done.
vfio-pci: vfio_bar_restore: reset recovery - restoring BARs
pci 0000:c4:00.0: Removing from iommu group 105.
-> Next tried to verify if libvirt detected the DELETED_DRIVE event from qemu.
Running SystemTap script to capture events between qemu and libvirt :
stap examples/systemtap/qemu-monitor.stp
When the NVMe drive is attached to VM the following log output is seen from SystemTap:
execute "device-add", driver: "vfio-pci", host: "0000:c4:00.0", id: "hostdev0", bus: "pci.7", addr: "0".
When we hot-unplug the NVMe drive, the following log output is seen from SystemTap:
event: DEVICE_DELETED, device: "hostdev0", path: "/machine/peripheral/hostdev0".
So it looks like that qemu sent the "DEVICE_DELTED" event to libvirt, but libvirt has still not removed the attached
device from its bookeeping list.
I understand there is already a thread from 20202, discussing a similar issue :
https://www.spinics.net/linux/fedora/libvirt-users/msg12590.html
But I am not sure if there is any fix/support added for this recently.
Looking for any feedback related to above and PCI device passthrough and hotplug support.
Thanks,
Ashish
2 years, 9 months
udmabuf error with libvirt + QEMU
by M, Shivakumar
Hi,
We are seeing an issue with udambuf, where it says "open /dev/udmabuf: No such file or directory " even if the device exits. This issue particularly we are seeing with libvirt. When we run the QEMU args on the command line, everything works as expected.
It seems to be some permission issue when we use the Libvirt, please help us on resolving this.
[cid:image001.png@01D817A5.0151F260]
Libvirt Version: 6.0.0
Host: Ubuntu 21.04
QEMU commands:
qemu-system-x86_64 \
-enable-kvm \
-smp cores=4,threads=2,sockets=1 \
-m 4096 \
-name win-vm-0 \
-cpu host \
-drive id=windows_drive,if=virtio,file=/win10_enterprise.qcow2,format=qcow2,cache=none \
-device vfio-pci,host=0000:00:02.2 \
-device e1000,netdev=net0,mac=00:a1:00:00:00:10 \
-netdev user,id=net0,ipv6=off,hostfwd=tcp::1111-:22,hostfwd=tcp::3389-:3389 \
-monitor tcp:127.0.0.1:11111,server,nowait \
-rtc base=localtime \
-usb \
-device usb-tablet \
-device usb-kbd \
-device usb-mouse \
-device virtio-vga,blob=true \
-display gtk,gl=on \
-object memory-backend-memfd,id=mem1,hugetlb=off,size=4096M \
-machine memory-backend=mem1
Libvirt XML:
<?xml version="1.0"?>
<domain xmlns:qemu=http://libvirt.org/schemas/domain/qemu/1.0 type="kvm">
<name>win-vm-0</name>
<memory unit="KiB">4194304</memory>
<currentMemory unit="KiB">4194304</currentMemory>
<memoryBacking supported="yes">
<source type="memfd"/>
</memoryBacking>
<vcpu>6</vcpu>
<os>
<type arch="x86_64" machine="pc">hvm</type>
<boot dev="hd"/>
<boot dev="cdrom"/>
</os>
<features>
<acpi/>
<apic/>
<hyperv>
<relaxed state="on"/>
<vapic state="on"/>
<spinlocks state="on" retries="8191"/>
</hyperv>
<vmport state="off"/>
</features>
<cpu mode="host-model">
<model fallback="forbid"/>
</cpu>
<clock offset="utc">
</clock>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/bin/qemu-system-x86_64</emulator>
<disk type="file" device="disk">
<driver name="qemu" type="qcow2"/>
<source file="/win10_enterprise.qcow2" index="1"/>
<backingStore/>
<target dev="sda" bus="sata"/>
<alias name="sata0-0-0"/>
<address type="drive" controller="0" bus="0" target="0" unit="0"/>
</disk>
<interface type="bridge">
<source bridge="br0"/>
<model type="virtio"/>
</interface>
<serial type="pty">
<target port="0"/>
<target type="serial" port="0">
</target>
<alias name="serial0"/>
</serial>
<console type="pty">
<target type="serial" port="0"/>
<alias name="serial0"/>
</console>
<hostdev mode="subsystem" type="pci" managed="yes">
<driver name="vfio"/>
<source>
<address domain="0x0000" bus="0x00" slot="0x02" function="0x02"/>
</source>
</hostdev>
</devices>
<qemu:commandline>
<qemu:arg value="-device"/>
<qemu:arg value="virtio-vga,blob=true"/>
<qemu:arg value="-display"/>
<qemu:arg value="gtk,gl=on"/>
<qemu:env name="DISPLAY" value=":1.0"/>
</qemu:commandline>
</domain>
Thanks,
Shiv
2 years, 9 months