[libvirt-users] [virtual interface] detach interface during boot succeed with no changes
by Yalan Zhang
Hi guys,
when I detach an interface from vm during boot (vm boot not finished), it
always fail. I'm not sure if there is an existing bug. I have
confirmed with someone that for disk, there is similar behavior, if
this is also acceptable?
# virsh destroy rhel7.2; virsh start rhel7.2 ;sleep 2; virsh
detach-interface rhel7.2 network 52:54:00:98:c4:a0; sleep 2; virsh
dumpxml rhel7.2 |grep /interface -B9
Domain rhel7.2 destroyed
Domain rhel7.2 started
Interface detached successfully
<address type='pci' domain='0x0000' bus='0x00' slot='0x06'
function='0x0'/>
</controller>
<interface type='network'>
<mac address='52:54:00:98:c4:a0'/>
<source network='default' bridge='virbr0'/>
<target dev='vnet0'/>
<model type='rtl8139'/>
<alias name='net0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03'
function='0x0'/>
</interface>
When I detach after the vm boot, expand the sleep time to 10, it will succeed.
# virsh destroy rhel7.2; virsh start rhel7.2 ;sleep 10; virsh
detach-interface rhel7.2 network 52:54:00:98:c4:a0; sleep 2; virsh
dumpxml rhel7.2 |grep /interface -B9
Domain rhel7.2 destroyed
Domain rhel7.2 started
Interface detached successfully
-------
Best Regards,
Yalan Zhang
IRC: yalzhang
Internal phone: 8389413
2 years, 2 months
a test email (& dmarc) @admins
by lejeczek
hi guys.
I sent email a while ago and I wonder, also having not
received a single reply, because I did not get that own
email - is there are problem I'm having here or DMARC(yahoo
& others?) are not fixed in by this mailing list - would an
admin(anybody) know?
many thanks, L.
2 years, 11 months
Need more doc for libvirt-console-proxy
by Guy Godfroy
Hello,
I'm making a web app for my company that will enable different teams to
manage their own VMs. I wish to make possible to interact with each VM
console, so I plan to use some xterm.js with websockets.
So I discovered libvirt-console-proxy [1] when I looked for something to
put a libvirt console into a websocket. That seems like the right tool
for the job.
The only doc I found is this article from 2017 [2]. After trying to
understand from this article and from --help, I still have many
questions. I am really bad at reading code so I can't even get answers
from the sources.
My main concern is: How a client is supposed to talk to the proxy? It is
said that a security token must be provided. How? HTTP header? Which
header? Am I missing something in websocket protocol? I think an example
client implementation would help a lot.
Also, I tried to use virtconsoleresolveradm to set up metadata on my
domains like explained in the article [1] :
./virtconsoleresolveradm enable milou
Enabled access to domain 'milou'
But that doesn't seem to do anything (except defining the metadata
namespace in the XML):
virsh metadata milou http://libvirt.org/schemas/console-proxy/1.0
<consoles/>
I precise that I have already this in my XML:
<serial type='pty'>
<target type='isa-serial' port='0'>
<model name='isa-serial'/>
</target>
</serial>
<console type='pty'>
<target type='serial' port='0'/>
</console>
Should I remove that? Should I edit that?
Thanks for your help.
Guy Godfroy
[1] https://gitlab.com/libvirt/libvirt-console-proxy
[2]
https://www.berrange.com/posts/2017/01/26/announce-new-libvirt-console-pr...
3 years, 1 month
Are secrets hidden from admins too - ?
by lejeczek
Hi guys.
On a remote & "shared" systems - are private secrets
completely 100% safe? Can root get to those?
(naturally excluding hacking of unknown bugs & exploits and
theories such as "no computer system is ultimately safe")
And if answer is yes then - do you have any best practices
for storing & managing of those secrets?
many thanks, L.
3 years, 1 month
How to move emulated SWTPM data to a new VM
by Sam Varshavchik
I have an existing VM with an emulated TPM module.
I'm trying to create a replacement VM, pointing to the same disk image that
the existing VM uses, and also migrate the existing TPM module to it.
Would just copying everything in /var/lib/libvirt/swtpm/<UUID> work? I did
some practice runs, and it seems that virt-manager immediately starts the
new VM as soon as it creates one, so I need to quickly turn it off, go look
up its new UUID, and copy over the TPM files?
3 years, 2 months
security driver mismatch blocks live migration..
by Jiatong Shen
Hello community,
I am seeing following error during performing a live migration
libvirtError: unsupported configuration: Unable to find security driver for
model apparmor
The root cause is the destination libvirtd runs inside a container and
apparmor profile is not enabled. Right now I am researching how to enable
apparmor profile for a k8s pod.
But Is it possible to do a live migrate an instance and disable security
driver at the same time?
Thank you.
--
Best Regards,
Jiatong Shen
3 years, 2 months
internal error: Network is already in use by interface virbr0
by Michael Ströder
HI!
I'm using libvirt 7.7.0 on openSUSE Tumbleweed.
Until recently everything just worked. But now my virtual NAT network is
not usable anymore.
Starting a VM I get this error:
# virsh start ae-dir-suse-p1
error: Failed to start domain 'ae-dir-suse-p1'
error: Requested operation is not valid: network 'vnet1' is not active
Manually starting the network does not work either:
# virsh net-start vnet1
error: Failed to start network vnet1
error: internal error: Network is already in use by interface virbr0
In syslog I find:
libvirtd: 6325: error : networkCheckRouteCollision:296 : internal error:
Network is already in use by interface virbr0
What does that mean? Where to look for a config error?
Ciao, Michael.
3 years, 2 months
Compiling libvirt on ubuntu
by Or Ozeri
Hi,
I'm trying to compile libvirt on ubuntu machine.
I installed meson 0.59.1 using pip.
Then installed a few more packages that were required by meson build:
sudo apt-get install libxml2-utils xsltproc libpciaccess-dev ninja-build
Finally, I followed the simple instructions over here: https://libvirt.org/compiling.html
xz -dc libvirt-7.7.0.tar.xz | tar xvf -
cd libvirt-7.7.0
meson build
ninja -C build
The last command fails with:
FAILED: src/libvirt-admin.so.0.7007.0
cc -o src/libvirt-admin.so.0.7007.0 src/libvirt_probes.o src/libvirt-admin.so.0.7007.0.p/meson-generated_.._admin_admin_protocol.c.o src/libvirt-admin.so.0.7007.0.p/admin_libvirt-admin.c.o src/libvirt-admin.so.0.7007.0.p/datatypes.c.o -Wl,--as-needed -Wl,--no-undefined -shared -fPIC -Wl,--start-group -Wl,-soname,libvirt-admin.so.0 '-Wl,-rpath,$ORIGIN/:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' -Wl,-rpath-link,/home/oro/ozeri/libvirt-7.7.0/build/src src/libvirt.so.0.7007.0 -Wl,--version-script=/home/oro/ozeri/libvirt-7.7.0/build/src/admin/libvirt_admin.syms -Wl,-z,nodelete /usr/lib/x86_64-linux-gnu/libcap-ng.so /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libdevmapper.so /usr/lib/x86_64-linux-gnu/libgnutls.so -Wl,-z,relro -Wl,-z,now -Wl,--no-copy-dt-needed-entries /usr/lib/x86_64-linux-gnu/libglib-2.0.so /usr/lib/x86_64-linux-gnu/libgobject-2.0.so /usr/lib/x86_64-linux-gnu/libgio-2.0.so /usr/lib/x86_64-linux-gnu/libxml2.so /usr/lib/x86_64-linux-gnu/libyajl.so -Wl,--end-group
/usr/bin/ld: src/libvirt-admin.so.0.7007.0.p/admin_libvirt-admin.c.o: in function `callFull':
/home/oro/ozeri/libvirt-7.7.0/build/../src/admin/admin_remote.c:99: undefined reference to `virNetClientProgramCall'
/usr/bin/ld: src/libvirt-admin.so.0.7007.0.p/admin_libvirt-admin.c.o: in function `remoteAdminConnectClose':
/home/oro/ozeri/libvirt-7.7.0/build/../src/admin/admin_remote.c:197: undefined reference to `virNetClientSetCloseCallback'
/usr/bin/ld: /home/oro/ozeri/libvirt-7.7.0/build/../src/admin/admin_remote.c:199: undefined reference to `virNetClientClose'
/usr/bin/ld: src/libvirt-admin.so.0.7007.0.p/admin_libvirt-admin.c.o: in function `remoteAdminPrivNew':
/home/oro/ozeri/libvirt-7.7.0/build/../src/admin/admin_remote.c:225: undefined reference to `virNetClientNewUNIX'
/usr/bin/ld: /home/oro/ozeri/libvirt-7.7.0/build/../src/admin/admin_remote.c:228: undefined reference to `virNetClientProgramNew'
/usr/bin/ld: /home/oro/ozeri/libvirt-7.7.0/build/../src/admin/admin_remote.c:233: undefined reference to `virNetClientAddProgram'
/usr/bin/ld: src/libvirt-admin.so.0.7007.0.p/admin_libvirt-admin.c.o: in function `remoteAdminConnectOpen':
/home/oro/ozeri/libvirt-7.7.0/build/../src/admin/admin_remote.c:159: undefined reference to `virNetClientRegisterAsyncIO'
/usr/bin/ld: /home/oro/ozeri/libvirt-7.7.0/build/../src/admin/admin_remote.c:166: undefined reference to `virNetClientSetCloseCallback'
/usr/bin/ld: src/libvirt-admin.so.0.7007.0.p/admin_libvirt-admin.c.o: in function `virAdmConnectIsAlive':
/home/oro/ozeri/libvirt-7.7.0/build/../src/admin/libvirt-admin.c:397: undefined reference to `virNetClientIsOpen'
collect2: error: ld returned 1 exit status
[2/11] Linking target tests/virsystemdtest
FAILED: tests/virsystemdtest
cc -o tests/virsystemdtest src/libvirt_probes.o tests/virsystemdtest.p/virsystemdtest.c.o -Wl,--as-needed -Wl,--no-undefined -Wl,-export-dynamic -pie -Wl,--whole-archive -Wl,--start-group tests/libtest_utils.a -Wl,--no-whole-archive '-Wl,-rpath,$ORIGIN/../src' -Wl,-rpath-link,/home/oro/ozeri/libvirt-7.7.0/build/src src/libvirt.so.0.7007.0 -Wl,--no-copy-dt-needed-entries -Wl,-export-dynamic -ldl /usr/lib/x86_64-linux-gnu/libglib-2.0.so /usr/lib/x86_64-linux-gnu/libgobject-2.0.so /usr/lib/x86_64-linux-gnu/libgio-2.0.so /usr/lib/x86_64-linux-gnu/libgnutls.so /lib/x86_64-linux-gnu/libnl-3.so /usr/lib/x86_64-linux-gnu/libnl-route-3.so /usr/lib/x86_64-linux-gnu/libxml2.so /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libselinux.so /usr/lib/x86_64-linux-gnu/libyajl.so -Wl,--end-group -Wl,-export-dynamic
/usr/bin/ld: tests/virsystemdtest.p/virsystemdtest.c.o: in function `testActivationCreateFDs':
/home/oro/ozeri/libvirt-7.7.0/build/../tests/virsystemdtest.c:506: undefined reference to `virNetSocketNewListenUNIX'
/usr/bin/ld: /home/oro/ozeri/libvirt-7.7.0/build/../tests/virsystemdtest.c:513: undefined reference to `virNetSocketNewListenTCP'
/usr/bin/ld: tests/virsystemdtest.p/virsystemdtest.c.o: in function `testActivation':
/home/oro/ozeri/libvirt-7.7.0/build/../tests/virsystemdtest.c:548: undefined reference to `virNetSocketGetPath'
/usr/bin/ld: /home/oro/ozeri/libvirt-7.7.0/build/../tests/virsystemdtest.c:570: undefined reference to `virNetSocketGetPort'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
I verified that these functions do exist inside libvirt.so.0.7007.0, but for some reason the linker fails.
What am I doing wrong here?
Thanks,
Or
3 years, 2 months
virsh domifaddr domain does not show static IP
by Kaushal Shriyan
Hi,
I have assigned static IP for all the below KVM Guest VM's. Is there a way
to find out the IP of the below VM's from virsh utility or any
other utility? virsh domifaddr testdobssbahrainms does not show the static
IP.
# virsh list --all
Id Name State
-----------------------------------------
1 testdobssbahrainms running
2 testdosstomcatpibms running
3 testdobsstomcatkineticms running
4 testdobsstomcatmsbms running
5 testdobsstomcatfdms running
6 testdobsstomcathsbcnetms running
7 testdobsstomcatdbbms running
8 testdobssapigeedev running
#
# virt-install --version
2.2.1
# cat /etc/redhat-release
CentOS Stream release 8
#virsh domifaddr testdobssbahrainms
#Name MAC address Protocol Address
-------------------------------------------------------------------------------
Please guide. Thanks in advance.
Best Regards,
Kaushal
3 years, 2 months
startupPolicy issue when changing CD
by Vojtech Juranek
Hi,
when adding support for CD disk on block based storage into oVirt,
I spotted following issue. When starting VM without CD, we add
startupPolicy='optional' attribute into <source> element.
Whole XML looks like this:
<disk type='file' device='cdrom'>
<driver name='qemu' error_policy='report'/>
<source startupPolicy='optional'/>
<target dev='sdc' bus='sata'/>
<readonly/>
<alias name='ua-d7003457-63c3-4c98-80f0-08ab5042c65e'/>
<address type='drive' controller='0' bus='0' target='0' unit='2'/>
</disk>
To change/insert CD we use libvirt.updateDeviceFlags() with XML which
looks like this (for block based disk):
<?xml version='1.0' encoding='utf-8'?>
<disk device="cdrom" type="block">
<source dev="/rhev/data-center/mnt/blockSD/cdac2a0c-b110-456d-a988-7d588626c871/images/638247d7-b4b1-4d98-87fa-c90235fcf4b1/145e7cd2-f92d-4eec-a8fb-6835b4b652e1" />
<target bus="sata" dev="sdc" />
</disk>
However, updateDeviceFlags() fails with
libvirt.libvirtError: XML error: 'startupPolicy' is only valid for 'file' type volume
What is the reason for this error? We don't use `startupPolicy` attribute for block
based disks, as shown on example above.
Thanks in advance.
Vojta
3 years, 2 months