Migration via qemu+ssh using a given private ssh key possible ?
by Oliver Dzombic
Hi,
happy new year!
Is there a way to tell libvirt to migrate an instance via qemu+ssh using
a specific ssh key ?
It seems libvirt will always try to use the .ssh/id_rsa private key.
But i would like to somehow tell libvirt to use a specific private ssh
key. ( At best via command line argument ).
Is that possible somehow ? Or something else similar ?
Thank you!
--
Mit freundlichen Gruessen / Best regards
Oliver Dzombic
Layer7 Networks
mailto:info@layer7.net
Anschrift:
Layer7 Networks GmbH
Zum Sonnenberg 1-3
63571 Gelnhausen
HRB 96293 beim Amtsgericht Hanau
Geschäftsführung: Oliver Dzombic
UST ID: DE259845632
3 years, 9 months
about the script /etc/qemu-ifup with nmcli command
by Yalan Zhang
Hi,
I have tried the qemu-ifup script as below with nmcli command as brctl is
deprecated on rhel8, but the guest network can not work.
I think the script needs update. Could you please help to have a look?
Thank you in advance.
1. prepare a linux bridge on the host named br0;
2. prepare the qemu-ifup script as below:
# cat /etc/qemu-ifup
#!/bin/bash
# A br0 bridge should be already set up.
# Compare with:
# http://en.wikibooks.org/wiki/QEMU/Networking#qemu-ifup
#
# For the bridge setup, see:
# http://wiki.libvirt.org/page/Networking#Fedora.2FRHEL_Bridging
# http://gist.github.com/393525
ip link set "$1" up
nmcli c add type bridge-slave ifname $1 con-name $1 master br0 autoconnect
yes
3. start vm with below interface setting:
# virsh dumpxml rh | grep /interface -B5
<interface type='ethernet'>
<mac address='52:54:00:79:ba:dd'/>
<script path='/etc/qemu-ifup'/>
<model type='virtio'/>
<address type='pci' domain='0x0000' bus='0x04' slot='0x00'
function='0x0'/>
</interface>
# virsh start rh
Domain rh started
4.check on guest, the interface can not get dhcp ip address;
5. check on host,
# nmcli con
NAME UUID TYPE DEVICE
br0 f68f73c7-10ee-40c1-bb09-3366d11ac896 bridge br0
...
vnet0 90a48d77-dccc-4b59-98f5-09f8cbd62458 ethernet --
# nmcli dev
DEVICE TYPE STATE CONNECTION
br0 bridge connected br0
...
vnet0 tun unmanaged --
6. hotplug a bridge type interface and compare the tap devices:
# virsh attach-interface rh bridge br0 --model virtio
Interface attached successfully
# nmcli con
NAME UUID TYPE DEVICE
br0 f68f73c7-10ee-40c1-bb09-3366d11ac896 bridge br0
vnet1 07c2a1f8-396f-4d5f-b61f-ef2ddb42ed93 tun vnet1 --->the
hot-plugged one
...
vnet0 90a48d77-dccc-4b59-98f5-09f8cbd62458 ethernet -- ----> the
ethernet one
# nmcli dev
DEVICE TYPE STATE CONNECTION
vnet1 tun connected (externally) vnet1 --->the
hot-plugged one
vnet0 tun unmanaged -- ----> the ethernet one
...
7. from the outputs above, the back-end tun device for ethernet type
interface is unmanaged.
I don't know how to update the script to fix it. Could you please help?
-------
Best Regards,
Yalan Zhang
IRC: yalzhang
3 years, 9 months
virt-manager connection fails with 'qemu unexpectedly closed the monitor'
by John Paul Adrian Glaubitz
Hi!
I recently ran into a problem when connecting to libvirtd 6.9.0 on Debian unstable
and trying to import an existing image with Windows 7.
Upon finishing the wizard and starting the instance, the import process fails
with the following error message:
Unable to complete install: 'internal error: qemu unexpectedly closed the monitor'
Traceback (most recent call last):
File "/usr/share/virt-manager/virtManager/asyncjob.py", line 65, in cb_wrapper
callback(asyncjob, *args, **kwargs)
File "/usr/share/virt-manager/virtManager/createvm.py", line 2081, in _do_async_install
installer.start_install(guest, meter=meter)
File "/usr/share/virt-manager/virtinst/install/installer.py", line 731, in start_install
domain = self._create_guest(
File "/usr/share/virt-manager/virtinst/install/installer.py", line 679, in _create_guest
domain = self.conn.createXML(install_xml or final_xml, 0)
File "/usr/lib64/python3.8/site-packages/libvirt.py", line 4366, in createXML
raise libvirtError('virDomainCreateXML() failed')
libvirt.libvirtError: internal error: qemu unexpectedly closed the monitor
Since this error message is rather generic, I don't know where to start debugging.
Does anyone know how to increase verbosity here to get an error message that might be
more helpful?
Thanks,
Adrian
--
.''`. John Paul Adrian Glaubitz
: :' : Debian Developer - glaubitz(a)debian.org
`. `' Freie Universitaet Berlin - glaubitz(a)physik.fu-berlin.de
`- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
3 years, 10 months
Unexplicable permission error when trying to read a qemu firmware file
by Emmanuel Kasper
Hi
I want to create a CoreOS VM following the steps mentioned at
https://docs.fedoraproject.org/en-US/fedora-coreos/getting-started,
using a Debian 11 (bullseye) system.
I am thus creating a VM with the following virt-install command:
virt-install --connect="qemu:///system" --name=coreos \
--vcpus=2 --memory=2048 \
--os-variant=fedora29 --import --graphics=none \
--disk="size=10,backing_store=$PWD/fedora-coreos-33.20201201.3.0-qemu.x86_64.qcow2"
\
--qemu-commandline="-fw_cfg
name=opt/com.coreos/config,file=/tmp/example.ign"
which spits some warnings and this mysterious error
2020-12-29T16:52:03.858938Z qemu-system-x86_64: warning: host doesn't
support requested feature: MSR(48FH).vmx-exit-load-perf-global-ctrl [bit 12]
2020-12-29T16:52:03.858941Z qemu-system-x86_64: warning: host doesn't
support requested feature: MSR(490H).vmx-entry-load-perf-global-ctrl
[bit 13]
2020-12-29T16:52:03.864778Z qemu-system-x86_64: -fw_cfg
name=opt/com.coreos/config,file=/tmp/example.ign: can't load
/tmp/example.ign: Failed to open file “/tmp/example.ign”: Permission denied
the file /tmp/example.ign is perfectly world readable,
-rw-rw-rw- 1 manu manu 1130 Dec 29 17:23 /tmp/example.ign
so I am puzzled at what could cause this permission error.
on a RHEL8 system, I had the same error, and was able to fix by setting
a security context on the firmware file:
sudo semanage fcontext --add --type virt_content_t /tmp/example.ign
restorecon /tmp/example.ign
now this Debian system does not selinux installed at all.
ls -dZ /
? /
I could also read the qemu firmware file when using the qemu:///session
connection
any pointers where to look for ?
Emmanuel
3 years, 10 months
Isolated bridge does not bridge
by Paul van der Vlis
Hello,
I want to do some testing and I have removed two VM's from the bridge
what connects them to internet, and added them to another isolated
bridge what's not connected to internet. Problem is that I cannot reach
the other host in the isolated network.
Something like this:
virsh shutdown kvm66
virsh shutdown kvm68
brctl delif br0 vnet10 vnet6 # the interfaces of kvm66 and kvm68
brctl addbr br1
brctl addif br1 vnet10 vnet6
Then I've replaced br0 to br1 in the XML of both VM's with "virsh edit".
Then I did start the VM's using the serial console (no network):
virsh start --console kvm66
virsh start --console kvm68
I cannot ping from one machine to the other. Why??
With regards,
Paul
--
Paul van der Vlis Linux systeembeheer Groningen
https://www.vandervlis.nl/
3 years, 10 months
How to open listener of Libvirt ?
by tommy
Hi,every one:
My Ubuntu is : 20.04 LTS, and I using libvirtd on it to manage KVM vm, but
now I can not open listener function of the libvirtd.
SYSTEM SOCKET ACTIVATION
The libvirtd daemon is capable of starting in two modes.
In the traditional mode, it will create and listen on UNIX sockets
itself. If the --listen parameter is given, it will also listen on TCP/IP
socket(s),
according to the listen_tcp and listen_tls options in
/etc/libvirt/libvirtd.conf
In socket activation mode, it will rely on systemd to create and
listen on the UNIX, and optionally TCP/IP, sockets and pass them as
pre-opened file de�
scriptors. In this mode, it is not permitted to pass the --listen
parameter, and most of the socket related config options in
/etc/libvirt/libvirtd.conf
will no longer have any effect. To enable TCP or TLS sockets use
either
$ systemctl start libvirtd-tls.socket
Or
$ systemctl start libvirtd-tcp.socket
But, on my system, there are no such service like libvirtd-tls.socket or
libvirtd-tcp.socket.
root@ubts1:~# systemctl | grep libvirt
libvirt-guests.service
loaded active exited Suspend/Resume Running libvirt Guests
libvirtd.service
loaded active running Virtualization daemon
libvirtd-admin.socket
loaded active running Libvirt admin socket
libvirtd-ro.socket
loaded active running Libvirt local read-only socket
libvirtd.socket
loaded active running Libvirt local socket
How can I open the listener ?
Thanks!
3 years, 10 months