Re: libvirt and bhyve problems
On Tue, Jun 10, 2014 at 1:54 PM, Craig Rodrigues wrote: > On Tue, Jun 10, 2014 at 12:25 PM, Craig Rodrigues wrote: > lldb /usr/local/sbin/libvirtd libvirtd.core > > (lldb) bt > * thread #1: tid = 0, 0x000801aa8513 > libvirt.so.1002`virNetDevTapCreateInBridgePort(brname=0x00080a4211c8, > ifname=0x00080a88d1e0, macaddr=0x00080a88d144, > vmuuid=0x00080a81b808, tapfd=0x, tapfdSize=1, > virtPortProfile=0x, virtVlan=0x, > flags=9) + 547 at virnetdevtap.c:583, name = 'libvirtd', stop reason = > signal SIGSEGV > * frame #0: 0x000801aa8513 > libvirt.so.1002`virNetDevTapCreateInBridgePort(brname=0x00080a4211c8, > ifname=0x00080a88d1e0, macaddr=0x00080a88d144, > vmuuid=0x00080a81b808, tapfd=0x, tapfdSize=1, > virtPortProfile=0x, virtVlan=0x, > flags=9) + 547 at virnetdevtap.c:583 > frame #1: 0x000809e20569 > libvirt_driver_bhyve.so`bhyveBuildNetArgStr(def=0x00080a81b800, > cmd=0x00080a4db200, dryRun=false) + 841 at bhyve_command.c:82 > frame #2: 0x000809e20196 > libvirt_driver_bhyve.so`virBhyveProcessBuildBhyveCmd(driver=0x00080a48a040, > def=0x00080a81b800, dryRun=false) + 310 at bhyve_command.c:248 > frame #3: 0x000809e24d6a > libvirt_driver_bhyve.so`virBhyveProcessStart(conn=0x00080a4db100, > driver=0x00080a48a040, vm=0x00080a48b0f0, > reason=VIR_DOMAIN_RUNNING_BOOTED, flags=0) + 746 at > bhyve_process.c:134 > frame #4: 0x000809e2334a > libvirt_driver_bhyve.so`bhyveDomainCreateWithFlags(dom=0x00080a48a280, > flags=0) + 490 at bhyve_driver.c:847 > frame #5: 0x000809e2315a > libvirt_driver_bhyve.so`bhyveDomainCreate(dom=0x00080a48a280) + 26 > at bhyve_driver.c:867 > frame #6: 0x000801b96aad > libvirt.so.1002`virDomainCreate(domain=0x00080a48a280) + 637 at > libvirt.c:8968 > frame #7: 0x01075427 > libvirtd`remoteDispatchDomainCreate(server=0x00080781c400, > client=0x0008078df480, msg=0x0008078791d0, > rerr=0x7f9fcc30, args=0x000807934340) + 231 at > remote_dispatch.h:3048 > frame #8: 0x0103b84e > libvirtd`remoteDispatchDomainCreateHelper(server=0x00080781c400, > client=0x0008078df480, msg=0x0008078791d0, > rerr=0x7f9fcc30, args=0x000807934340, > ret=0x00080a421058) + 254 at remote_dispatch.h:3026 > frame #9: 0x000801c26b20 > libvirt.so.1002`virNetServerProgramDispatchCall(prog=0x00080790f400, > server=0x00080781c400, client=0x0008078df480, > msg=0x0008078791d0) + 784 at virnetserverprogram.c:437 > frame #10: 0x000801c26641 > libvirt.so.1002`virNetServerProgramDispatch(prog=0x00080790f400, > server=0x00080781c400, client=0x0008078df480, > msg=0x0008078791d0) + 705 at virnetserverprogram.c:307 > frame #11: 0x0108f97c > libvirtd`virNetServerProcessMsg(srv=0x00080781c400, > client=0x0008078df480, prog=0x00080790f400, > msg=0x0008078791d0) + 332 at virnetserver.c:172 > frame #12: 0x0108cd9c > libvirtd`virNetServerHandleJob(jobOpaque=0x000807934360, > opaque=0x00080781c400) + 204 at virnetserver.c:193 > frame #13: 0x000801ac84b8 > libvirt.so.1002`virThreadPoolWorker(opaque=0x000807901d60) + 680 > at virthreadpool.c:145 > frame #14: 0x000801ac7b9b > libvirt.so.1002`virThreadHelper(data=0x00080781b520) + 75 at > virthread.c:197 > frame #15: 0x000803c614f5 libthr.so.3`??? + 277 > > -- > Craig OK, I think I found the problem. In this file: http://libvirt.org/git/?p=libvirt.git;a=blob_plain;f=src/bhyve/bhyve_command.c;hb=HEAD We have: static int bhyveBuildNetArgStr(const virDomainDef *def, virCommandPtr cmd, bool dryRun) { virDomainNetDefPtr net = NULL; char *brname = NULL; char *realifname = NULL; int *tapfd = NULL; tapfd is never initialized after this. In the same function, we have this: if (!dryRun) if (virNetDevTapCreateInBridgePort(brname, &net->ifname, &net->mac, def->uuid, tapfd, 1, virDomainNetGetActualVirtPortProfile(net), virDomainNetGetActualVlan(net), VIR_NETDEV_TAP_CREATE_IFUP | VIR_NETDEV_TAP_CREATE_PERSIST) < 0) { VIR_FREE(net->ifname); VIR_FREE(brname); return -1; } virNetDevTapCreateinBridgePort() is being passed a NULL tapfd, but the next parameter is 1 instead of 0. Then further along in this file: http://libvirt.org/git/?p=libvirt.git;a=blob_plain;f=src/util/virnetdevtap.c;hb=HEAD we have: error: for (i = 0; i < tapfdSize && tapfd[i] >= 0; i++) VIR_FORCE_CLOSE(tapfd[i]); tapfd is NULL, but tapfdSize is 1, so the coredump happens here. What is the best way to fix this? -- Craig ___ freebsd-virtualization@freebsd.org m
Re: libvirt and bhyve problems
On Tue, Jun 10, 2014 at 12:25 PM, Craig Rodrigues wrote: > > > # gdb /usr/local/sbin/libvirtd libvirtd.core > GNU gdb 6.1.1 [FreeBSD] > Copyright 2004 Free Software Foundation, Inc. > GDB is free software, covered by the GNU General Public License, and you are > welcome to change it and/or distribute copies of it under certain conditions. > Type "show copying" to see the conditions. > There is absolutely no warranty for GDB. Type "show warranty" for details. > This GDB was configured as "amd64-marcel-freebsd"... > Core was generated by `libvirtd'. > Program terminated with signal 11, Segmentation fault. > #0 0x000801aa8513 in ?? () > (gdb) where > #0 0x000801aa8513 in ?? () > #1 0x00180008 in ?? () > #2 0x7f3f9330 in ?? () > #3 0x000809e5510c in ?? () > #4 0x0007 in ?? () > #5 0x000809e5531b in ?? () > #6 0x in ?? () OK, so it looks like in CURRENT, at least for the devel/libvirt port, the gdb in base, and also gdb in ports cannot debug libvirtd.core. I enabled WITH_LLDB=yes in /etc/src.conf and recompiled to install lldb. I am not so familiar with lldb, but at least I can get a stacktrace with it. lldb /usr/local/sbin/libvirtd libvirtd.core (lldb) bt * thread #1: tid = 0, 0x000801aa8513 libvirt.so.1002`virNetDevTapCreateInBridgePort(brname=0x00080a4211c8, ifname=0x00080a88d1e0, macaddr=0x00080a88d144, vmuuid=0x00080a81b808, tapfd=0x, tapfdSize=1, virtPortProfile=0x, virtVlan=0x, flags=9) + 547 at virnetdevtap.c:583, name = 'libvirtd', stop reason = signal SIGSEGV * frame #0: 0x000801aa8513 libvirt.so.1002`virNetDevTapCreateInBridgePort(brname=0x00080a4211c8, ifname=0x00080a88d1e0, macaddr=0x00080a88d144, vmuuid=0x00080a81b808, tapfd=0x, tapfdSize=1, virtPortProfile=0x, virtVlan=0x, flags=9) + 547 at virnetdevtap.c:583 frame #1: 0x000809e20569 libvirt_driver_bhyve.so`bhyveBuildNetArgStr(def=0x00080a81b800, cmd=0x00080a4db200, dryRun=false) + 841 at bhyve_command.c:82 frame #2: 0x000809e20196 libvirt_driver_bhyve.so`virBhyveProcessBuildBhyveCmd(driver=0x00080a48a040, def=0x00080a81b800, dryRun=false) + 310 at bhyve_command.c:248 frame #3: 0x000809e24d6a libvirt_driver_bhyve.so`virBhyveProcessStart(conn=0x00080a4db100, driver=0x00080a48a040, vm=0x00080a48b0f0, reason=VIR_DOMAIN_RUNNING_BOOTED, flags=0) + 746 at bhyve_process.c:134 frame #4: 0x000809e2334a libvirt_driver_bhyve.so`bhyveDomainCreateWithFlags(dom=0x00080a48a280, flags=0) + 490 at bhyve_driver.c:847 frame #5: 0x000809e2315a libvirt_driver_bhyve.so`bhyveDomainCreate(dom=0x00080a48a280) + 26 at bhyve_driver.c:867 frame #6: 0x000801b96aad libvirt.so.1002`virDomainCreate(domain=0x00080a48a280) + 637 at libvirt.c:8968 frame #7: 0x01075427 libvirtd`remoteDispatchDomainCreate(server=0x00080781c400, client=0x0008078df480, msg=0x0008078791d0, rerr=0x7f9fcc30, args=0x000807934340) + 231 at remote_dispatch.h:3048 frame #8: 0x0103b84e libvirtd`remoteDispatchDomainCreateHelper(server=0x00080781c400, client=0x0008078df480, msg=0x0008078791d0, rerr=0x7f9fcc30, args=0x000807934340, ret=0x00080a421058) + 254 at remote_dispatch.h:3026 frame #9: 0x000801c26b20 libvirt.so.1002`virNetServerProgramDispatchCall(prog=0x00080790f400, server=0x00080781c400, client=0x0008078df480, msg=0x0008078791d0) + 784 at virnetserverprogram.c:437 frame #10: 0x000801c26641 libvirt.so.1002`virNetServerProgramDispatch(prog=0x00080790f400, server=0x00080781c400, client=0x0008078df480, msg=0x0008078791d0) + 705 at virnetserverprogram.c:307 frame #11: 0x0108f97c libvirtd`virNetServerProcessMsg(srv=0x00080781c400, client=0x0008078df480, prog=0x00080790f400, msg=0x0008078791d0) + 332 at virnetserver.c:172 frame #12: 0x0108cd9c libvirtd`virNetServerHandleJob(jobOpaque=0x000807934360, opaque=0x00080781c400) + 204 at virnetserver.c:193 frame #13: 0x000801ac84b8 libvirt.so.1002`virThreadPoolWorker(opaque=0x000807901d60) + 680 at virthreadpool.c:145 frame #14: 0x000801ac7b9b libvirt.so.1002`virThreadHelper(data=0x00080781b520) + 75 at virthread.c:197 frame #15: 0x000803c614f5 libthr.so.3`??? + 277 -- Craig ___ freebsd-virtualization@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization To unsubscribe, send any mail to "freebsd-virtualization-unsubscr...@freebsd.org"
Re: libvirt and bhyve problems
On Tue, Jun 10, 2014 at 12:15 PM, Roman Bogorodskiy wrote: > > This last line also sounds strange. > > I'm wondering if you execute 'net-list --all' will you see the 'default' > network? And if it's there, will 'net-show default' should that > Autostart is enabled for it? If I do: # virsh -c 'bhyve:///system' Welcome to virsh, the virtualization interactive terminal. Type: 'help' for help with commands 'quit' to quit virsh # net-list --all error: Failed to get the number of active networks error: this function is not supported by the connection driver: virConnectNumOfNetworks The past few times, I have been compiling the port using WITH_DEBUG=yes. However, I am not getting useful stacktraces: /usr/ports/devel/libvirt/work/libvirt-1.2.5]# file /usr/local/sbin/libvirtd /usr/local/sbin/libvirtd: ELF 64-bit LSB shared object, x86-64, version 1 (FreeBSD), dynamically linked (uses shared libs), for FreeBSD 11.0 (1100022), not stripped # gdb /usr/local/sbin/libvirtd libvirtd.core GNU gdb 6.1.1 [FreeBSD] Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "amd64-marcel-freebsd"... Core was generated by `libvirtd'. Program terminated with signal 11, Segmentation fault. #0 0x000801aa8513 in ?? () (gdb) where #0 0x000801aa8513 in ?? () #1 0x00180008 in ?? () #2 0x7f3f9330 in ?? () #3 0x000809e5510c in ?? () #4 0x0007 in ?? () #5 0x000809e5531b in ?? () #6 0x in ?? () BTW, can you give me: (1) exact git command to checkout libvirt (2) configure command you typed (3) make command you typed I want to get a working setup like you have. It looks like the port needs some fixing before it can be used fully. -- Craig ___ freebsd-virtualization@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization To unsubscribe, send any mail to "freebsd-virtualization-unsubscr...@freebsd.org"
Re: libvirt and bhyve problems
Craig Rodrigues wrote: > On Tue, Jun 10, 2014 at 10:54 AM, Roman Bogorodskiy wrote: > > This warning is not critical. Actually, UML should not be built on > > FreeBSD and I would need to disable it by default. For now I think the > > proper fix is to configure with '--without-uml' flag. > > > > As for the segfault, I think I have a guess. > > > > Could you please drop '--without-network' from CONFIGURE_ARGS in the > > port's Makefile and try to rebuild? > > > > Roman Bogorodskiy > > OK, I dropped --without-network from CONFIGURE_ARGS and rebuilt the port. > I am still getting the coredump, but am getting different errors: > > 2014-06-10 18:59:22.713+: 34485593088: info : libvirt version: 1.2.5 > 2014-06-10 18:59:22.713+: 34485593088: warning : > virDriverLoadModule:63 : Module > /usr/local/lib/libvirt/connection-driver/libvirt_driver_network.so not > accessible Hmmm, this sounds weird. I think I need to try the port version myself to see if I could reproduce it this way (I'm usually using git version of libvirt instead of port). In the meantime, I'd really appreciate if you could build the port with WITH_DEBUG flag and try to get a stacktrace. > 2014-06-10 18:59:22.715+: 34485593088: error : > virDriverLoadModule:71 : failed to load module > /usr/local/lib/libvirt/connection-driver/libvirt_driver_qemu.so > /usr/local/lib/libvirt/connection-driver/libvirt_driver_qemu.so: > Undefined symbol "networkAllocateActualDevice" > 2014-06-10 18:59:22.716+: 34485593088: error : > virDriverLoadModule:71 : failed to load module > /usr/local/lib/libvirt/connection-driver/libvirt_driver_uml.so > /usr/local/lib/libvirt/connection-driver/libvirt_driver_uml.so: > Undefined symbol "inotify_add_watch" > 2014-06-10 18:59:22.845+: 34485605376: info : > virDomainObjListLoadAllConfigs:18249 : Scanning for configs in > /usr/local/etc/libvirt/bhyve > 2014-06-10 18:59:22.845+: 34485605376: info : > virDomainObjListLoadAllConfigs:18273 : Loading config file 'bhyve.xml' > 2014-06-10 18:59:22.847+: 34485605376: error : do_open:1166 : no > connection driver available for qemu:///system > 2014-06-10 18:59:42.273+: 34485598208: error : > virNetDevBridgeAddPort:399 : Unable to add bridge tap0 port vnet7: > Invalid argument This last line also sounds strange. I'm wondering if you execute 'net-list --all' will you see the 'default' network? And if it's there, will 'net-show default' should that Autostart is enabled for it? > Segmentation fault (core dumped) Thanks, Roman Bogorodskiy pgp0SZ86gpFPj.pgp Description: PGP signature
Re: libvirt and bhyve problems
On Tue, Jun 10, 2014 at 10:54 AM, Roman Bogorodskiy wrote: > This warning is not critical. Actually, UML should not be built on > FreeBSD and I would need to disable it by default. For now I think the > proper fix is to configure with '--without-uml' flag. > > As for the segfault, I think I have a guess. > > Could you please drop '--without-network' from CONFIGURE_ARGS in the > port's Makefile and try to rebuild? > > Roman Bogorodskiy OK, I dropped --without-network from CONFIGURE_ARGS and rebuilt the port. I am still getting the coredump, but am getting different errors: 2014-06-10 18:59:22.713+: 34485593088: info : libvirt version: 1.2.5 2014-06-10 18:59:22.713+: 34485593088: warning : virDriverLoadModule:63 : Module /usr/local/lib/libvirt/connection-driver/libvirt_driver_network.so not accessible 2014-06-10 18:59:22.715+: 34485593088: error : virDriverLoadModule:71 : failed to load module /usr/local/lib/libvirt/connection-driver/libvirt_driver_qemu.so /usr/local/lib/libvirt/connection-driver/libvirt_driver_qemu.so: Undefined symbol "networkAllocateActualDevice" 2014-06-10 18:59:22.716+: 34485593088: error : virDriverLoadModule:71 : failed to load module /usr/local/lib/libvirt/connection-driver/libvirt_driver_uml.so /usr/local/lib/libvirt/connection-driver/libvirt_driver_uml.so: Undefined symbol "inotify_add_watch" 2014-06-10 18:59:22.845+: 34485605376: info : virDomainObjListLoadAllConfigs:18249 : Scanning for configs in /usr/local/etc/libvirt/bhyve 2014-06-10 18:59:22.845+: 34485605376: info : virDomainObjListLoadAllConfigs:18273 : Loading config file 'bhyve.xml' 2014-06-10 18:59:22.847+: 34485605376: error : do_open:1166 : no connection driver available for qemu:///system 2014-06-10 18:59:42.273+: 34485598208: error : virNetDevBridgeAddPort:399 : Unable to add bridge tap0 port vnet7: Invalid argument Segmentation fault (core dumped) ___ freebsd-virtualization@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization To unsubscribe, send any mail to "freebsd-virtualization-unsubscr...@freebsd.org"
Re: Bheve: Slow linux syscalls on AMD
Hi Willem, I've got KTR compiled in, but last time I switched it on. I got swamped in traffic, and I sort of got locked out of the server... :( Could also be because I was writing it to a file as well. So you'll have to help/tell me what to do. For looking at this, I'd use one single-vCPU guest to avoid KTR noise from other vCPU/guests. The problem shows up with this so no issue there. First, boot the VM and get it sitting at a shell prompt idling. On the host, first see that there are enough entries in the KTR buffer # sysctl debug.ktr.entries <32/64K is a good number> If it's too small, it can be bumped up # sysctl debug.ktr.entries=65536 debug.ktr.entries: 8192 -> 65536 The bhyve kernel module uses the ktr mask value 0x01. This should be turned off by default: # sysctl debug.ktr.mask debug.ktr.mask: 0 To get some traces, turn this on for a few seconds # sysctl debug.ktr.mask=1 ; sleep 3 ; sysctl debug.ktr.mask=0 The ktr trace buffer can now be examined: # ktrdump -ct To repeat/rerun the process, make sure the ktr buffer is cleared with # sysctl debug.ktr.clear=1 debug.ktr.clear: 0 -> 0 later, Peter. ___ freebsd-virtualization@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization To unsubscribe, send any mail to "freebsd-virtualization-unsubscr...@freebsd.org"
Re: libvirt and bhyve problems
Craig Rodrigues wrote: > On Tue, Jun 10, 2014 at 8:58 AM, Craig Rodrigues wrote: > > On Tue, Jun 10, 2014 at 4:43 AM, Roman Bogorodskiy > > wrote: > >> Hi Craig, > >> > >> It's a little unfortunate that there's no stacktrace, though we can try > >> to see what's going on without it. > >> > >> Could you please edit libvirtd.conf (should be something like > >> /usr/local/etc/libvirtd.conf if installed from port) to add: > >> > >> log_level = 2 > >> > >> then run libvirtd by hand in foreground: > > > > OK, I added log_level = 2 to /usr/local/etc/libvirt/libvirtd.conf > > and ran libvirtd in the foreground: > > > > 2014-06-10 15:53:26.846+: 34485593088: info : libvirt version: 1.2.5 > > 2014-06-10 15:53:26.846+: 34485593088: warning : > > virDriverLoadModule:63 : Module > > /usr/local/lib/libvirt/connection-driver/libvirt_driver_uml.so not > > accessible > > I saw the above warning, so I tried patching the port with this: > > --- pkg-plist.orig 2014-06-10 10:36:22.084757789 -0700 > +++ pkg-plist 2014-06-10 09:27:25.280043239 -0700 > @@ -274,6 +274,8 @@ > lib/libvirt/connection-driver/libvirt_driver_secret.la > lib/libvirt/connection-driver/libvirt_driver_storage.so > lib/libvirt/connection-driver/libvirt_driver_storage.la > +lib/libvirt/connection-driver/libvirt_driver_uml.so > +lib/libvirt/connection-driver/libvirt_driver_uml.la > lib/libvirt/connection-driver/libvirt_driver_vbox.so > lib/libvirt/connection-driver/libvirt_driver_vbox.la This warning is not critical. Actually, UML should not be built on FreeBSD and I would need to disable it by default. For now I think the proper fix is to configure with '--without-uml' flag. As for the segfault, I think I have a guess. Could you please drop '--without-network' from CONFIGURE_ARGS in the port's Makefile and try to rebuild? Roman Bogorodskiy pgpzBHVhXENdD.pgp Description: PGP signature
Re: libvirt and bhyve problems
On Tue, Jun 10, 2014 at 8:58 AM, Craig Rodrigues wrote: > On Tue, Jun 10, 2014 at 4:43 AM, Roman Bogorodskiy wrote: >> Hi Craig, >> >> It's a little unfortunate that there's no stacktrace, though we can try >> to see what's going on without it. >> >> Could you please edit libvirtd.conf (should be something like >> /usr/local/etc/libvirtd.conf if installed from port) to add: >> >> log_level = 2 >> >> then run libvirtd by hand in foreground: > > OK, I added log_level = 2 to /usr/local/etc/libvirt/libvirtd.conf > and ran libvirtd in the foreground: > > 2014-06-10 15:53:26.846+: 34485593088: info : libvirt version: 1.2.5 > 2014-06-10 15:53:26.846+: 34485593088: warning : > virDriverLoadModule:63 : Module > /usr/local/lib/libvirt/connection-driver/libvirt_driver_uml.so not > accessible I saw the above warning, so I tried patching the port with this: --- pkg-plist.orig 2014-06-10 10:36:22.084757789 -0700 +++ pkg-plist 2014-06-10 09:27:25.280043239 -0700 @@ -274,6 +274,8 @@ lib/libvirt/connection-driver/libvirt_driver_secret.la lib/libvirt/connection-driver/libvirt_driver_storage.so lib/libvirt/connection-driver/libvirt_driver_storage.la +lib/libvirt/connection-driver/libvirt_driver_uml.so +lib/libvirt/connection-driver/libvirt_driver_uml.la lib/libvirt/connection-driver/libvirt_driver_vbox.so lib/libvirt/connection-driver/libvirt_driver_vbox.la However, when I restarted libvirtd, I got different errors: 2014-06-10 17:38:50.269+: 34485593088: info : libvirt version: 1.2.5 2014-06-10 17:38:50.269+: 34485593088: error : virDriverLoadModule:71 : failed to load module /usr/local/lib/libvirt/connection-driver/libvirt_driver_uml.so /usr/local/lib/libvirt/connection-driver/libvirt_driver_uml.so: Undefined symbol "inotify_add_watch" 2014-06-10 17:38:50.563+: 34485605376: error : virExec:417 : Cannot find 'pm-is-supported' in path: No such file or directory 2014-06-10 17:38:50.563+: 34485605376: warning : virQEMUCapsInit:948 : Failed to get host power management capabilities 2014-06-10 17:38:50.575+: 34485605376: info : virDomainObjListLoadAllConfigs:18249 : Scanning for configs in /usr/local/var/run/libvirt/qemu 2014-06-10 17:38:50.575+: 34485605376: info : virDomainObjListLoadAllConfigs:18249 : Scanning for configs in /usr/local/etc/libvirt/qemu 2014-06-10 17:38:50.663+: 34485605376: info : virDomainObjListLoadAllConfigs:18249 : Scanning for configs in /usr/local/etc/libvirt/bhyve 2014-06-10 17:38:50.663+: 34485605376: info : virDomainObjListLoadAllConfigs:18273 : Loading config file 'bhyve.xml' -- Craig ___ freebsd-virtualization@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization To unsubscribe, send any mail to "freebsd-virtualization-unsubscr...@freebsd.org"
Re: Bheve: Slow linux syscalls on AMD
Hi Nils, CentOS is a bit bitchy about booting from harddisk. You'll have to provide a shorter "linux"-grub-line than what's written in the "grub.conf"-file; some- thing like this: linux /vmlinuz-2.6.32-431.el6.x86_64 ro root=/dev/mapper/VolGroup-lv_root initrd /initramfs-2.6.32-431.el6.x86_64.img or else the LVM-groups won't get activated. Yep, I think that's just the grubv1 versus grubv2 syntax differences :( Ubuntu/Debian are at least grubv2-native which makes things a bit easier. For what it's worth, this is my "bhyve"-command line: That looks fine. later, Peter. ___ freebsd-virtualization@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization To unsubscribe, send any mail to "freebsd-virtualization-unsubscr...@freebsd.org"
Re: Bheve: Slow linux syscalls on AMD
Hi Willem, Willem Jan Withagen wrote: > All Ubuntus I have installed in VMs give more or less perform the > same... (13.10, 12.04 LTS) > Although the overhead is just 5% and more evenly distibuted over both > vPCUs. I can confirm this. Just tested with an Ubuntu Server 12.04.3 ISO. Load on "vcpu 0" is now wobbling around 3% - 4%. Sum on all vcpus is around 5%. So, the Redhat clones do something different... Regards, Nils ___ freebsd-virtualization@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization To unsubscribe, send any mail to "freebsd-virtualization-unsubscr...@freebsd.org"
Re: Bheve: Slow linux syscalls on AMD
Hi Peter, Peter Grehan wrote: >> Confirmed. Running a bhyved 3-vCPU-"CentOS 6.5", the host CPU load for >> "vcpu 0" is around 12% now. > > Doh, that's not good - haven't given Centos 6.5 a try; will now to > investigate this. CentOS is a bit bitchy about booting from harddisk. You'll have to provide a shorter "linux"-grub-line than what's written in the "grub.conf"-file; some- thing like this: linux /vmlinuz-2.6.32-431.el6.x86_64 ro root=/dev/mapper/VolGroup-lv_root initrd /initramfs-2.6.32-431.el6.x86_64.img or else the LVM-groups won't get activated. >> Ping times to the VM are fluctuating - ranging from 0.185ms to 35ms. > > Hmmm, will look at that as well. For what it's worth, this is my "bhyve"-command line: === bhyve \ -w \ -c 3 \ -m 4096M \ -A \ -H \ -P \ -l com1,/dev/nmdm0A \ -s 0,hostbridge \ -s 1,lpc \ -s 2,ahci-cd,/mnt/iso/${ISO} \ -s 3,virtio-blk,lun0 \ -s 4,virtio-blk,lun1 \ -s 5,virtio-net,tap0 \ ${VM} === My host CPU is an "AMD Phenom(tm) II X6 1055T Processor"... Regards, Nils ___ freebsd-virtualization@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization To unsubscribe, send any mail to "freebsd-virtualization-unsubscr...@freebsd.org"
Re: Bheve: Slow linux syscalls on AMD
On 2014-06-10 17:34, Peter Grehan wrote: Hi Nils, Confirmed. Running a bhyved 3-vCPU-"CentOS 6.5", the host CPU load for "vcpu 0" is around 12% now. Doh, that's not good - haven't given Centos 6.5 a try; will now to investigate this. All Ubuntus I have installed in VMs give more or less perform the same... (13.10, 12.04 LTS) Although the overhead is just 5% and more evenly distibuted over both vPCUs. --WjW ___ freebsd-virtualization@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization To unsubscribe, send any mail to "freebsd-virtualization-unsubscr...@freebsd.org"
Re: libvirt and bhyve problems
On Tue, Jun 10, 2014 at 4:43 AM, Roman Bogorodskiy wrote: > Hi Craig, > > It's a little unfortunate that there's no stacktrace, though we can try > to see what's going on without it. > > Could you please edit libvirtd.conf (should be something like > /usr/local/etc/libvirtd.conf if installed from port) to add: > > log_level = 2 > > then run libvirtd by hand in foreground: OK, I added log_level = 2 to /usr/local/etc/libvirt/libvirtd.conf and ran libvirtd in the foreground: 2014-06-10 15:53:26.846+: 34485593088: info : libvirt version: 1.2.5 2014-06-10 15:53:26.846+: 34485593088: warning : virDriverLoadModule:63 : Module /usr/local/lib/libvirt/connection-driver/libvirt_driver_uml.so not accessible 2014-06-10 15:53:27.023+: 34485605376: error : virExec:417 : Cannot find 'pm-is-supported' in path: No such file or directory 2014-06-10 15:53:27.023+: 34485605376: warning : virQEMUCapsInit:948 : Failed to get host power management capabilities 2014-06-10 15:53:27.034+: 34485605376: info : virDomainObjListLoadAllConfigs:18249 : Scanning for configs in /usr/local/var/run/libvirt/qemu 2014-06-10 15:53:27.034+: 34485605376: info : virDomainObjListLoadAllConfigs:18249 : Scanning for configs in /usr/local/etc/libvirt/qemu 2014-06-10 15:53:27.130+: 34485605376: info : virDomainObjListLoadAllConfigs:18249 : Scanning for configs in /usr/local/etc/libvirt/bhyve 2014-06-10 15:53:53.668+: 34485598208: error : virNetDevGetMTU:404 : Cannot get interface MTU on 'virbr0': Device not configured Segmentation fault (core dumped) I got that coredump after doing: virsh -c 'bhyve:///system' virsh # define /tmp/bhyve.xml virsh # start bhyve ___ freebsd-virtualization@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization To unsubscribe, send any mail to "freebsd-virtualization-unsubscr...@freebsd.org"
Re: Bheve: Slow linux syscalls on AMD
Hi Nils, Confirmed. Running a bhyved 3-vCPU-"CentOS 6.5", the host CPU load for "vcpu 0" is around 12% now. Doh, that's not good - haven't given Centos 6.5 a try; will now to investigate this. Ping times to the VM are fluctuating - ranging from 0.185ms to 35ms. Hmmm, will look at that as well. Now it's time to scrap all ESXi hosts here... ;-) Great to hear, but you may want to hold off a little bit - there are still some bugfixes in the pipe. Hoping to be mostly done in a week or so. later, Peter. ___ freebsd-virtualization@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization To unsubscribe, send any mail to "freebsd-virtualization-unsubscr...@freebsd.org"
Re: Bheve: Slow linux syscalls on AMD
On 2014-06-10 15:59, Peter Grehan wrote: Hi Willem, On 2014-06-09 23:04, Peter Grehan wrote: Still seeing that a 2 CPU VM is using about 100% of 1 cpu when idleing, but that is another minor challenge. Fixed in r267305 Ack. There is still a small difference in behaviour between Linux and FreeBSD. But I'd call that negectable... PIDSIZE STATE C TIMEWCPU COMMAND 70250 2075M vmidle 5 0:17 2.69% bhyve: ubuntu-14.04 (bhyve){vcpu 1} 70250 2075M vmidle 2 0:22 1.37% bhyve: ubuntu-14.04 (bhyve){vcpu 0} Thanks - saw similar behaviour on my tiny Sempron but wasn't sure if it was the slow CPU/clock aliasing etc. Time to bring out KTR and see what's going on. I've got KTR compiled in, but last time I switched it on. I got swamped in traffic, and I sort of got locked out of the server... :( Could also be because I was writing it to a file as well. So you'll have to help/tell me what to do. --WjW ___ freebsd-virtualization@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization To unsubscribe, send any mail to "freebsd-virtualization-unsubscr...@freebsd.org"
Re: Bheve: Slow linux syscalls on AMD
Hi Willem, On 2014-06-09 23:04, Peter Grehan wrote: Still seeing that a 2 CPU VM is using about 100% of 1 cpu when idleing, but that is another minor challenge. Fixed in r267305 Ack. There is still a small difference in behaviour between Linux and FreeBSD. But I'd call that negectable... PIDSIZE STATE C TIMEWCPU COMMAND 70250 2075M vmidle 5 0:17 2.69% bhyve: ubuntu-14.04 (bhyve){vcpu 1} 70250 2075M vmidle 2 0:22 1.37% bhyve: ubuntu-14.04 (bhyve){vcpu 0} Thanks - saw similar behaviour on my tiny Sempron but wasn't sure if it was the slow CPU/clock aliasing etc. Time to bring out KTR and see what's going on. later, Peter. ___ freebsd-virtualization@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization To unsubscribe, send any mail to "freebsd-virtualization-unsubscr...@freebsd.org"
Re: libvirt and bhyve problems
Craig Rodrigues wrote: > Roman, > > I have been reading your blog posts on using libvirt + bhyve > here: > > http://empt1e.blogspot.com/ > > and the libvirt bhyve documentation here: > http://libvirt.org/drvbhyve.html > > but am having problems reproducing the steps. > > I have a machine running: > FreeBSD 11.0-CURRENT FreeBSD 11.0-CURRENT #6 r266934M: Sat May 31 > 20:24:37 PDT 2014 > r...@crodrigues.org:/usr/obj/opt2/branches/head/sys/GENERIC amd64 > > > I applied the following patches to the devel/libvirt port to fix > compilation problems for bhyve support: > > http://lists.freebsd.org/pipermail/freebsd-virtualization/2014-June/002586.html > > I then did the following: > > BUILD AND CONFIGURE > === > cd /usr/ports/devel/libport > make config > (I made sure bhyve and QEMU support were enabled > make > make install > > > LIBVIRT CONFIG > == > > I created the following /tmp/bhyve.xml file: > > > > bhyve > df3be7e7-a104-11e3-aeb0-50e5492bd3dc > 219136 > 219136 > 1 > >hvm > > > > > > > > > > > > > > > > > > > > > RUNNING > > > I did the following as root: > > service libvirtd restart > virsh -c 'bhyve:///system' > > Then I ran these commands from the virsh prompt: > > virsh # define /tmp/bhyve.xml > Domain bhyve defined from /tmp/bhyve.xml > > virsh # start bhyve > error: Failed to start domain bhyve > error: End of file while reading data: Input/output error > error: Failed to reconnect to the hypervisor > > > At this point libvirtd process crashed with a /libvirtd.core process , > but for some reason I could not get a valid stacktrace. > > Can you provide assistance to get this working? > > Ultimately, I want to get the Jenkins libvirt plugin ( > https://wiki.jenkins-ci.org/display/JENKINS/Libvirt+Slaves+Plugin ) > to work. > > Thanks. Hi Craig, It's a little unfortunate that there's no stacktrace, though we can try to see what's going on without it. Could you please edit libvirtd.conf (should be something like /usr/local/etc/libvirtd.conf if installed from port) to add: log_level = 2 then run libvirtd by hand in foreground: # libvirtd and then try to start the domain again and post a couple of lines it prints before crashing? Thanks, Roman Bogorodskiy ___ freebsd-virtualization@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization To unsubscribe, send any mail to "freebsd-virtualization-unsubscr...@freebsd.org"
Re: Bheve: Slow linux syscalls on AMD
Hi Peter, Peter Grehan wrote: >> Still seeing that a 2 CPU VM is using about 100% of 1 cpu when idleing, >> but that is another minor challenge. > > Fixed in r267305 Confirmed. Running a bhyved 3-vCPU-"CentOS 6.5", the host CPU load for "vcpu 0" is around 12% now. The remaining vcpus are all near or at zero load. Ping times to the VM are fluctuating - ranging from 0.185ms to 35ms. "iperf" throughput tests results around 700Mbit/s though. Now it's time to scrap all ESXi hosts here... ;-) Thanks a lot to you guys and regards, Nils ___ freebsd-virtualization@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization To unsubscribe, send any mail to "freebsd-virtualization-unsubscr...@freebsd.org"
Re: Bheve: Slow linux syscalls on AMD
On 2014-06-09 23:04, Peter Grehan wrote: Still seeing that a 2 CPU VM is using about 100% of 1 cpu when idleing, but that is another minor challenge. Fixed in r267305 Ack. There is still a small difference in behaviour between Linux and FreeBSD. But I'd call that negectable... PIDSIZE STATE C TIMEWCPU COMMAND 70250 2075M vmidle 5 0:17 2.69% bhyve: ubuntu-14.04 (bhyve){vcpu 1} 70250 2075M vmidle 2 0:22 1.37% bhyve: ubuntu-14.04 (bhyve){vcpu 0} 70296 2075M vmidle 1 0:04 0.00% bhyve: freebsd-10 (bhyve){vcpu 0} 70296 2075M vmidle 4 0:02 0.00% bhyve: freebsd-10 (bhyve){vcpu 1} Inside the VMs the perception is totally the other way around when just running top and system processes: ubuntu14: load average: 0.01, 0.02, 0.02 FreeBSD: load averages: 0.11, 0.18, 0.09 So IMHO things get lost tn the margins of (incorrect) measurement. Next thing to check is how older ubuntu's work. Espacially those with TLS and a 2.6 kernel. ( I think there is still one release not EOL) And then start tests for CentOS. Thanx, --WjW ___ freebsd-virtualization@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization To unsubscribe, send any mail to "freebsd-virtualization-unsubscr...@freebsd.org"