[libvirt-users] 5.2.0 xen and maxGrantFrames
by Christoph
Hi
libvirt 5.2.0 should support maxGrantFrames setting for xen (changelog).
I get ever an error if I use it in the config:
<domain type='xen'>
<name>satan.chao5.int</name>
<uuid>f1f96b1c-fb75-4707-afb7-604d696d29cc</uuid>
<memory unit='KiB'>3145728</memory>
<currentMemory unit='KiB'>3145728</currentMemory>
<vcpu placement='static'>4</vcpu>
<bootloader>pygrub</bootloader>
<os>
<type arch='x86_64' machine='xenpvh'>xenpvh</type>
</os>
<clock offset='utc' adjustment='reset'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>restart</on_crash>
<devices>
<disk type='block' device='disk'>
<driver name='phy' type='raw'/>
<source dev='/dev/vg_lilith/lv_satan_root'/>
<target dev='xvda' bus='xen'/>
</disk>
<disk type='block' device='disk'>
<driver name='phy' type='raw'/>
<source dev='/dev/vg_lilith/lv_satan_home'/>
<target dev='xvdb' bus='xen'/>
</disk>
<disk type='block' device='disk'>
<driver name='phy' type='raw'/>
<source dev='/dev/vg_lilith/lv_satan_swap'/>
<target dev='xvdc' bus='xen'/>
</disk>
<disk type='block' device='disk'>
<driver name='phy' type='raw'/>
<source dev='/dev/md10'/>
<target dev='xvdd' bus='xen'/>
</disk>
<disk type='block' device='disk'>
<driver name='phy' type='raw'/>
<source
dev='/dev/disk/by-uuid/6beff9f2-a88c-4d21-86c6-ff90439b4ca3'/>
<target dev='xvde' bus='xen'/>
</disk>
<disk type='block' device='disk'>
<driver name='phy' type='raw'/>
<source
dev='/dev/disk/by-uuid/e19e6e23-b35c-4fae-b34a-0e2835bde74d'/>
<target dev='xvdf' bus='xen'/>
</disk>
<disk type='block' device='disk'>
<driver name='phy' type='raw'/>
<source
dev='/dev/disk/by-uuid/3d50dfab-5ffe-4558-9ab3-36fd504607be'/>
<target dev='xvdg' bus='xen'/>
</disk>
<disk type='block' device='disk'>
<driver name='phy' type='raw'/>
<source
dev='/dev/disk/by-uuid/c4593072-0161-4bdc-b8b6-317fdd23f8ed'/>
<target dev='xvdh' bus='xen'/>
</disk>
<disk type='block' device='disk'>
<driver name='phy' type='raw'/>
<source
dev='/dev/disk/by-uuid/372167e4-c1ea-4ce6-813b-9c57dd4e67a6'/>
<target dev='xvdi' bus='xen'/>
</disk>
<disk type='block' device='disk'>
<driver name='phy' type='raw'/>
<source dev='/dev/mapper/keys'/>
<target dev='xvdz' bus='xen'/>
<readonly/>
</disk>
<controller type='xenbus' index='0' maxGrantFrames='128'/>
<interface type='bridge'>
<mac address='00:16:3e:05:31:50'/>
<source bridge='xenbr5'/>
<script path='vif-bridge'/>
</interface>
<interface type='bridge'>
<mac address='00:16:3e:15:31:50'/>
<source bridge='xenbr15'/>
<script path='vif-bridge'/>
</interface>
<console type='pty'>
<target type='xen' port='0'/>
</console>
<input type='mouse' bus='xen'/>
<input type='keyboard' bus='xen'/>
<memballoon model='xen'/>
</devices>
</domain>
What Im doing wrong?
--
------
Greetz
5 years, 5 months
[libvirt-users] Live Disk Backup with Active Blockcommit
by Wolf
Hi!
I was reading the Wiki about 'Live Disk Backup with Active Blockcommit, https://wiki.libvirt.org/page/Live-disk-backup-with-active-blockcommit
and see that example shown seems to be using two different names for the same file.
First showing the current block device in use:
$ virsh domblklist vm1
Target Source
------------------------------------------------
vda /export/images/base.qcow2
Then copying the same file for backup:
$ cp /export/images/base.img /export/images/copy.img
=> Is there are reason why the block device first is called 'base.qcow2' and then 'base.img'?
I also saw another name that seems to be wrong based on the context.
It doesn't have the same implication as my earlier example, as the name of the overlay file is not written in the command itself, but still:
------
$ virsh snapshot-create-as --domain vm1 guest-state1 \
--diskspec vda,file=/export/images/overlay1.qcow2 \
--disk-only --atomic
Then:
$ virsh domblklist vm1
Target Source
------------------------------------------------
vda /export/images/overlay.qcow2
Now that the backup is finished, perform active blockcommit by live mergning contents of 'overlay1' into base . . . ."
------
=> Here it seems like the overlay file first is called ''overlay1.qcow2" and the ' virsh domblklist vm1' command shows that it is actually called: 'overlay.qcow2'
And then back to ''overlay1 in the following text: 'mergning contents of 'overlay1' into base'
(Where 'mergning' is spelled wrong, but that doesn't affect the logic).
=> Do I understand all this correctly?
I came to this article based on this answer on Serverfault: https://serverfault.com/a/921966
Since I didn't understand the logic of the file changing names, I visited the file linked to in the answer on wiki.libvirt.org and saw that the same was written there.
So maybe change these errors in the Wiki if I understand all this correctly?
Thanks for input!
Best regards,
Wolf
5 years, 5 months
[libvirt-users] JVM crashes during GC
by Sachin Soman
Hi,
Could you tell me if the following is some known issue?
While performing the following simple test, I see my JVM crashing
(consistently):
1. Open a connection to an ESXi driver/host (passing ConnectAuthDefault
instance).
2. Close the connection.
3. Invoke GC
When GC is triggered, at some point, some unallocated native memory is
being tried to release. That's failing.
The error thrown is:
java(78745,0x70000241e000) malloc: *** error for object 0x7fd5df561390:
pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
Frames from core dump:
frame #0: 0x00007fff5b274b66 libsystem_kernel.dylib`__pthread_kill + 10
frame #1: 0x00007fff5b43f080 libsystem_pthread.dylib`pthread_kill + 333
frame #2: 0x00007fff5b1d01ae libsystem_c.dylib`abort + 127
frame #3: 0x00007fff5b2ce8a6 libsystem_malloc.dylib`free + 521
frame #4: 0x00000001127f43a7
frame #5: 0x00000001127e3ffd
frame #6: 0x00000001127e3ffd
frame #7: 0x00000001127e3ffd
frame #8: 0x00000001127e3ffd
frame #9: 0x00000001127e4042
frame #10: 0x00000001127e3ffd
frame #11: 0x00000001127e3ffd
frame #12: 0x00000001127dc4e7
frame #13: 0x000000010c0e235e
libjvm.dylib`JavaCalls::call_helper(JavaValue*, methodHandle*,
JavaCallArguments*, Thread*) + 1710
frame #14: 0x000000010c0e2b02
libjvm.dylib`JavaCalls::call_virtual(JavaValue*, KlassHandle, Symbol*,
Symbol*, JavaCallArguments*, Thread*) + 356
frame #15: 0x000000010c0e2cae
libjvm.dylib`JavaCalls::call_virtual(JavaValue*, Handle, KlassHandle,
Symbol*, Symbol*, Thread*) + 74
frame #16: 0x000000010c1208ee libjvm.dylib`thread_entry(JavaThread*,
Thread*) + 124
frame #17: 0x000000010c33e84d
libjvm.dylib`JavaThread::thread_main_inner() + 155
frame #18: 0x000000010c33ff12 libjvm.dylib`JavaThread::run() + 448
frame #19: 0x000000010c26058a libjvm.dylib`java_start(Thread*) + 246
frame #20: 0x00007fff5b43c661 libsystem_pthread.dylib`_pthread_body +
340
frame #21: 0x00007fff5b43c50d libsystem_pthread.dylib`_pthread_start +
377
frame #22: 0x00007fff5b43bbf9 libsystem_pthread.dylib`thread_start + 13
I have installed Libvirt 5.2.0.
Java bindings libvirt-java 0.5.1
JNA 4.0.0
Tested Java environments: Oracle Java 8 and OpenJDK 8 on MAC, OpenJDK 11 on
Ubuntu 16
Thanks & Regards
Sachin Soman
5 years, 5 months
Re: [libvirt-users] [libvirt] Why virsh domxml-to-native qemu-argv changes PCI slot number
by Andrea Bolognani
Moving to libvirt-users where it belongs.
On Thu, 2019-04-18 at 06:47 +0000, Tal Attaly wrote:
> Hi,
> I have bridge type interface defined with slot 3 -
> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
> but after running virsh domxml-to-native qemu-argv I get slot 2-
> -netdev tap,fd=21,id=hostnet0 -device e1000,netdev=hostnet0,id=net0,mac=f2:ff:ff:ff:ff:07,bus=pci.0,addr=0x2
> Any idea why it's happen and how to keep the slot number? Libvirt version is 4.5.0
I can reproduce this, and also confirm that it shouldn't happen :)
qemuDomainAssignAddresses() is supposed to make sure that any address
configured explicitly by the user (or previously by libvirt) is
preserved, and it's doing that correctly when it's called from inside
qemuDomainDefAssignAddresses(); however, for some reason, by the time
we call it again in qemuProcessPrepareDomain() the PCI address for
the network interface is no longer set, and so a fresh one gets
assigned instead.
I'll investigate further and get back to you.
> here is the full domain XML -
>
> <domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
> <name>vm1</name>
> <uuid>dbad303e-fc1b-454e-8861-712bf1766a64</uuid>
> <memory unit='KiB'>4194304</memory>
> <currentMemory unit='KiB'>4194304</currentMemory>
> <vcpu placement='static'>1</vcpu>
> <os>
> <type arch='x86_64' machine='pc-i440fx-2.12'>hvm</type>
> <boot dev='hd'/>
> </os>
> <features>
> <acpi/>
> <apic/>
> </features>
> <cpu mode='custom' match='exact' check='partial'>
> <model fallback='allow'>SandyBridge-IBRS</model>
> </cpu>
> <clock offset='utc'>
> <timer name='rtc' tickpolicy='catchup'/>
> <timer name='pit' tickpolicy='delay'/>
> <timer name='hpet' present='no'/>
> </clock>
> <on_poweroff>destroy</on_poweroff>
> <on_reboot>restart</on_reboot>
> <on_crash>destroy</on_crash>
> <pm>
> <suspend-to-mem enabled='no'/>
> <suspend-to-disk enabled='no'/>
> </pm>
> <devices>
> <emulator>/qemu/x86_64-softmmu/qemu-system-x86_64</emulator>
> <disk type='file' device='disk'>
> <driver name='qemu' type='qcow2'/>
> <source file='/var/lib/libvirt/images/vm.img'/>
> <target dev='hda' bus='ide'/>
> <address type='drive' controller='0' bus='0' target='0' unit='0'/>
> </disk>
> <controller type='usb' index='0' model='ich9-ehci1'>
> <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x7'/>
> </controller>
> <controller type='usb' index='0' model='ich9-uhci1'>
> <master startport='0'/>
> <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0' multifunction='on'/>
> </controller>
> <controller type='usb' index='0' model='ich9-uhci2'>
> <master startport='2'/>
> <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x1'/>
> </controller>
> <controller type='usb' index='0' model='ich9-uhci3'>
> <master startport='4'/>
> <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x2'/>
> </controller>
> <controller type='ide' index='0'>
> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
> </controller>
> <controller type='pci' index='0' model='pci-root'/>
> <interface type='bridge'>
> <mac address='f2:ff:ff:ff:ff:07'/>
> <source bridge='br0:'/>
> <model type='e1000'/>
> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
> </interface>
> <serial type='tcp'>
> <source mode='bind' host='10.210.27.119' service='9999'/>
> <protocol type='telnet'/>
> <target type='isa-serial' port='0'>
> <model name='isa-serial'/>
> </target>
> </serial>
> <console type='tcp'>
> <source mode='bind' host='10.210.27.119' service='9999'/>
> <protocol type='telnet'/>
> <target type='serial' port='0'/>
> </console>
> <input type='mouse' bus='ps2'/>
> <input type='keyboard' bus='ps2'/>
> <memballoon model='virtio'>
> <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
> </memballoon>
> </devices>
> <qemu:commandline>
> <qemu:env name='CONFIG_FILE' value='/opt/cfg/qemu.cfg'/>
> </qemu:commandline>
> </domain>
--
Andrea Bolognani / Red Hat / Virtualization
5 years, 5 months
[libvirt-users] Failed to probe capabilities on libvirt v5.1.0
by Vladik Romanovsky
Hi everyone,
Unfortunately, I'm facing an issue with libvirt 5.1.0 when probing capabilities.
Failed to probe capabilities for /usr/bin/qemu-system-x86_64: internal
error: Failed to start QEMU binary /usr/bin/qemu-system-x86_64 for
probing: qemu-system-x86_64: cannot create PID file: Cannot open pid
file: Permission denied
I see that the qmp directory is being created, however, it belongs to
root instead of qemu:
/var/lib/libvirt/qemu/qmp-U1w6o6:
0 drwx------. 2 root root 6 Apr 11 14:46 qmp-U1w6o6
The user and group are set to "qemu" in /etc/libvirt/qemu.conf
I would appreciate any pointers.
Thank you!
Vladik
5 years, 5 months
[libvirt-users] Network hooks for ethernet interfaces
by Ruben Kerkhof
Hi all,
I have a hook script, /etc/libvirt/hooks/network, that doesn't seem to
be called when I attach an interface with type 'ethernet' with this
xml snippet:
<interface type='ethernet'>
<model type="virtio"/>
<source>
<ip address="10.100.0.1" prefix="24" peer="10.100.0.10"/>
</source>
</interface>
https://www.libvirt.org/hooks.html#intro says
"A network is started or stopped or an interface is plugged/unplugged
to/from the network (since 1.2.2)".
While I don't have a network defined in xml, I'd expect this to work
just as well for 'ethernet' type interfaces. Am I wrong?
Kind regards,
Ruben Kerkhof
5 years, 5 months
[libvirt-users] CGroup V2 Support
by ITeng A
Dear all
Does the current version of libvirt support the new cgroup v2 ?
I am running KVM qemu VMs on Ubuntu with linux Kernel 4.18 with cgroup v1
and I would like to use Cgroup v2 but we I mount cgroup v2 the libvirt
virtualization daemon fail to start with error message that it cant create
cgroup /system.slice/libvirtd.service no such file or directory.
kind regards,
Asraa Ali
5 years, 5 months
[libvirt-users] Guest interface names not same as configured name
by PR PR
Hi,
I am creating a guest with following description for interfaces in the xml
using virsh create xml command. For some reason, the guest interface names
in the VM dont match the names specified in the xml. Is there a way to make
guest interface names predictable?
Following is the qemu version on host
dpkg --list | grep -i qemu
ii qemu-kvm 1:2.11+dfsg-1ubuntu7.10
amd64 QEMU Full virtualization on x86 hardware
<interface type='user'>
<mac address='52:54:00:17:0b:e7'/>
<guest dev='eth0'/>
<model type='e1000'/>
<alias name='net0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03'
function='0x0'/>
</interface>
<interface type='ethernet'>
<mac address='52:54:00:ee:70:34'/>
<target dev='net0'/>
<guest dev='Ethernet0'/>
<model type='rtl8139'/>
<alias name='net1'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05'
function='0x0'/>
</interface>
Thanks
5 years, 6 months