[libvirt-users] Qemu guest display black after reboot
by Allence
Hey, every friend. I have a question. My guests are not working, unbelievable.
I can use it the first time I use it. But after I close my guest and start over, my guests will not appear. My screen is black.
My environment:
Guest: windows 10
vm-bios: ovmf
host: ubuntu 1604
qemu: 2.12
libvirt: 4.2
kernel: 4.17.2
xml config:
gpu:
<qemu:commandline>
<qemu:arg value='-device'/>
<qemu:arg value='vfio-pci,host=0000:01:00.0,romfile=/root/rom.file,multifunction=on,x-vga=on'/>
</qemu:commandline>
features:
<kvm>
<hidden state='on'/>
</kvm>
6 years, 1 month
[libvirt-users] Trouble passing PCI device in isolated IOMMU group
by Quincy Wofford
I'm attempting PCI-passthrough from host to guest on an HP ProLiant 380P,
which has an outdated BIOS (2014), but it does support VT-d. I'm running
CentOS 7, kernel 3.10.0-862.9.1.el7.x86_64.
I have an Intel 82580 NIC installed with 4 ports. Each of these ports is in
its own IOMMU group (I enabled SR-IOV at the BIOS, which might be the
reason they show up separately)
After detaching and adding a 'hostdev' device with the appropriate pci
address, I attempt to start my VM. I get " failed to set iommu for
container: Operation not permitted". As recommended here (
http://vfio.blogspot.com/2014/08/vfiovga-faq.html) I parsed dmesg in an
attempt to find:
-------------------
No interrupt remapping support. Use the module param
"allow_unsafe_interrupts" to enable VFIO IOMMU support on this platform
-------------------
...but nothing similar exists in my logs.
Since this device is showing up in its own IOMMU group, I assume ACS
override won't get me any further. In any case, it is not an option for me
to leave ACS override on. I can turn it on for testing, the server is not
currently in production.
Any idea why this could be failing?
6 years, 1 month
[libvirt-users] How to set the MTU size of VM interface
by netsurfed
Dear all:
I start a VM with MTU size 1450, and login VM to check the mtu size, but this setting didn't work.
The VM xml is like this:
<interface type='bridge'>
<mac address='52:54:00:54:14:f8'/>
<source bridge='ovsbr1'/>
<virtualport type='openvswitch'>
<parameters interfaceid='a42e5b42-09db-4cfa-b198-d2ce62843378'/>
</virtualport>
<target dev='vnet0'/>
<model type='virtio'/>
<mtu size='1450'/>
<alias name='net0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>
However, the actual mtu size of VM is still 1500, as following:
root@ubuntu-zhf:~# ip addr
2: ens3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 52:54:00:54:14:f8 brd ff:ff:ff:ff:ff:ff
The MTU size of both ovs bridge and vnet are 1450 in my hypervisor:
root@ubuntu-191:~# ip addr show ovsbr1
16: ovsbr1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc noqueue state UNKNOWN group default qlen 1
link/ether 12:01:7b:5b:85:49 brd ff:ff:ff:ff:ff:ff
inet6 fe80::1001:7bff:fe5b:8549/64 scope link
valid_lft forever preferred_lft forever
root@ubuntu-191:~# ip addr show vnet0
22: vnet0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1450 qdisc pfifo_fast master ovs-system state UNKNOWN group default qlen 1000
link/ether fe:54:00:54:14:f8 brd ff:ff:ff:ff:ff:ff
inet6 fe80::fc54:ff:fe54:14f8/64 scope link
valid_lft forever preferred_lft forever
I use ovs to create vxlan networks and add VMs to the ovs bridge. Because of the limitations of vxlan, I need to set the mtu of vm to 1450.
How to set the MTU of VM? Thanks.
Below some information about my hypervisor:
root@ubuntu-192:~# virsh -V
Virsh command line tool of libvirt 3.4.0
See web site at http://libvirt.org/
Compiled with support for:
Hypervisors: QEMU/KVM LXC UML OpenVZ VMware VirtualBox Test
Networking: Remote Network Bridging Interface udev Nwfilter VirtualPort
Storage: Dir Filesystem SCSI Multipath iSCSI LVM
Miscellaneous: Daemon Nodedev SELinux Secrets Debug Modular
root@ubuntu-192:~# qemu-x86_64 --version
qemu-x86_64 version 2.9.0
Copyright (c) 2003-2017 Fabrice Bellard and the QEMU Project developers
root@ubuntu-192:~# uname -a
Linux ubuntu-192 4.4.0-62-generic #83-Ubuntu SMP Wed Jan 18 14:10:15 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
6 years, 1 month
[libvirt-users] multiple devices in the same iommu group in L1 guest
by Yalan Zhang
Hi,
I have a guest enabled vIOMMU, but on the guest there are several devices
in the same iommu group.
Could someone help to check if I missed something?
Thank you very much!
1. guest xml:
# virsh edit q
...
<os>
<type arch='x86_64' machine='pc-q35-rhel7.5.0'>hvm</type>
<loader readonly='yes' secure='yes'
type='pflash'>/usr/share/OVMF/OVMF_CODE.secboot.fd</loader>
<nvram>/var/lib/libvirt/qemu/nvram/q_VARS.fd</nvram>
</os>
...
<features>
...
<ioapic driver='qemu'/>
</features>
<cpu mode='host-passthrough' check='none'>
<feature policy='require' name='vmx'/>
</cpu>
...
<devices>
...
<controller type='pci' index='7' model='pcie-root-port'>
<model name='pcie-root-port'/>
<target chassis='7' port='0x15'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02'
function='0x5'/>
</controller>
<interface type='network'>
<mac address='52:54:00:b9:ff:90'/>
<source network='default'/>
<model type='e1000'/>
<address type='pci' domain='0x0000' bus='0x07' slot='0x00'
function='0x0'/>
</interface>
<iommu model='intel'>
<driver intremap='on' caching_mode='on' iotlb='on'/>
</iommu>
</devices>
...
2. guest has 'intel_iommu=on' enabled in kernel cmdline, then reboot guest
3. log in guest to check:
# dmesg | grep -i DMAR
[ 0.000000] ACPI: DMAR 000000007d83f000 00050 (v01 BOCHS BXPCDMAR
00000001 BXPC 00000001)
[ 0.000000] DMAR: IOMMU enabled
[ 0.155178] DMAR: Host address width 39
[ 0.155180] DMAR: DRHD base: 0x000000fed90000 flags: 0x1
[ 0.155221] DMAR: dmar0: reg_base_addr fed90000 ver 1:0 cap
12008c22260286 ecap f00f5e
[ 0.155228] DMAR: ATSR flags: 0x1
[ 0.155231] DMAR-IR: IOAPIC id 0 under DRHD base 0xfed90000 IOMMU 0
[ 0.155232] DMAR-IR: Queued invalidation will be enabled to support
x2apic and Intr-remapping.
[ 0.156843] DMAR-IR: Enabled IRQ remapping in x2apic mode
[ 2.112369] DMAR: No RMRR found
[ 2.112505] DMAR: dmar0: Using Queued invalidation
[ 2.112669] DMAR: Setting RMRR:
[ 2.112671] DMAR: Prepare 0-16MiB unity mapping for LPC
[ 2.112820] DMAR: Setting identity map for device 0000:00:1f.0 [0x0 -
0xffffff]
[ 2.211577] DMAR: Intel(R) Virtualization Technology for Directed I/O
===> This is expected
# dmesg | grep -i iommu |grep device
[ 2.212267] iommu: Adding device 0000:00:00.0 to group 0
[ 2.212287] iommu: Adding device 0000:00:01.0 to group 1
[ 2.212372] iommu: Adding device 0000:00:02.0 to group 2
[ 2.212392] iommu: Adding device 0000:00:02.1 to group 2
[ 2.212411] iommu: Adding device 0000:00:02.2 to group 2
[ 2.212444] iommu: Adding device 0000:00:02.3 to group 2
[ 2.212464] iommu: Adding device 0000:00:02.4 to group 2
[ 2.212482] iommu: Adding device 0000:00:02.5 to group 2
[ 2.212520] iommu: Adding device 0000:00:1d.0 to group 3
[ 2.212533] iommu: Adding device 0000:00:1d.1 to group 3
[ 2.212541] iommu: Adding device 0000:00:1d.2 to group 3
[ 2.212550] iommu: Adding device 0000:00:1d.7 to group 3
[ 2.212567] iommu: Adding device 0000:00:1f.0 to group 4
[ 2.212576] iommu: Adding device 0000:00:1f.2 to group 4
[ 2.212585] iommu: Adding device 0000:00:1f.3 to group 4
[ 2.212599] iommu: Adding device 0000:01:00.0 to group 2
[ 2.212605] iommu: Adding device 0000:02:01.0 to group 2
[ 2.212621] iommu: Adding device 0000:04:00.0 to group 2
[ 2.212634] iommu: Adding device 0000:05:00.0 to group 2
[ 2.212646] iommu: Adding device 0000:06:00.0 to group 2
[ 2.212657] iommu: Adding device 0000:07:00.0 to group 2
====> several devices in the same iommu group
# virsh nodedev-dumpxml pci_0000_07_00_0
<device>
<name>pci_0000_07_00_0</name>
<path>/sys/devices/pci0000:00/0000:00:02.5/0000:07:00.0</path>
<parent>pci_0000_00_02_5</parent>
<driver>
<name>e1000</name>
</driver>
<capability type='pci'>
<domain>0</domain>
<bus>7</bus>
<slot>0</slot>
<function>0</function>
<product id='0x100e'>82540EM Gigabit Ethernet Controller</product>
<vendor id='0x8086'>Intel Corporation</vendor>
<iommuGroup number='2'>
<address domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
<address domain='0x0000' bus='0x00' slot='0x02' function='0x1'/>
<address domain='0x0000' bus='0x00' slot='0x02' function='0x2'/>
<address domain='0x0000' bus='0x00' slot='0x02' function='0x3'/>
<address domain='0x0000' bus='0x00' slot='0x02' function='0x4'/>
<address domain='0x0000' bus='0x00' slot='0x02' function='0x5'/>
<address domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
<address domain='0x0000' bus='0x02' slot='0x01' function='0x0'/>
<address domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
<address domain='0x0000' bus='0x05' slot='0x00' function='0x0'/>
<address domain='0x0000' bus='0x06' slot='0x00' function='0x0'/>
<address domain='0x0000' bus='0x07' slot='0x00' function='0x0'/>
</iommuGroup>
</capability>
</device>
Thus, can not attach the device to L2 guest:
# cat hostdev.xml
<hostdev mode='subsystem' type='pci' managed='yes'>
<source>
<address domain='0x0000' bus='0x07' slot='0x00' function='0x0'/>
</source>
</hostdev>
# virsh attach-device rhel hostdev.xml
error: Failed to attach device from hostdev.xml
error: internal error: unable to execute QEMU command 'device_add': vfio
error: 0000:07:00.0: group 2 is not viable
-------
Best Regards,
Yalan Zhang
IRC: yalzhang
Internal phone: 8389413
6 years, 1 month
[libvirt-users] LXC Memory Limits wont work
by Markus Raps
Hello,
iam currently trying to run LXC Containers with libvirt
but the memory limit doesn't want to work
in the container i see the full 32GB from the Host OS
iam pretty sure that iam missing a configline in the xml
lxc-template ~ # free -m
total used free shared buff/cache
available
Mem: 32108 626 31396 249 85
31396
Swap: 0 0 0
lxc-template ~ #
the host is running debian 9 with default repos
hv1 ~ # dpkg -l | grep virt
ii libgovirt-common 0.3.4-2
all GObject-based library to access oVirt REST API
(common files)
ii libgovirt2:amd64 0.3.4-2
amd64 GObject-based library to access oVirt REST API
ii libvirt-clients 3.0.0-4+deb9u3
amd64 Programs for the libvirt library
ii libvirt-daemon 3.0.0-4+deb9u3
amd64 Virtualization daemon
ii libvirt-daemon-system 3.0.0-4+deb9u3
amd64 Libvirt daemon configuration files
ii libvirt-glib-1.0-0:amd64 1.0.0-1
amd64 libvirt GLib and GObject mapping library
ii libvirt0 3.0.0-4+deb9u3
amd64 library for interfacing with different
virtualization systems
ii python-libvirt 3.0.0-2
amd64 libvirt Python bindings
ii qemu-kvm 1:2.8+dfsg-6+deb9u4
amd64 QEMU Full virtualization on x86 hardware
ii virt-viewer 5.0-1
amd64 Displaying the graphical console of a virtual
machine
ii virtinst 1:1.4.0-5
all Programs to create and clone virtual machines
--
best regards
Markus Raps
6 years, 1 month
[libvirt-users] Adding a VLAN tag to a libvirt SR-IOV VF network using the "virsh net-update" command
by Yegappan Lakshmanan
Hi all,
How do you add a VLAN tag to a libvirt SR-IOV VF network usingthe "virsh net-update" command? I couldn't find the section to passto the "virsh net-update" command to add the VLAN tag.
I have the following libvirt network defined for a SR-IOV VF:
<network> <name>GE0-0-SRIOV-1</name> <uuid>7bc67166-c78e-4bcf-89ee-377dd9086631</uuid> <forward mode='hostdev' managed='yes'> <driver name='vfio'/> <address type='pci' domain='0x0000' bus='0x02' slot='0x10' function='0x0'/> </forward></network>
I am trying to add VLAN 100 to this network. If I use the following command toadd a VLAN tag to this network:
virsh net-update GE0-0-SRIOV-1 modify bridge --xml "<vlan trunk='no'><tag id='100'/></vlan>"
It fails as the section "bridge" doesn't support adding a VLAN tag. I have triedother section values like domain and all of them fail.
I am able to add the VLAN to the portgroup section, but then the VLAN configurationis not propagated to the underlying physical PF interface.
If I manually add the VLAN configuration using the "virsh net-edit" command andthen connect a VM to this network, then the VLAN information is correctly propagatedto the underlying physical NIC device. I need a way to automate this configuration.
Any pointers?
Thanks,Yegappan
6 years, 1 month
[libvirt-users] ecryptfs (from centosplus) and libvirt lxc quest on it - quest upon start shoots host in the head
by lejeczek
hi guys
I have a lxc guest on Dell's R815(AMD Opterons) which I just moved to an
ecryptfs mounted folder(using centosplus' kernel C7.5)
Copying data to that folder seems to work just fine, but I as soon as I
start the quest, the host gets shot in the head almost immediately, hard
reboot, no dump.
I also have another, virtually identical guest but on Intel platform and
that one does not do anything but runs okey.
Any of you guys has experience such gross abnormality?
(maybe a heads-up to redhat if cryptfs was to be ever added)
many thanks, L.
6 years, 1 month