How to perform an in-place upgrade for libvirt
by FuLong Wang
Hello Experts,
Is it possible to perform an in-place upgrade for libvirt.
Assume, i have a CentOS 8 installation (choose server with GUI) with
libvirt version 4.5.1 and i want to upgrade the libvirt to version
6.0.0, how to implement a perfect replacement for all the related files
(libraries, header files, etc)?
Does anybody here has the experience for this?
Many Thanks!
--
FuLong Wang
fulong.wang(a)cn.ibm.com
IBM China Systems Lab, Beijing, China
_______________________________________________
4 years, 7 months
"configure: error: Unable to find <rpc/rpc.h>" when compiling libvirt 6.0.0 from a release tarball
by FuLong Wang
Hello Experts,
I'm trying to compiling libvirt 6.0.0 on an CentOS 8 env by following
the guide here. (https://libvirt.org/compiling.html#compiling)
When running the configure command, i encountered the issue of showing
"configure: error: Unable to find <rpc/rpc.h>":
How can i let the configure command to realize the non-standard header
file location of portablexdr library?
Could anyone kindly give some clue to resolve this?
Thanks in advance!
Install portablexdr was successfull.
[root@centos8 portablexdr-4.9.1]# make install
make install-am
make[1]: Entering directory '/root/portablexdr-4.9.1'
make[2]: Entering directory '/root/portablexdr-4.9.1'
test -z "/usr/local/lib" || /usr/bin/mkdir -p "/usr/local/lib"
/bin/sh ./libtool --mode=install /usr/bin/install -c
'libportablexdr.la' '/usr/local/lib/libportablexdr.la'
libtool: install: /usr/bin/install -c .libs/libportablexdr.so.0.0.0
/usr/local/lib/libportablexdr.so.0.0.0
libtool: install: (cd /usr/local/lib && { ln -s -f
libportablexdr.so.0.0.0 libportablexdr.so.0 || { rm -f
libportablexdr.so.0 && ln -s libportablexdr.so.0.0.0
libportablexdr.so.0; }; })
libtool: install: (cd /usr/local/lib && { ln -s -f
libportablexdr.so.0.0.0 libportablexdr.so || { rm -f libportablexdr.so
&& ln -s libportablexdr.so.0.0.0 libportablexdr.so; }; })
libtool: install: /usr/bin/install -c .libs/libportablexdr.lai
/usr/local/lib/libportablexdr.la
libtool: install: /usr/bin/install -c .libs/libportablexdr.a
/usr/local/lib/libportablexdr.a
libtool: install: chmod 644 /usr/local/lib/libportablexdr.a
libtool: install: ranlib /usr/local/lib/libportablexdr.a
libtool: finish:
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/sbin"
ldconfig -n /usr/local/lib
----------------------------------------------------------------------
Libraries have been installed in:
/usr/local/lib
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the `LD_LIBRARY_PATH' environment variable
during execution
- add LIBDIR to the `LD_RUN_PATH' environment variable
during linking
- use the `-Wl,-rpath -Wl,LIBDIR' linker flag
- have your system administrator add LIBDIR to `/etc/ld.so.conf'
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
test -z "/usr/local/bin" || /usr/bin/mkdir -p "/usr/local/bin"
/bin/sh ./libtool --mode=install /usr/bin/install -c
'portable-rpcgen' '/usr/local/bin/portable-rpcgen'
libtool: install: /usr/bin/install -c portable-rpcgen
/usr/local/bin/portable-rpcgen
test -z "/usr/local/include" || /usr/bin/mkdir -p "/usr/local/include"
* /bin/sh /root/portablexdr-4.9.1/install-sh -c -m 644 'rpc/rpc.h'
'/usr/local/include/rpc/rpc.h'**
** /bin/sh /root/portablexdr-4.9.1/install-sh -c -m 644 'rpc/types.h'
'/usr/local/include/rpc/types.h'**
** /bin/sh /root/portablexdr-4.9.1/install-sh -c -m 644 'rpc/xdr.h'
'/usr/local/include/rpc/xdr.h'*
make[2]: Leaving directory '/root/portablexdr-4.9.1'
make[1]: Leaving directory '/root/portablexdr-4.9.1'
[root@centos8 portablexdr-4.9.1]#
configure command report can't find the <rpc/rpc.h>
checking for how to force completely read-only GOT table... -Wl,-z
-Wl,relro -Wl,-z -Wl,now
checking for how to avoid indirect lib deps...
-Wl,--no-copy-dt-needed-entries
checking for how to stop undefined symbols at link time... -Wl,-z -Wl,defs
checking sys/acl.h usability... no
checking sys/acl.h presence... no
checking for sys/acl.h... no
checking for aa_change_profile in -lapparmor... no
checking for pthread_mutexattr_init... yes
checking for pthread.h... (cached) yes
checking whether pthread_sigmask does anything... yes
checking for atomic ops implementation... gcc
checking for getxattr in -lattr... no
checking for audit_encode_nv_string in -laudit... no
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking whether rl_completion_quote_character is declared... no
checking for BLKID... no
checking for capng_updatev in -lcap-ng... no
checking for CURL... no
checking for DBUS... no
checking for DEVMAPPER... no
checking for dm_task_run in -ldevmapper... no
checking for dlfcn.h... (cached) yes
checking for library containing dlopen... -ldl
checking for whether to install firewalld libvirt zone... no
checking for FUSE... no
checking for GLIB... yes
checking for GLUSTERFS... no
checking for GNUTLS... yes
checking for HAL... no
checking for LIBISCSI... no
checking whether to compile with macvtap support... yes
checking whether MACVLAN_MODE_PASSTHRU is declared... yes
checking for LIBNL... yes
checking for LIBNL_ROUTE... yes
checking for LIBPARTED... no
checking libpcap pcap-config >= 1.0.0 ... no
checking for LIBSSH... no
checking for LIBXML... yes
checking whether to compile with macvtap support... yes
checking whether MACVLAN_MODE_PASSTHRU is declared... (cached) yes
checking for NETCF... no
checking for gettext... yes
checking libintl.h usability... yes
checking libintl.h presence... yes
checking for libintl.h... yes
checking for xgettext... xgettext
checking for msgfmt... msgfmt
checking for msgmerge... msgmerge
checking msgfmt is GNU tool... yes
checking for numa_available in -lnuma... no
checking for numa_bitmask_isbitset in -lnuma... no
checking for OPENWSMAN... no
checking for PCIACCESS... no
checking for init script type... systemd
checking for pkcheck... /usr/bin/pkcheck
checking for pthread_mutexattr_init... (cached) yes
checking for pthread.h... (cached) yes
checking whether pthread_sigmask does anything... (cached) yes
checking whether rl_completion_quote_character is declared... (cached) no
checking for sanlock_init in -lsanlock_client... no
checking for SASL... no
checking for fgetfilecon_raw in -lselinux... no
checking for SSH2... no
checking for UDEV... no
checking whether to compile with virtual port support... yes
checking for WIRESHARK_DISSECTOR... no
*checking for xdrmem_create in -lportablexdr... yes**
**checking for xdr_u_int64_t... no**
**checking where to find <rpc/rpc.h>... missing**
**configure: error: Unable to find <rpc/rpc.h>*
[root@centos8 build]#
--
FuLong Wang
fulong.wang(a)cn.ibm.com
IBM China Systems Lab, Beijing, China
_______________________________________________
4 years, 7 months
Masking out the Protected Processor Identification Number
by procmem@riseup.net
Hi I was wondering if libvirt/KVM screens out a CPU's or Protected
Processor Identification Number? - "PPIN" is a universal hardware serial
number etched into the chip in the fab. [1]
I am currently allowing full host cpu passthrough to allow guests to use
spectre/meltdown mitigations. However as we are a privacy project, we
are looking to prevent obvious identity linkers like serial numbers from
being read by untrusted environments.
Apparentlt Intel has had it for years and its accessible with the mcelog
daemon.
[1]
https://www.phoronix.com/scan.php?page=news_item&px=AMD-PPIN-Processor-ID...
4 years, 7 months
Escape character
by john doe
Hi,
I'm trying to understand how to use the escape character '^]' with the
below command:
virt-install --name=try06 --graphic none --pxe --network bridge=virbr0
--console pty,target_type=serial
"Starting install...
Connected to domain try06
Escape character is ^]"
When I try to do '^]', it does not escape.
The '--console' option makes no difference.
In other words, what is the best way to get back to the host from a
broken guest installation.
I'm remotely connected to this server using SSH and doing '~.' quits the
SSH connection.
Any help is appriciated.
--
John Doe
4 years, 8 months
Create VM w/ cache=none on tmpfs
by Miguel Duarte de Mora Barroso
Hi,
I've seen that in the past, libvirt couldn't start VMs when the disk
image was stored on a file system that doesn't support direct I/O
having the 'cache=none' configuration [0].
On the KubeVirt project, we have some storage tests on a particular
provider which does just that - try to create / start a VM whose disk
is on tmpfs and whose definition features 'cache=none'.
The behavior we're seeing is that libvirt throws this warning:
```
Unexpected Warning event received:
testvmig4zsxc2f8swkxv22xkhx2vrb4ppqbfdfgfgqh5gq8plqzrv5,853ff3d9-70d4-43c5-b9ff-4d5815ea557d:
server error. command SyncVMI failed: "LibvirtError(Code=1, Domain=10,
Message='internal error: process exited while connecting to monitor:
2020-03-25T10:09:21.656238Z qemu-kvm: -drive
file=/var/run/kubevirt-ephemeral-disks/disk-data/disk0/disk.qcow2,format=qcow2,if=none,id=drive-ua-disk0,cache=none:
file system may not support O_DIRECT\n2020-03-25T10:09:21.656391Z
qemu-kvm: -drive
file=/var/run/kubevirt-ephemeral-disks/disk-data/disk0/disk.qcow2,format=qcow2,if=none,id=drive-ua-disk0,cache=none:
Could not open backing file: Could not open
'/var/run/kubevirt-private/vmi-disks/disk0/disk.img': Invalid
argument')"
```
But actually proceeds, and is able to start the VM - but seems it
coerces the cache value to writeThrough.
Is this the expected behavior ? e.g. cache = none can't be used when
the disk images are on a tmpfs file system ? I know it was, not sure
about now (libvirt-5.6.0-7) ...
[0] - https://bugs.launchpad.net/nova/+bug/959637
4 years, 8 months
Question about local migration between containers
by Or Shoval
Hello
On kubevirt project we are using IpV6 Kind cluster,
and trying to support migration,
but since both of the containers are on the same host
we get this error
{"component":"virt-launcher","level":"error","msg":"internal error: Attempt
to migrate guest to the same host
32323136-3731-4247-3831-303946353338","pos":"virNetClientProgramDispatchError:172","subcomponent":"libvirt","thread":"44",
"timestamp":"2020-03-25T10:41:12.123000Z"}
Is there a way to work around this please ?
it comes of course from
https://github.com/libvirt/libvirt/blob/master/src/qemu/qemu_migration_co...
(not sure what version of libvirt i have but it shows the uuid so i guess
this is the one)
Thanks
4 years, 8 months
protocol method available on Windows
by john doe
Hi libvirts,
I'm playing with libvirt on Windows (downloaded the x64 msi) but I'm
stuck at the following:
virsh # net-edit default
error: failed to connect to the hypervisor
error: invalid argument: transport methods unix, ssh and ext are not
supported under Windows
Can someone shed some light on what transport method I should use?
Any help is appriciated.
P.S.
I'm not subscribed to the list.
--
John Doe
4 years, 8 months
how can i get enough mem stat detai from win7 vm with virtio-win driver install and blnsrv started ?
by thomas.kuang
hi,every one
I have some trouble with the virsh to get vm mem-usage in guest os.
[root@localhost ~]# virsh list --all
Id Name State
1 wwl_centos7_1708 running
2 windows-virtio-template running
I create two vms one guest os is centos, the other is window 7
virsh dommemstat wwl_centos7_1708
actual 4194304
swap_in 0
swap_out 0
major_fault 194
minor_fault 219454
unused 3729588
available 3881812
last_update 1581406529
rss 2969400
so i can get the vm mem-used detail,
but if my guest os is windows, though I install virtio-win driver and run blnsrv.exe -i start the service,
I fail to get not enough vm mem stat info, as following:
virsh dommemstat windows-virtio-template
actual 8388608
last_update 1584947706
rss 8263664
can anyone tell me how can I succ to get window's vm with enough mem stat info the same with centos ?
thanks u !
4 years, 8 months
Fwd: KVM hook
by Aditya Sahu
Hi Team ,
I am reaching out to you seeking your help for one of my KVM hook script.
I am using /etc/libvirt/hooks/network file to trigger an event when a
network is created or deleted ( https://www.libvirt.org/hooks.html ).
Basically I using a rest call to create the same network in my Infoblox
appliance for the network monitoring.
However every time I create a network only $2== start or $2==started gets
invoked, i have tried pretty much every combination and permutation but did
not get any success. I checked the libvirtd.log and found that only $2==
start or $2==started gets invoked.
In my case i would like to get network created in infoblox appliance as and
when it gets created in the KVM and should get deleted as and when it gets
deleted from the KVM.
Here is snippet of my script
#!/bin/bash
network_name=`xml_grep --text_only hookData/network/name
/etc/libvirt/hooks/net_details`
network=`xmllint --xpath hookData/network/ip/@address
/etc/libvirt/hooks/net_details|cut -d "=" -f2|tr -d '"'`
network_mask=`ipcalc $network |awk '/Network/{print$2}'`
if [[ $2=="begin" ]] || [[ $2=="start" ]] || [[ $2=="started" ]]; then
curl -k -u admin:infoblox -H "content-type: application/json" -X
POST "
https://10.196.200.63/wapi/v2.10/network?_return_fields%2B=network&_retur..."
-d '{"network": "'$network_mask'"}'
network_ref=`curl -k -s -u admin:infoblox -H 'content-type:
application/json' -X GET '
https://10.196.200.63/wapi/v2.10/network?_return_fields%2B=network&_retur...
'| grep $network_mask| awk -v RS=" " '/_ref/{getline;print$1}' |cut -d "/"
-f2-3`
else
curl -k -u admin:infoblox -H 'content-type: application/json' -X
DELETE "https://10.196.200.63/wapi/v2.10/network/$network_ref/default"
fi
-----------------------------------------------------------------------------------------------------------------------
This script works perfectly fine and creates the network however when i
delete the network it does not get deleted from the infoblox appliance. As
i mentioned when tailed the libvirtd.log I found that the API to create
network gets executed when the network is stopped.
Attaching libvirted.log snippet
[image: image.png]
In this screen shot, stopped hook is triggered but still network creation
API is fired which has errored out.
Any guidance or help is highly appreciated.
-Aditya
4 years, 8 months