[libvirt-users] LibVirt "make install" after successful compilation
by Azizul Hakim
I am having some issue with LibVirt installation from source code. I
downloaded the latest code from git, was able to configure and compile it.
But when I try to install it using *sudo make installi, *I get the
following errors.
Making install in po
make[1]: Entering directory '~/libvirt/po'
make[2]: Entering directory '~/libvirt/po'
make[2]: Nothing to be done for 'install-exec-am'.
make install-data-hook
make[3]: Entering directory '~/libvirt/po'
make[3]: *** No rule to make target 'af.gmo', needed by
'install-data-hook'. Stop.
make[3]: Leaving directory '~/libvirt/po'
Makefile:2027: recipe for target 'install-data-am' failed
make[2]: *** [install-data-am] Error 2
make[2]: Leaving directory '~/libvirt/po'
Makefile:1981: recipe for target 'install-am' failed
make[1]: *** [install-am] Error 2
make[1]: Leaving directory '~/libvirt/po'
Makefile:2105: recipe for target 'install-recursive' failed
make: *** [install-recursive] Error 1
As I mentioned, there is no error during compiling the source code. It
would be helpful if someone could point me in a direction so I can figure
out the problem.
Thanks
Azizul Hakim
6 years, 8 months
[libvirt-users] [libvirt] ignore_value
by gaosheng cui
Hi,using ignore_value in libvirt source code
to do function return value processing,but I
can’t understand about it,can you give me some tips?thanks very much!
6 years, 8 months
[libvirt-users] qemu crash, qemu_thread_create: Resource temporarily unavailable
by llilulu
Hi
My qemu is 2.9.0, libvirt is 3.4.0.
I start many guest in short time(128G pyhsical memory ,1G per guest, 90 guest), and then run memtest on guest system.memtest just occupy guest memory,so when run memtest, host will allocate memory for guest. I run memtest on all my guest, and some guest will encounter crash. qemu log has qemu_thread_create: Resource temporarily unavailable record,I ask same question before, replier suggest I change qemu.conf max_process arg, but I cat /proc/$pid/limits, I find maxprocess limit is very big, I don't think is the args restrict. I think is when I run memtest on all guest, the host pressure very highly in short time, because when I run memtest on all guest, i encounter some other program core, I use gdb debug the core, I find is dump in allocate memory. so I want known qemu crash is that reason, and how host system acceptable pressure limit. when I encounter qemu crash, what can I do avoid the promble.
Thanks
6 years, 8 months
[libvirt-users] Possible to resize a Windows guest's disk while online?
by Andre Goree
I'm looking for a way to online resize a Windows disk -- i.e., be able
to resize the disk without shutting down, rebooting, or detaching the
disk.
Is this at all possible? Or am I just barking up the wrong tree? I'm
not finding a way to do this and even Amazon has a weird workaround, in
which the user must write data to the newly resized-drive in order to
recognize the new size without taking the disk or the VM offline.
[Obligatory] YAY Microsoft.
--
Andre Goree
-=-=-=-=-=-
Email - andre at drenet.net
Website - http://blog.drenet.net
PGP key - http://www.drenet.net/pubkey.html
-=-=-=-=-=-
6 years, 8 months
[libvirt-users] qemu: qemu_thread_create: Resource temporarily unavailable
by llilulu
Hi:
My libvirt is 3.4.0 and qemu is 2.9.0, My host has a big memory(128G), I run many guest on my host(80 guests), when I batch stop and start guests, some guest will crash, the qemu log is "qemu: qemu_thread_create: Resource temporarily unavailable". I search qemu code, I find qemu_thread_create just like pthread_create function. I search on internet, someone say that is a bug of qemu.Because my host run many guest ,so I cann't ensure whether qemu bug or my host load heavy cause my guest crash. Can someone tell me what reason cause the promble? and what can I do avoid the promble?
Thanks
6 years, 8 months
[libvirt-users] can't find how to solve "QEMU guest agent is not connected"
by Matt
I am trying to make Qemu agent work with libvirt thanks to
https://github.com/NixOS/nixops/pull/922 with libvirt 4.1.0. I've been
trying to make it work for quite some time but I still haven't the
slightest idea of what is wrong, I keep seeing "Guest agent is not
responding: QEMU guest agent is not connected" as the program I use
(nixops) calls the libvirt python API.
I apologize in advance for dropping so many details but in case
someone is interested in answering this post, I thought I would
provide details upfront.
The failure surprises me as typically a socket is created when I start
the VM with a priori the correct rights myuser:libvirtd (libvirtd is
the default libvirt group on nixos, different from upstream IIRC):
/var/lib/libvirt/qemu/channel/target/domain-10-nixops-3cb2c9c2-41ea/org.qemu.guest_agent.0
My domain contains
```
<channel type='unix'>
<target type='virtio' name='org.qemu.guest_agent.0'/>
<address type='virtio-serial' controller='0' bus='0' port='1'/>
</channel>
```
as requested per the doc (I tried with source=bind to no avail, btw
the doc for `source` is not that great)
my libvirtd.conf has the following setting
```
log_level = 1
# no filter for now
log_filters="1:qemu.qemu_agent 1:qemu.qemu_monitor"
# log_filters="3:remote 4:event 3:json 3:rpc"
log_outputs="1:file:/var/log/libvirt/libvirtd.log"
```
`journalctl -b -u libvirtd.service` returns
```
avril 17 12:31:05 jedha libvirtd[22804]: 2018-04-17 03:31:05.482+0000:
22806: error : qemuDomainAgentAvailable:7755 : Guest agent is not
responding: QEMU guest agent is not connected
avril 17 12:31:06 jedha libvirtd[22804]: 2018-04-17 03:31:06.487+0000:
22807: error : qemuDomainAgentAvailable:7755 : Guest agent is not
responding: QEMU guest agent is not connected
avril 17 12:31:07 jedha libvirtd[22804]: 2018-04-17 03:31:07.493+0000:
22805: error : qemuDomainAgentAvailable:7755 : Guest agent is not
responding: QEMU guest agent is not connected
avril 17 12:31:08 jedha libvirtd[22804]: 2018-04-17 03:31:08.499+0000:
22809: error : qemuDomainAgentAvailable:7755 : Guest agent is not
responding: QEMU guest agent is not connected
avril 17 12:31:09 jedha libvirtd[22804]: 2018-04-17 03:31:09.506+0000:
22808: error : qemuDomainAgentAvailable:7755 : Guest agent is not
responding: QEMU guest agent is not connected
avril 17 12:31:10 jedha libvirtd[22804]: 2018-04-17 03:31:10.513+0000:
22806: error : qemuDomainAgentAvailable:7755 : Guest agent is not
responding: QEMU guest agent is not connected
avril 17 12:31:11 jedha libvirtd[22804]: 2018-04-17 03:31:11.512+0000:
22804: error : virNetSocketReadWire:1809 : End of file while reading
data: Input/output error
```
Here is an excerpt just before the error "GUest agent is not
connected" (full log of 82MB available at
https://drive.google.com/file/d/1sYpyJ2WQMlyFqNKkPkvSAJ13Tm2JjpVk/view?us...)
```
2018-04-17 03:56:41.982+0000: 806: debug : virEventPollMakePollFDs:401
: Prepare n=5 w=6, f=12 e=1 d=0
2018-04-17 03:56:41.983+0000: 806: debug : virEventPollMakePollFDs:401
: Prepare n=6 w=7, f=13 e=1 d=0
2018-04-17 03:56:41.983+0000: 806: debug : virEventPollMakePollFDs:401
: Prepare n=7 w=8, f=15 e=1 d=0
2018-04-17 03:56:41.983+0000: 807: debug :
virAccessManagerCheckDomain:234 : manager=0x55fa67d0d450(name=stack)
driver=QEMU domain=0x7f2c5800c040 perm=1
2018-04-17 03:56:41.983+0000: 806: debug : virEventPollMakePollFDs:401
: Prepare n=8 w=9, f=17 e=25 d=0
2018-04-17 03:56:41.983+0000: 807: debug :
virAccessManagerCheckDomain:234 : manager=0x55fa67d0d6f0(name=none)
driver=QEMU domain=0x7f2c5800c040 perm=1
2018-04-17 03:56:41.983+0000: 806: debug : virEventPollMakePollFDs:401
: Prepare n=9 w=10, f=18 e=1 d=0
2018-04-17 03:56:41.983+0000: 807: info : virObjectUnref:350 :
OBJECT_UNREF: obj=0x55fa67d0d450
2018-04-17 03:56:41.983+0000: 806: debug : virEventPollMakePollFDs:401
: Prepare n=10 w=11, f=19 e=1 d=0
2018-04-17 03:56:41.983+0000: 807: info : virObjectRef:388 :
OBJECT_REF: obj=0x7f2c14026460
2018-04-17 03:56:41.983+0000: 806: debug : virEventPollMakePollFDs:401
: Prepare n=11 w=13, f=23 e=25 d=0
2018-04-17 03:56:41.983+0000: 807: debug :
qemuDomainObjBeginJobInternal:5393 : Starting job: query
(vm=0x7f2c58004770
name=nixops-4f58a5c0-41f3-11e8-9858-309c233b770e-server, current
job=none async=none)
2018-04-17 03:56:41.983+0000: 806: debug :
virEventPollCalculateTimeout:338 : Calculate expiry of 1 timers
2018-04-17 03:56:41.983+0000: 807: debug :
qemuDomainObjBeginJobInternal:5434 : Started job: query (async=none
vm=0x7f2c58004770
name=nixops-4f58a5c0-41f3-11e8-9858-309c233b770e-server)
2018-04-17 03:56:41.983+0000: 806: debug :
virEventPollCalculateTimeout:371 : No timeout is pending
2018-04-17 03:56:41.983+0000: 807: info : virObjectUnref:350 :
OBJECT_UNREF: obj=0x7f2c14026460
2018-04-17 03:56:41.983+0000: 806: info : virEventPollRunOnce:640 :
EVENT_POLL_RUN: nhandles=12 timeout=-1
2018-04-17 03:56:41.983+0000: 807: error :
qemuDomainAgentAvailable:7755 : Guest agent is not responding: QEMU
guest agent is not connected
```
This is the VM log from a machine similar to the one in the previous
messages (same config)
```
2018-04-16 08:28:47.875+0000: starting up libvirt version: 4.1.0, qemu
version: 2.11.1, hostname: jedha
LC_ALL=C PATH=/run/libvirt/nix-emulators:/nix/store/f8hxcp939qwpiwzm6999gljdkd2kzg6v-iptables-1.6.2/bin:/nix/store/fs4p0aw14snppfcjrzmiic52sjc3z627-iproute2-4.15.0/bin:/nix/store/bbrlfy430b48fywf7rgk4x1qxrpm695j-pm-utils-1.4.1/bin:/nix/store/waj4yidjf59mknpkcd99pdp0wf1x5gs7-numad-0.5/bin:/nix/store/hz5x8d3nlqvkv63mkxajblp9pkawlwvq-numactl-2.0.11/bin:/nix/store/pj5iq5sdhc3f8v6ysyxssm039jrkxmcl-bridge-utils-1.5/bin:/nix/store/bkrl7mxmzn0whm1n29dhyhdhlgkv0m8c-dmidecode-3.1/bin:/nix/store/h6x6i584ihp1qvk19vvyk5gqjznxk6bp-dnsmasq-2.78/bin:/nix/store/xvnsxcsq2ca3cs7z4952jdjid48ql32c-ebtables-2.0.10-4/bin:/nix/store/j7x4cjlfrdhagmciqk5zc58g1icg91rb-qemu-2.11.1/bin:/nix/store/qrxs7sabhqcr3j9ai0j0cp58zfnny0jz-coreutils-8.29/bin:/nix/store/3ixa5cn578zz4pr81a0rdkbi4dal748a-findutils-4.6.0/bin:/nix/store/xd4m1v7q7kn902p8hvnfn79c2wjijlif-gnugrep-3.1/bin:/nix/store/r0wkp0vkw6wjfl0skmdpykabgj1bkyn2-gnused-4.4/bin:/nix/store/aw6jabbci1k81j6hvyskkhb3va45wws2-systemd-237/bin:/nix/store/j7x4cjlfrdhagmciqk5zc58g1icg91rb-qemu-2.11.1/sbin:/nix/store/qrxs7sabhqcr3j9ai0j0cp58zfnny0jz-coreutils-8.29/sbin:/nix/store/3ixa5cn578zz4pr81a0rdkbi4dal748a-findutils-4.6.0/sbin:/nix/store/xd4m1v7q7kn902p8hvnfn79c2wjijlif-gnugrep-3.1/sbin:/nix/store/r0wkp0vkw6wjfl0skmdpykabgj1bkyn2-gnused-4.4/sbin:/nix/store/aw6jabbci1k81j6hvyskkhb3va45wws2-systemd-237/sbin
QEMU_AUDIO_DRV=none /run/libvirt/nix-emulators/qemu-kvm -name
guest=nixops-0084610a-4150-11e8-aef5-309c233b770e-server,debug-threads=on
-S -object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain-7-nixops-0084610a-4150/master-key.aes
-machine pc-i440fx-2.11,accel=kvm,usb=off,dump-guest-core=off -m 512
-realtime mlock=off -smp 1,sockets=1,cores=1,threads=1 -uuid
ad67fc0b-d93d-455d-a6e6-5549451e08ac -display none -no-user-config
-nodefaults -chardev
socket,id=charmonitor,path=/var/lib/libvirt/qemu/domain-7-nixops-0084610a-4150/monitor.sock,server,nowait
-mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc
-no-shutdown -no-acpi -boot strict=on -device
piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -device
virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x3 -drive
file=/var/lib/libvirt/images/nixops-0084610a-4150-11e8-aef5-309c233b770e-server.qcow2,format=qcow2,if=none,id=drive-ide0-0-0
-device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1
-netdev tap,fd=21,id=hostnet0 -device
rtl8139,netdev=hostnet0,id=net0,mac=52:54:00:84:7f:ee,bus=pci.0,addr=0x2
-chardev pty,id=charserial0 -device
isa-serial,chardev=charserial0,id=serial0 -chardev
socket,id=charchannel0,path=/var/lib/libvirt/qemu/channel/target/domain-7-nixops-0084610a-4150/org.qemu.guest_agent.0,server,nowait
-device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=org.qemu.guest_agent.0
-device usb-kbd,id=input0,bus=usb.0,port=1 -device
usb-mouse,id=input1,bus=usb.0,port=2 -device
virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4 -msg timestamp=on
2018-04-16T08:28:47.931670Z qemu-system-x86_64: -chardev
pty,id=charserial0: char device redirected to /dev/pts/4 (label
charserial0)
2018-04-16T08:32:04.730417Z qemu-system-x86_64: terminating on signal
15 from pid 1211
(/nix/store/ggqq9v3h5w66gnzbg3wg74s0ad7m0rjk-libvirt-4.1.0/sbin/libvirtd)
2018-04-16 08:32:04.931+0000: shutting down, reason=destroyed
```
Let me know what I can do to diagnose the error, or if any additionnal
details would help. I will happily provide them.
Best regards
Matt
6 years, 8 months
[libvirt-users] How allocate ip for guest in xml file
by llilulu
Hi:
I encounter a promble when I use libvirt manager my virtual machine. I use dhcp allocate IP for my guest, but use dhcp manager IP source, I will ensure guest run NetworkManager auto start NIC in dhcp type get IP. But some release system no install NetworkManager, or some installed system no install NetworkManager, so when I manager those guest, I cann't allocate IP for guest via dhcp server. I want know has other way allocate ip for guest in guest xml file when create the guest, I search "libvirt domain xml format", I find use blow xml configuration in <interface/>
<ip address='192.168.122.5' prefix='24'/>
But I add this in my guest xml file, virsh create guest will report an error:
"error: unsupported configuration: Invalid attempt to set network interface guest-side IP route and/or address info, not supported by QEMU"
I want to know if I use dhcp allocate IP for guest, has some way auto start guest dhclinet when guest start(because NIC can hotplug, I cann't write NIC configure file for it). or I want configure IP for guest in guest xml file,How cant I do? my libvirt version is 3.4.0, qemu is 2.9.0. I compile libvirt and qemu myself, when compile its run ./configure script without specific args. If I want qemu or libvirt support configure IP in guest xml file, how I compile libvirt and qemu?
Thanks.
6 years, 8 months
[libvirt-users] Online Disk Resize with Windows Server 2016
by Andre Goree
I'm having an issue when resizing a disk (a Ceph RBD disk, though the
type of disk shouldn't matter, I'd think) attached to a Windows Server
2016 guest.
After I resize the disk, the newly-created disk space is _not_
recognized by the server. Even after running Action > Rescan from the
Disk Management app, the new disk space does not show. However, when I
perform the same resize on a Windows Server 2012 or even a Sever 2008
system, the Action > Rescan works fine and the newly-created disk space
is recognized without needed to detach the drive or reboot the VM.
Does anyone have an idea of what may have changed in Windows 2k16 that
might be causing this? Possibly some undocumented registry change or
something?
--
Andre Goree
-=-=-=-=-=-
Email - andre at drenet.net
Website - http://blog.drenet.net
PGP key - http://www.drenet.net/pubkey.html
-=-=-=-=-=-
6 years, 8 months
Re: [libvirt-users] Fail to compile libvirt with address sanitizer by clang-7
by Michal Privoznik
On 04/10/2018 05:22 AM, Han Han wrote:
> Hi,
> I tried to compile libvirt with address sanitizer(
> https://github.com/google/sanitizers/wiki/AddressSanitizer) to discover
> memory errors. But fails when make.
> Code version:
> $ git describe
> v4.2.0-92-g3f204e4de
>
> Compile tools:
> automake 1:1.15.1-3 all [installed]
> clang-7 1:7~svn323616-1 amd64 [installed,automatic]
> make 4.2.1-1 amd64 [installed,automatic]
>
> Compile steps:
> $ ./bootstrap
> $ CC=clang-7 CFLAGS="-g -O1 -fsanitize=address -fno-omit-frame-pointer
> -Wno-error" LDFLAGS="-fsanitize=address" ./configure
>
> Configure succed.
> $ make
> But error appeared:
> make all-am
> make[3]: Entering directory '/home/hhan/Software/libvirt/src'
> CCLD libvirt.la
> ./.libs/libvirt_util.a(libvirt_util_la-viralloc.o): In function `virAlloc':
> /home/hhan/Software/libvirt/src/util/viralloc.c:144: undefined reference to
> `__asan_report_store8'
Huh, I remember seeing different error when trying this (although I'm
using gcc). However, I suspect '-Wl,-z -Wl,defs' arguments are problem.
We add them onto linker cmd line. You can try applying this patch and
see if it helps:
diff --git i/configure.ac w/configure.ac
index 18587270e6..e23c0e4c22 100644
--- i/configure.ac
+++ w/configure.ac
@@ -237,7 +237,6 @@ LIBVIRT_COMPILE_WARNINGS
LIBVIRT_COMPILE_PIE
LIBVIRT_LINKER_RELRO
LIBVIRT_LINKER_NO_INDIRECT
-LIBVIRT_LINKER_NO_UNDEFINED
LIBVIRT_ARG_APPARMOR
LIBVIRT_ARG_ATTR
Michal
6 years, 8 months