Way to skip check for 'libvirt-qemu' group and user while installing guest
by john doe
Hi,
Debian Buster here, I'm trying to install a guest on a sshfs mount,
Libvirt is checking for the user and group 'libvirt-qemu'.
Is there a way to avoid that check or has anyone a way to use a mount
used by sshfs with Libvirt?
The SSH server has no group with the UID/GID of 'libvirt-qemu'.
--
John Doe
4 years, 1 month
Constant error logging
by Digimer
Hi all,
I've got a (pacemaker + drbd) cluster running VMs. When the VM is
running on another node, the local storage is Secondary, meaning that it
can't be read or otherwise touched. As such, virsh thinks there is no
storage and constantly prints errors like:
====
Aug 14 19:25:24 mk-a02n01.digimer.ca libvirtd[1655]: 2020-08-14
23:25:24.812+0000: 1679: error : qemuOpenFileAs:3119 : Failed to open
file '/dev/drbd/by-res/srv01-sql/0': No such file or directory
Aug 14 19:25:24 mk-a02n01.digimer.ca libvirtd[1655]: 2020-08-14
23:25:24.812+0000: 1679: error : qemuOpenFileAs:3119 : Failed to open
file '/dev/drbd/by-res/srv01-sql/1': No such file or directory
Aug 14 19:25:24 mk-a02n01.digimer.ca libvirtd[1655]: 2020-08-14
23:25:24.812+0000: 1679: error : qemuOpenFileAs:3119 : Failed to open
file '/dev/drbd/by-res/srv07-el6/0': Wrong medium type
===
To the system logs (journald), about once every second or two.
Is there any way to tell libvirtd not to complain about this?
Thanks
--
Digimer
Papers and Projects: https://alteeve.com/w/
"I am, somehow, less interested in the weight and convolutions of
Einstein’s brain than in the near certainty that people of equal talent
have lived and died in cotton fields and sweatshops." - Stephen Jay Gould
4 years, 1 month
Problem with xen config
by Christoph
Hi all,
I 've such a config on xen (4.14):
name = "marax.chao5.int"
uuid = "e0de3cb7-3937-417d-8d63-b0993b377b6a"
maxmem = 16384
memory = 16384
kernel = '/usr/lib64/xen/boot/hvmloader'
vcpus = 16
rtc_timeoffset = 0
localtime = 1
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
vif = [
"mac=00:16:3e:05:01:10,bridge=xenbr5,script=vif-bridge,model=e1000" ]
parallel = "none"
serial = "none"
type = "hvm"
loader = "/usr/lib64/xen/boot/hvmloader"
disk = [ "phy:/dev/mapper/marax_c,hda,rw",
"phy:/dev/vg_lilith/lv_marax_d,hdb,rw" ]
max_grant_frames = "128"
pci = [ "01:00.0", "01:00.1", "01:00.2", "01:00.3", "00:1f.3", "05:00.0"
]
pci_permissive = 1
keymap = "de"
vnclisten="0.0.0.0"
pci_power_mgmt=1
xen_platform_pci=1
pci_msitranslate=1
viridian=1
hpet=1
acpi=1
apic=1
pae=1
I want to convert it to a xml format for use it with libvirt/virsh but I
get an error:
"error: An error occurred, but the cause is unknown"
If I comment out the line with pci = [ "01:00.0", "01:00.1", "01:00.2",
"01:00.3", "00:1f.3", "05:00.0" ]
then it works but I dont see the settings like
xen_platform_pci=1
pci_msitranslate=1
pci_permissive = 1
max_grant_frames = "128
and the pci passthrough devices are not there...
Does libvirt doesnt support such a config?
--
------
Greetz
4 years, 1 month
pass-though Intel gpu int o a vm
by daggs
Greetings,
I have a server that run a vm with several nic pcie cards as pass-though.
the board has an intel gpu and the hdmi output is not used.
I thought of booting up another vm and pass the gpu into it.
I found several discussions on the subject stating that it isn't possible but all of them are several years old.
I wonder if that has changed? is there a way to pt the vga to a vm?
Thanks,
Dagg.
4 years, 1 month
Question for smbios
by David
I am reposting this because it's been 2 or 3 weeks.
Hello,
Hopefully this is the right place to send a question like this...
I'm attempting to automate creation of VMs using virt-install and a
cloud-init disk image. To get this to work, I need to specify the location
of the cloud-init configs by passing smbios key/value pairs.
Normally, -smbios is provided to qemu to do this. With virt-install, the
Internet says I should use --sysinfo. However, --sysinfo (as well as
--qemu-comandline) is reported as an invalid command flag, and it is not
present when I look at man virt-install and virt-install --help.
I am hoping someone on the list knows why this isn't working or can explain
how I might provide the arguments to qemu. The host is Debian 9. It is
up-to-date as far as package versions are concerned, as much as Debian 9
can be. I can't find any indication about why the arguments would have been
taken away.
Thanks!
4 years, 1 month
Installing Kali Linux using KVM virt-install tool
by Kaushal Shriyan
Hi,
I am trying to install kali-linux-2020.2-installer-amd64.iso (
https://www.kali.org/downloads/) using KVM virt-install tool
#virt-install --name=kalilinux --file=/linuxkvmaddgbdisk/kalilinux.img
--file-size=50 --nonsparse --vcpu=2 --ram=4096 --network=bridge:br0
--os-type=linux --os-variant=debian9 --graphics none
--location=/linuxkvmaddgbdisk/kali-linux-2020.2-installer-amd64.iso
--extra-args="console=ttyS0
Starting install...
Retrieving file .treeinfo...
| 0 B 00:00:00
Retrieving file content...
| 0 B 00:00:00
Retrieving file info...
| 104 B 00:00:00
Retrieving file info...
| 104 B 00:00:00
Retrieving file info...
| 104 B 00:00:00
ERROR Could not find an installable distribution at
'/linuxkvmaddgbdisk/kali-linux-2020.2-installer-amd64.iso': The URL could
not be accessed, maybe you mistyped?
The location must be the root directory of an install tree.
See virt-install man page for various distro examples.
Domain installation does not appear to have been successful.
If it was, you can restart your domain by running:
virsh --connect qemu:///system start kalilinux
otherwise, please restart your installation.
#virt-install --name=kalilinux --file=/linuxkvmaddgbdisk/kalilinux.img
--file-size=50 --nonsparse --vcpu=2 --ram=4096 --network=bridge:br0
--os-type=linux --os-variant=debian9 --graphics none
--cdrom=/linuxkvmaddgbdisk/kali-linux-2020.2-installer-amd64.iso
--extra-args="console=ttyS0"
ERROR --extra-args only work if specified with --location. See the man
page for examples of using --location with CDROM media
I did not find kali OS details to provide an option for* --os-variant= * When
I ran osinfo-query os | grep kali it did not return anything.
Any help will be highly appreciated and I look forward to hearing from you.
Thanks in advance.
Best Regards,
Kaushal
4 years, 1 month
guest-fsfreeze-freeze freezes all mounted block devices
by Marc Roos
I wondered if anyone here can confirm that
virsh qemu-agent-command domain '{"execute":"guest-fsfreeze-freeze"}'
Freezes all mounted block devices filesystems. So if I use 4 block
devices they are all frozen for snapshotting. Or just the root fs?
4 years, 1 month
Libvirtd Fails to Launch First Time
by Ken Swenson
Hello,
I'm having a quite odd issue with libvirtd. I have it set to start on
boot via systemd service, however it seems to fail and the service
'succeeds' and does not continue running the daemon. There is nothing in
the journal logs however the libvirtd debug logs seem to show
2020-08-08 13:55:26.362+0000: 1386: debug : virCommandRunAsync:2619
: About to run ip link set lo netns -1
2020-08-08 13:55:26.362+0000: 1386: debug : virFileClose:134 :
Closed fd 26
2020-08-08 13:55:26.362+0000: 1386: debug : virFileClose:134 :
Closed fd 28
2020-08-08 13:55:26.362+0000: 1386: debug : virFileClose:134 :
Closed fd 30
2020-08-08 13:55:26.362+0000: 1386: debug : virCommandRunAsync:2621
: Command result 0, with PID 1610
2020-08-08 13:55:26.390+0000: 1386: debug : virCommandRun:2461 :
Result fatal signal 2, stdout: '' stderr: 'RTNETLINK answers: No
such process
I am not sure if this is relevant to the problem or not as I do not see
anything else in the logs that indicates an issue during the launch
process, other than many file descriptors closing but I assume that is
normal. If I then start libvirtd a second time after it has been
launched once it runs fine. I don't believe it is a race condition on
boot as if I disable the auto start and manually start it it will still
fail in the same way the first time.
If anyone has any ideas on what I may be able to check to fix this I
would really appreciate it. It has been bugging me for some time now.
Thank you,
Ken
4 years, 1 month
[libvirt-users] Question about disabling UFO on guest
by Bao Nguyen
Hello everyone,
I would like to ask a question regarding to disable UFO of virtio vNIC in
my guest. I have read the document at https://libvirt.org/formatdomain.html
*host*
The csum, gso, tso4, tso6, ecn and ufo attributes with possible
values on and off can be used to turn off host offloading options. By
default, the supported offloads are enabled by QEMU. *Since 1.2.9 (QEMU
only)* The mrg_rxbuf attribute can be used to control mergeable rx buffers
on the host side. Possible values are on (default) and off. *Since 1.2.13
(QEMU only)*
*guest*
The csum, tso4, tso6, ecn and ufo attributes with possible
values on and off can be used to turn off guest offloading options. By
default, the supported offloads are enabl
ed by QEMU.
*Since 1.2.9 (QEMU only)*
Then I disabled UFO on my vNIC on guest as the following configuration
<devices>
<interface type='network'>
<source network='default'/>
<target dev='vnet1'/>
<model type='virtio'/>
<driver name='vhost' txmode='iothread' ioeventfd='on' event_idx='off'
queues='5' rx_queue_size='256' tx_queue_size='256'>
*<host gso='off' ufo='off' />*
*<guest ufo='off'/>*
</driver>
</interface>
</devices>
Then I reboot my node to get the change effect and it works. However, can I
disable the UFO without touching the host OS? or it always has to disable
on both host and guest like that?
Thanks,
Brs,
Natsu
4 years, 2 months
Libvirt qemu-system-x86_64 on ppc64le no multi threading
by Kim-Norman Sahm
hi,
i’m running Debian 10 on POWER9 and would like to spawn x86_64 emulated VMs.
The virtual machine is configured to run with 8 vpus but it’s very slow.
On the host you can see that the qemu-system-x86_64 process is using just one core!
Ppc64le guests are using multi cores, so its looks like an config problem or software bug with the x86 emulator.
<domain type='qemu'>
<name>ubuntu</name>
<uuid>a38148e3-6a85-4793-8d58-8725e8bef25a</uuid>
<metadata>
<libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0">
<libosinfo:os id="http://debian.org/debian/10"/>
</libosinfo:libosinfo>
</metadata>
<memory unit='KiB'>33554432</memory>
<currentMemory unit='KiB'>33554432</currentMemory>
<vcpu placement='static'>8</vcpu>
<os>
<type arch='x86_64' machine='pc-q35-5.0'>hvm</type>
<boot dev='hd'/>
</os>
<features>
<acpi/>
<apic/>
</features>
<cpu mode='custom' match='exact' check='none'>
<model fallback='forbid'>qemu64</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>/usr/bin/qemu-system-x86_64</emulator>
<disk type='file' device='disk'>
<driver name='qemu' type='qcow2'/>
<source file='/var/lib/libvirt/images/ubuntu-x86_64.qcow2'/>
<target dev='vda' bus='virtio'/>
<address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
</disk>
<disk type='file' device='cdrom'>
<driver name='qemu' type='raw'/>
<target dev='sda' bus='sata'/>
<readonly/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
<controller type='usb' index='0' model='qemu-xhci' ports='15'>
<address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x0'/>
</controller>
<controller type='sata' index='0'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
</controller>
<controller type='pci' index='0' model='pcie-root'/>
<controller type='virtio-serial' index='0'>
<address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
</controller>
<controller type='pci' index='1' model='pcie-root-port'>
<model name='pcie-root-port'/>
<target chassis='1' port='0x10'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0' multifunction='on'/>
</controller>
<controller type='pci' index='2' model='pcie-root-port'>
<model name='pcie-root-port'/>
<target chassis='2' port='0x11'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x1'/>
</controller>
<controller type='pci' index='3' model='pcie-root-port'>
<model name='pcie-root-port'/>
<target chassis='3' port='0x12'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x2'/>
</controller>
<controller type='pci' index='4' model='pcie-root-port'>
<model name='pcie-root-port'/>
<target chassis='4' port='0x13'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x3'/>
</controller>
<controller type='pci' index='5' model='pcie-root-port'>
<model name='pcie-root-port'/>
<target chassis='5' port='0x14'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x4'/>
</controller>
<controller type='pci' index='6' model='pcie-root-port'>
<model name='pcie-root-port'/>
<target chassis='6' port='0x15'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x5'/>
</controller>
<controller type='pci' index='7' model='pcie-root-port'>
<model name='pcie-root-port'/>
<target chassis='7' port='0x16'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x6'/>
</controller>
<interface type='bridge'>
<mac address='52:54:00:cc:08:18'/>
<source bridge='br0'/>
<model type='virtio'/>
<address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
</interface>
<serial type='pty'>
<target type='isa-serial' port='0'>
<model name='isa-serial'/>
</target>
</serial>
<console type='pty'>
<target type='serial' port='0'/>
</console>
<channel type='unix'>
<target type='virtio' name='org.qemu.guest_agent.0'/>
<address type='virtio-serial' controller='0' bus='0' port='1'/>
</channel>
<input type='tablet' bus='usb'>
<address type='usb' bus='0' port='1'/>
</input>
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<graphics type='vnc' port='-1' autoport='yes'>
<listen type='address'/>
</graphics>
<video>
<model type='qxl' ram='65536' vram='65536' vgamem='16384' heads='1' primary='yes'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
</video>
<memballoon model='virtio'>
<address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x0'/>
</memballoon>
<rng model='virtio'>
<backend model='random'>/dev/urandom</backend>
<address type='pci' domain='0x0000' bus='0x06' slot='0x00' function='0x0'/>
</rng>
</devices>
</domain>
# ps ax|grep qemu
31546 ? Sl 2:38 /usr/bin/qemu-system-x86_64 -name guest=ubuntu,debug-threads=on -S -object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain-59-ubuntu/master-key.aes -machine pc-q35-5.0,accel=tcg,usb=off,dump-guest-core=off -cpu qemu64 -m 32768 -overcommit mem-lock=off -smp 8,sockets=8,cores=1,threads=1 -uuid a38148e3-6a85-4793-8d58-8725e8bef25a -no-user-config -nodefaults -chardev socket,id=charmonitor,fd=32,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc,driftfix=slew -no-hpet -no-reboot -global ICH9-LPC.disable_s3=1 -global ICH9-LPC.disable_s4=1 -boot strict=on -device pcie-root-port,port=0x10,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x2 -device pcie-root-port,port=0x11,chassis=2,id=pci.2,bus=pcie.0,addr=0x2.0x1 -device pcie-root-port,port=0x12,chassis=3,id=pci.3,bus=pcie.0,addr=0x2.0x2 -device pcie-root-port,port=0x13,chassis=4,id=pci.4,bus=pcie.0,addr=0x2.0x3 -device pcie-root-port,port=0x14,chassis=5,id=pci.5,bus=pcie.0,addr=0x2.0x4 -device pcie-root-port,port=0x15,chassis=6,id=pci.6,bus=pcie.0,addr=0x2.0x5 -device pcie-root-port,port=0x16,chassis=7,id=pci.7,bus=pcie.0,addr=0x2.0x6 -device qemu-xhci,p2=15,p3=15,id=usb,bus=pci.2,addr=0x0 -device virtio-serial-pci,id=virtio-serial0,bus=pci.3,addr=0x0 -blockdev {"driver":"file","filename":"/var/lib/libvirt/images/ubuntu-x86_64.qcow2","node-name":"libvirt-2-storage","auto-read-only":true,"discard":"unmap"} -blockdev {"node-name":"libvirt-2-format","read-only":false,"driver":"qcow2","file":"libvirt-2-storage","backing":null} -device virtio-blk-pci,bus=pci.4,addr=0x0,drive=libvirt-2-format,id=virtio-disk0,bootindex=2 -blockdev {"driver":"file","filename":"/var/lib/libvirt/images/ubuntu-20.04-live-server-amd64.iso","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"} -blockdev {"node-name":"libvirt-1-format","read-only":true,"driver":"raw","file":"libvirt-1-storage"} -device ide-cd,bus=ide.0,drive=libvirt-1-format,id=sata0-0-0,bootindex=1 -netdev tap,fd=34,id=hostnet0 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:cc:08:18,bus=pci.1,addr=0x0 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -chardev socket,id=charchannel0,fd=35,server,nowait -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=org.qemu.guest_agent.0 -device usb-tablet,id=input0,bus=usb.0,port=1 -vnc 127.0.0.1:1 -device qxl-vga,id=video0,ram_size=67108864,vram_size=67108864,vram64_size_mb=0,vgamem_mb=16,max_outputs=1,bus=pcie.0,addr=0x1 -device virtio-balloon-pci,id=balloon0,bus=pci.5,addr=0x0 -object rng-random,id=objrng0,filename=/dev/urandom -device virtio-rng-pci,rng=objrng0,id=rng0,bus=pci.6,addr=0x0 -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny -msg timestamp=on
Does anybody knows this problem?
Best regards
Kim
4 years, 2 months