From pkrempa at redhat.com Fri Jul 1 14:25:17 2022 From: pkrempa at redhat.com (Peter Krempa) Date: Fri, 1 Jul 2022 16:25:17 +0200 Subject: Storage Pool - NFS v4.1 In-Reply-To: References: Message-ID: On Wed, Jun 29, 2022 at 17:58:28 +0200, Charles Koprowski wrote: > Le jeu. 23 juin 2022 ? 17:19, Peter Krempa a ?crit : > > > > > I've posted a patch that fixes this: > > > > https://listman.redhat.com/archives/libvir-list/2022-June/232541.html > > > > > Thank you ! > > This has been reported to Canonical support : > https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1980134 It's now pushed as commit c44930d932203b4a58dccbbeaa814fff6cea8216 From dberrange at yahoo.com Fri Jul 1 15:27:46 2022 From: dberrange at yahoo.com (dberrange at yahoo.com) Date: Fri, 1 Jul 2022 15:27:46 +0000 (UTC) Subject: Testing DKIM handling In-Reply-To: <348903447.5421722.1656433445816@mail.yahoo.com> References: <1989034383.1604187.1652432612598.ref@mail.yahoo.com> <1989034383.1604187.1652432612598@mail.yahoo.com> <1983416250.514837.1654693118987@mail.yahoo.com> <348903447.5421722.1656433445816@mail.yahoo.com> Message-ID: <766755396.130791.1656689266342@mail.yahoo.com> Testing DKIM handling with new mail server settings On Tuesday, 28 June 2022 at 17:24:05 BST, dberrange at yahoo.com wrote: Another test of DKIM handling in Red Hat mail servers, apologies for the continued nuisance. On Wednesday, 8 June 2022 at 13:58:39 BST, dberrange at yahoo.com wrote: Further DKIM handling test, apologies for the noise. On Friday, 13 May 2022, 10:03:32 BST, dberrange at yahoo.com wrote: Testing DKIM handling RH mail servers -------------- next part -------------- An HTML attachment was scrubbed... URL: From upelaez.hdz at ciencias.unam.mx Fri Jul 1 09:37:55 2022 From: upelaez.hdz at ciencias.unam.mx (=?UTF-8?Q?Uriel_Emmanuel_Pelaez_Hern=C3=A1ndez?=) Date: Fri, 1 Jul 2022 04:37:55 -0500 Subject: Incomplete information in the website Wiki for libvirt.org Message-ID: Dear Web Marster from wiki.libvirt.org, I tried to look for the libvirtd, the demon that is suppose to run under Linux/Unix environment, but your site didn't show any information. Only a statement appeared: "Create the page libvirtd " Please, update your site or suggest any other weblink with the information. In theory CygWin use your package, but the information is incomplete too, about this issue. I send this mail to these both Email address by the information displayed in your wiki, about the contact address to solve this kind of problems. By now, Google Service in my region is deprecated, so the information that the WebBrowser display is not the best. I send this request from my Email of Graduated Student form the University domain. Best Regards, Mr. Pel?ez Uriel. Mexico City -------------- next part -------------- An HTML attachment was scrubbed... URL: From mkletzan at redhat.com Mon Jul 4 11:19:27 2022 From: mkletzan at redhat.com (Martin Kletzander) Date: Mon, 4 Jul 2022 13:19:27 +0200 Subject: Incomplete information in the website Wiki for libvirt.org In-Reply-To: References: Message-ID: On Fri, Jul 01, 2022 at 04:37:55AM -0500, Uriel Emmanuel Pelaez Hern?ndez wrote: >Dear Web Marster from wiki.libvirt.org, > >I tried to look for the libvirtd, the demon that is suppose to run under >Linux/Unix environment, >but your site didn't show any information. Only a statement appeared: >"Create the page libvirtd " > Hi, we are slowly migrating the wiki pages to knowledge base articles due to various issues with the wiki. >Please, update your site or suggest any other weblink with the information. > Have a look at our docs page: https://libvirt.org/docs.html where you might find what you are looking for. There is a particular page about daemons here: https://libvirt.org/daemons.html >In theory CygWin use your package, but the information is incomplete too, >about this issue. > >I send this mail to these both Email address by the information displayed >in your wiki, about the contact address to solve this kind of problems. > Unfortunately I am not sure what are you trying to solve, so I don't know what clearer pointers to give you. >By now, Google Service in my region is deprecated, so the information that >the WebBrowser display is not the best. > >I send this request from my Email of Graduated Student form the University >domain. > >Best Regards, >Mr. Pel?ez Uriel. >Mexico City Have a nice day, Martin -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: not available URL: From scox at redhat.com Wed Jul 6 15:43:41 2022 From: scox at redhat.com (Stan Cox) Date: Wed, 6 Jul 2022 11:43:41 -0400 Subject: systemtap stapvirt tool Message-ID: <48846924-e6a4-0e7a-ec27-3b145726c99a@redhat.com> I am having a quandary with libvirt and am wondering if someone can shed some light. Systemtap converts a probing and instrumentation language into a kernel module. The module can optionally be run remotely via ssh or libvirt. The libvirt mechanism is not working (not yet sure of timing of regression) The systemtap stap command pipes to a stapvirt command that is the libvirt interface. The remote is running a stapsh tool that receives the requests. The initial commands are sent and received okay (strace output on remote) but never receives the stap kernel module: # local sent option data request [pid 11959] read(3, "option data\n", 4096) = 12 # remote says OK [pid 11959] write(3, "OK\n", 3) = 3 [pid 11959] poll([{fd=3, events=POLLIN}, {fd=0, events=0}, {fd=0, events=0}], 3, -1) = 1 ([{fd=3, revents=POLLIN}]) [pid 11959] --- SIGIO {si_signo=SIGIO, si_code=SI_KERNEL} --- [pid 11959] poll([{fd=3, events=POLLHUP}], 1, 0) = 0 (Timeout) [pid 11959] rt_sigreturn({mask=[]}) = 1 # local sent file ... request to download the module [pid 11959] read(3, "file 926928 stap_1f18b4b54e74602"..., 4096) = 58 # remote opens the module [pid 11959] openat(AT_FDCWD, "stap_1f18b4b54e74602a0a1f0685f2f7333e_1006.ko", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 4 # but never receives it [pid 11959] read(3, "", 4096) = 0 The local sets up callbacks for stdin, stdout, stream: ctxt.stdin_w = virEventAddHandle(STDIN_FILENO, VIR_EVENT_HANDLE_READABLE, stdin_event, &ctxt, NULL); ... ctxt.stdout_w = virEventAddHandle(STDOUT_FILENO, 0, stdout_event, &ctxt, NULL); ... virStreamEventAddCallback(ctxt.st, VIR_STREAM_EVENT_READABLE | VIR_EVENT_HANDLE_WRITABLE, stream_event, &ctxt, NULL) < 0) Then starts an even loop while (!disconnect) { if (virEventRunDefaultImpl() != 0) break; } stream_event is notified for the command requests, but is not notified for the kernel module chunks: stdin_event excerpt: bytes_read = read(fd, ctxt->termbuf + ctxt->termbuf_off, sizeof(ctxt->termbuf) - ctxt->termbuf_off); ... ctxt->termbuf_off += bytes_read; ... if (ctxt->termbuf_off) { // we have stuff to write to the stream virStreamEventUpdateCallback(ctxt->st, VIR_STREAM_EVENT_READABLE | VIR_STREAM_EVENT_WRITABLE); } stream_event excerpt: if ((events & VIR_STREAM_EVENT_READABLE) && (ctxt->stbuf_off < sizeof(ctxt->stbuf))) { int bytes_recv = virStreamRecv(st, ctxt->stbuf + ctxt->stbuf_off, sizeof(ctxt->stbuf) - ctxt->stbuf_off); I notice https://libvirt.org/html/libvirt-libvirt-stream.html has an example using virStreamSend. Is that the preferred way to do the above? From berrange at redhat.com Wed Jul 6 16:26:14 2022 From: berrange at redhat.com (Daniel =?utf-8?B?UC4gQmVycmFuZ8Op?=) Date: Wed, 6 Jul 2022 17:26:14 +0100 Subject: systemtap stapvirt tool In-Reply-To: <48846924-e6a4-0e7a-ec27-3b145726c99a@redhat.com> References: <48846924-e6a4-0e7a-ec27-3b145726c99a@redhat.com> Message-ID: On Wed, Jul 06, 2022 at 11:43:41AM -0400, Stan Cox wrote: > I am having a quandary with libvirt and am wondering if someone can shed > some light. > > Systemtap converts a probing and instrumentation language into a kernel > module. The module can optionally be run remotely via ssh or libvirt. The > libvirt mechanism is not working (not yet sure of timing of regression) The > systemtap stap command pipes to a stapvirt command that is the libvirt > interface. The remote is running a stapsh tool that receives the requests. > The initial commands are sent and received okay (strace output on remote) > but never receives the stap kernel module: > > # local sent option data request > [pid 11959] read(3, "option data\n", 4096) = 12 > # remote says OK > [pid 11959] write(3, "OK\n", 3) = 3 > [pid 11959] poll([{fd=3, events=POLLIN}, {fd=0, events=0}, {fd=0, > events=0}], 3, -1) = 1 ([{fd=3, revents=POLLIN}]) > [pid 11959] --- SIGIO {si_signo=SIGIO, si_code=SI_KERNEL} --- > [pid 11959] poll([{fd=3, events=POLLHUP}], 1, 0) = 0 (Timeout) > [pid 11959] rt_sigreturn({mask=[]}) = 1 > # local sent file ... request to download the module > [pid 11959] read(3, "file 926928 stap_1f18b4b54e74602"..., 4096) = 58 > # remote opens the module > [pid 11959] openat(AT_FDCWD, > "stap_1f18b4b54e74602a0a1f0685f2f7333e_1006.ko", O_WRONLY|O_CREAT|O_TRUNC, > 0666) = 4 > # but never receives it > [pid 11959] read(3, "", 4096) = 0 > > > The local sets up callbacks for stdin, stdout, stream: > ctxt.stdin_w = virEventAddHandle(STDIN_FILENO, > VIR_EVENT_HANDLE_READABLE, > stdin_event, &ctxt, NULL); > ... > ctxt.stdout_w = virEventAddHandle(STDOUT_FILENO, 0, > stdout_event, &ctxt, NULL); > ... > virStreamEventAddCallback(ctxt.st, VIR_STREAM_EVENT_READABLE | > VIR_EVENT_HANDLE_WRITABLE, > stream_event, &ctxt, NULL) < 0) > > Then starts an even loop > while (!disconnect) { > if (virEventRunDefaultImpl() != 0) > break; > } > > > stream_event is notified for the command requests, but is not notified for > the kernel module chunks: > > stdin_event excerpt: > bytes_read = read(fd, ctxt->termbuf + ctxt->termbuf_off, > sizeof(ctxt->termbuf) - ctxt->termbuf_off); > ... > ctxt->termbuf_off += bytes_read; > ... > if (ctxt->termbuf_off) { // we have stuff to write to the stream > virStreamEventUpdateCallback(ctxt->st, VIR_STREAM_EVENT_READABLE > | VIR_STREAM_EVENT_WRITABLE); > } > > stream_event excerpt: > > if ((events & VIR_STREAM_EVENT_READABLE) > && (ctxt->stbuf_off < sizeof(ctxt->stbuf))) { > int bytes_recv = virStreamRecv(st, ctxt->stbuf + ctxt->stbuf_off, > sizeof(ctxt->stbuf) - > ctxt->stbuf_off); > > I notice > https://libvirt.org/html/libvirt-libvirt-stream.html > has an example using virStreamSend. Is that the preferred way to do the > above? The example is fairly simplistic and wouldn't suit your need where you have interleaved bi-directional I/O The virsh console code is likely the best matching example that we know is pretty reliable https://gitlab.com/libvirt/libvirt/-/blob/master/tools/virsh-console.c With regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :| From scox at redhat.com Wed Jul 6 21:25:32 2022 From: scox at redhat.com (Stan Cox) Date: Wed, 6 Jul 2022 17:25:32 -0400 Subject: systemtap stapvirt tool In-Reply-To: References: <48846924-e6a4-0e7a-ec27-3b145726c99a@redhat.com> Message-ID: <77b85dce-7bda-c8e9-d83e-edb9b694d12a@redhat.com> stapvirt seems to have a quite similar layout to virsh-console. All is fine for short packets: 1. Send file command to remote, stdin_event gets event stdin_event:1000 fd 0 events 0x1 stbuf_off 0 stbuf 0x7ffd0e99f848 termbuf_off 58 buf "file 926928 stap_1f18b4b" 2. stream_event gets event stream_event:1067 events 0x2 stbuf_off 0 stbuf 0x7ffd0e99f848 buf "file 926928 stap_1f18b4b" but stream_event is not triggered when kernel module is being sent in chunks 3. stdin_event reads first chunk of kernel module (which does virStreamEventUpdateCallback when it notices buffer contents) stdin_event:1000 fd 0 events 0x1 stbuf_off 0 stbuf 0x7ffd0e99f848 termbuf_off 1024 buf "^?ELF^B^A^A" 4. but stream_event is never triggered What triggers stream_event to be called such that the 2 case would be triggered but not the 4 case? From berrange at redhat.com Thu Jul 7 08:07:14 2022 From: berrange at redhat.com (Daniel =?utf-8?B?UC4gQmVycmFuZ8Op?=) Date: Thu, 7 Jul 2022 09:07:14 +0100 Subject: systemtap stapvirt tool In-Reply-To: <77b85dce-7bda-c8e9-d83e-edb9b694d12a@redhat.com> References: <48846924-e6a4-0e7a-ec27-3b145726c99a@redhat.com> <77b85dce-7bda-c8e9-d83e-edb9b694d12a@redhat.com> Message-ID: On Wed, Jul 06, 2022 at 05:25:32PM -0400, Stan Cox wrote: > stapvirt seems to have a quite similar layout to virsh-console. All is fine > for short packets: > > 1. Send file command to remote, stdin_event gets event > stdin_event:1000 fd 0 events 0x1 stbuf_off 0 stbuf 0x7ffd0e99f848 > termbuf_off 58 buf "file 926928 stap_1f18b4b" > 2. stream_event gets event > stream_event:1067 events 0x2 stbuf_off 0 stbuf 0x7ffd0e99f848 buf "file > 926928 stap_1f18b4b" > > but stream_event is not triggered when kernel module is being sent in chunks > > 3. stdin_event reads first chunk of kernel module > (which does virStreamEventUpdateCallback when it notices buffer contents) > stdin_event:1000 fd 0 events 0x1 stbuf_off 0 stbuf 0x7ffd0e99f848 > termbuf_off 1024 buf "^?ELF^B^A^A" > 4. but stream_event is never triggered > > What triggers stream_event to be called such that the 2 case would be > triggered but not the 4 case? I don't know - as best I can tell all your logic matches what is in virsh console. What libvirt version are you testing with, and have you tried a differnt version ? With regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :| From scox at redhat.com Thu Jul 7 19:18:41 2022 From: scox at redhat.com (Stan Cox) Date: Thu, 7 Jul 2022 15:18:41 -0400 Subject: systemtap stapvirt tool In-Reply-To: References: <48846924-e6a4-0e7a-ec27-3b145726c99a@redhat.com> <77b85dce-7bda-c8e9-d83e-edb9b694d12a@redhat.com> Message-ID: <8cd7c629-24dc-fb17-6637-4080948e5377@redhat.com> I turned on: LIBVIRT_DEBUG=debug which shows the deviation, indicated by "->". The working case, stdin event followed by stream event is: stapvirt: ##### stdin_event:1000 fd 0 events 0x1 stbuf_off 0 stbuf 0x7fff259eecb8 termbuf_off 58 buf "file 926928 stap_b861775" 2022-07-07 17:20:55.565+0000: 353069: debug : virStreamEventUpdateCallback:1102 : stream=0x2013150, events=3 2022-07-07 17:20:55.565+0000: 353069: debug : virNetClientStreamEventTimerUpdate:86 : Check timer rx=(nil) cbEvents=3 2022-07-07 17:20:55.565+0000: 353069: debug : virNetClientStreamEventTimerUpdate:91 : Enabling event timer 2022-07-07 17:20:55.565+0000: 353069: info : virEventGLibTimeoutUpdate:395 : EVENT_GLIB_UPDATE_TIMEOUT: timer=1 interval=0 2022-07-07 17:20:55.565+0000: 353069: debug : virEventGLibTimeoutUpdate:406 : Update timeout data=0x2017e00 timer=1 interval=0 ms 2022-07-07 17:20:55.565+0000: 353069: debug : virEventRunDefaultImpl:341 : running default event implementation ->2022-07-07 17:20:55.565+0000: 353069: debug : virEventGLibTimeoutDispatch:303 : Dispatch timeout data=0x2017e00 cb=0x7fe5f98436a0 timer=1 opaque=0x200d170 2022-07-07 17:20:55.565+0000: 353069: info : virEventGLibTimeoutDispatch:306 : EVENT_GLIB_DISPATCH_TIMEOUT: timer=1 cb=0x7fe5f98436a0 opaque=0x200d170 2022-07-07 17:20:55.565+0000: 353069: debug : virNetClientStreamEventTimer:116 : Got Timer dispatch events=2 cbEvents=3 rx=(nil) stapvirt: ##### stream_event:1043 st 0x2013150 events 0x2 stbuf_off 0 stbuf 0x7fff259eecb8 The case where stream event is not hit is: stapvirt: ##### stdin_event:1000 fd 0 events 0x1 stbuf_off 0 stbuf 0x7fff259eecb8 termbuf_off 1024 buf "^?ELF^B^A^A" 2022-07-07 17:20:55.565+0000: 353069: debug : virStreamEventUpdateCallback:1102 : stream=0x2013150, events=3 2022-07-07 17:20:55.565+0000: 353069: debug : virNetClientStreamEventTimerUpdate:86 : Check timer rx=(nil) cbEvents=3 2022-07-07 17:20:55.565+0000: 353069: debug : virNetClientStreamEventTimerUpdate:91 : Enabling event timer 2022-07-07 17:20:55.565+0000: 353069: info : virEventGLibTimeoutUpdate:395 : EVENT_GLIB_UPDATE_TIMEOUT: timer=1 interval=0 2022-07-07 17:20:55.565+0000: 353069: debug : virEventGLibTimeoutUpdate:406 : Update timeout data=0x2017e00 timer=1 interval=0 ms 2022-07-07 17:20:55.566+0000: 353069: debug : virEventRunDefaultImpl:341 : running default event implementation -> 2022-07-07 17:20:55.566+0000: 353069: debug : virEventGLibHandleDispatch:113 : Dispatch handler data=0x201e600 watch=2 fd=0 events=1 opaque=0x7fff259ee8a0 2022-07-07 17:20:55.566+0000: 353069: info : virEventGLibHandleDispatch:116 : EVENT_GLIB_DISPATCH_HANDLE: watch=2 events=1 cb=0x4046e9 opaque=0x7fff259ee8a0 stapvirt: ##### stdin_event:975 fd 0 events 0x1 termbuf_off 1024 1024 Hits stream Doesn't hit stream ... ... virEventRunDefaultImpl:341 virEventRunDefaultImpl:341 virEventGLibHandleDispatch:113 virEventGLibTimeoutDispatch:303 virEventGLibTimeoutDispatch:306 virNetClientStreamEventTimer:116 virEventGLibHandleDispatch:116 stream_event stdin_event > What libvirt version are you testing with, and have you tried a differnt > version ? This is: libvirt-8.1.0-2.fc36.x86_64 I have not tried another version but will give that a shot. From hhan at redhat.com Wed Jul 13 11:00:17 2022 From: hhan at redhat.com (Han Han) Date: Wed, 13 Jul 2022 19:00:17 +0800 Subject: The default USB controller of pc machine type Message-ID: Hello, I found that the default USB controller for q35 machine type is qemu-xhci while for pc it is piix3-uhci. Here are the results(on qemu-kvm-7.0.0 qemu-kvm-7.0.0): ? ~ cat /tmp/usb.xml USB 1a81d4ef-6537-4ae8-b257-8a15e0c0525f 2097152 2097152 1 hvm /usr/libexec/qemu-kvm ? ~ virsh define /tmp/usb.xml && virsh dumpxml USB|grep usb Domain 'USB' defined from /tmp/usb.xml ? ~ cat /tmp/usb-pc.xml USB 1a81d4ef-6537-4ae8-b257-8a15e0c0525f 2097152 2097152 1 hvm /usr/libexec/qemu-kvm ? ~ virsh define /tmp/usb-pc.xml && virsh dumpxml USB|grep usb Domain 'USB' defined from /tmp/usb-pc.xml And the default usb controller for q35 has been added since: ed2049ea19 qemu: auto-add generic xhci rather than NEC xhci to Q35 domains As I know, pc machine supports qemu-xhci as well. Morever, the performance of qemu-xhci is better than piix3-uhci. So why not update the default usb controller of pc machine type to qemu-xhci? I think we can improve it here. -------------- next part -------------- An HTML attachment was scrubbed... URL: From berrange at redhat.com Wed Jul 13 11:04:54 2022 From: berrange at redhat.com (Daniel =?utf-8?B?UC4gQmVycmFuZ8Op?=) Date: Wed, 13 Jul 2022 12:04:54 +0100 Subject: The default USB controller of pc machine type In-Reply-To: References: Message-ID: On Wed, Jul 13, 2022 at 07:00:17PM +0800, Han Han wrote: > Hello, > I found that the default USB controller for q35 machine type is qemu-xhci > while for pc it is piix3-uhci. Here are the results(on qemu-kvm-7.0.0 > qemu-kvm-7.0.0): > ? ~ cat /tmp/usb.xml > > USB > 1a81d4ef-6537-4ae8-b257-8a15e0c0525f > 2097152 > 2097152 > 1 > > hvm > > > > /usr/libexec/qemu-kvm > > > > ? ~ virsh define /tmp/usb.xml && virsh dumpxml USB|grep usb > Domain 'USB' defined from /tmp/usb.xml > > > > > ? ~ cat /tmp/usb-pc.xml > > USB > 1a81d4ef-6537-4ae8-b257-8a15e0c0525f > 2097152 > 2097152 > 1 > > hvm > > > > /usr/libexec/qemu-kvm > > > > ? ~ virsh define /tmp/usb-pc.xml && virsh dumpxml USB|grep usb > Domain 'USB' defined from /tmp/usb-pc.xml > > > > And the default usb controller for q35 has been added since: > ed2049ea19 qemu: auto-add generic xhci rather than NEC xhci to Q35 domains > > As I know, pc machine supports qemu-xhci as well. Morever, the > performance of qemu-xhci is better than piix3-uhci. So why not update the > default usb controller of pc machine type to qemu-xhci? I think we can > improve it here. A qemu-xhci controller can be added to any x86 machien type regardless of the default, and most mgmt apps will do exactly that. With regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :| From hhan at redhat.com Fri Jul 15 06:36:36 2022 From: hhan at redhat.com (Han Han) Date: Fri, 15 Jul 2022 14:36:36 +0800 Subject: The default USB controller of pc machine type In-Reply-To: References: Message-ID: On Wed, Jul 13, 2022 at 7:04 PM Daniel P. Berrang? wrote: > On Wed, Jul 13, 2022 at 07:00:17PM +0800, Han Han wrote: > > Hello, > > I found that the default USB controller for q35 machine type is qemu-xhci > > while for pc it is piix3-uhci. Here are the results(on qemu-kvm-7.0.0 > > qemu-kvm-7.0.0): > > ? ~ cat /tmp/usb.xml > > > > USB > > 1a81d4ef-6537-4ae8-b257-8a15e0c0525f > > 2097152 > > 2097152 > > 1 > > > > hvm > > > > > > > > /usr/libexec/qemu-kvm > > > > > > > > ? ~ virsh define /tmp/usb.xml && virsh dumpxml USB|grep usb > > Domain 'USB' defined from /tmp/usb.xml > > > > > > > > > > ? ~ cat /tmp/usb-pc.xml > > > > USB > > 1a81d4ef-6537-4ae8-b257-8a15e0c0525f > > 2097152 > > 2097152 > > 1 > > > > hvm > > > > > > > > /usr/libexec/qemu-kvm > > > > > > > > ? ~ virsh define /tmp/usb-pc.xml && virsh dumpxml USB|grep usb > > Domain 'USB' defined from /tmp/usb-pc.xml > > > > > > > > And the default usb controller for q35 has been added since: > > ed2049ea19 qemu: auto-add generic xhci rather than NEC xhci to Q35 > domains > > > > As I know, pc machine supports qemu-xhci as well. Morever, the > > performance of qemu-xhci is better than piix3-uhci. So why not update the > > default usb controller of pc machine type to qemu-xhci? I think we can > > improve it here. > > A qemu-xhci controller can be added to any x86 machien type regardless > of the default, and most mgmt apps will do exactly that. > Does that mean, the default USB controller for a specific x86 machine type does NOT matter? And leave the default USB controller to up-layer mgmt apps? > > With regards, > Daniel > -- > |: https://berrange.com -o- > https://www.flickr.com/photos/dberrange :| > |: https://libvirt.org -o- > https://fstop138.berrange.com :| > |: https://entangle-photo.org -o- > https://www.instagram.com/dberrange :| > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jesonliang040705 at hotmail.com Fri Jul 15 08:08:44 2022 From: jesonliang040705 at hotmail.com (liang chaojun) Date: Fri, 15 Jul 2022 08:08:44 +0000 Subject: Why can not get the expected cpu topology after setting the maxcpu in xml? Message-ID: Hello all, I hit a issue that I'm not able to see the expected cpu topology in VM after setting the maxcpu arrtribute in domain. the xml look like below: 8 I notice that the cpu topoloy looked like below capture output from 'lscpu' tool which is totally different with my setting. CPU(s): 4 On-line CPU(s) list: 0-3 Thread(s) per core: 1 Core(s) per socket: 4 Socket(s): 1 NUMA node(s): 1 Vendor ID: GenuineIntel CPU family: 6 Model: 63 Model name: Intel(R) Xeon(R) CPU E5-2699 v3 @ 2.30GHz Besides i found it looked correct if i relpace 'vcpu' line with "8" that remove maxcpu value. Could you give me some information? Any comments are appreciated. Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: From berrange at redhat.com Fri Jul 15 10:03:11 2022 From: berrange at redhat.com (Daniel =?utf-8?B?UC4gQmVycmFuZ8Op?=) Date: Fri, 15 Jul 2022 11:03:11 +0100 Subject: The default USB controller of pc machine type In-Reply-To: References: Message-ID: On Fri, Jul 15, 2022 at 02:36:36PM +0800, Han Han wrote: > On Wed, Jul 13, 2022 at 7:04 PM Daniel P. Berrang? > wrote: > > > On Wed, Jul 13, 2022 at 07:00:17PM +0800, Han Han wrote: > > > Hello, > > > I found that the default USB controller for q35 machine type is qemu-xhci > > > while for pc it is piix3-uhci. Here are the results(on qemu-kvm-7.0.0 > > > qemu-kvm-7.0.0): > > > ? ~ cat /tmp/usb.xml > > > > > > USB > > > 1a81d4ef-6537-4ae8-b257-8a15e0c0525f > > > 2097152 > > > 2097152 > > > 1 > > > > > > hvm > > > > > > > > > > > > /usr/libexec/qemu-kvm > > > > > > > > > > > > ? ~ virsh define /tmp/usb.xml && virsh dumpxml USB|grep usb > > > Domain 'USB' defined from /tmp/usb.xml > > > > > > > > > > > > > > > ? ~ cat /tmp/usb-pc.xml > > > > > > USB > > > 1a81d4ef-6537-4ae8-b257-8a15e0c0525f > > > 2097152 > > > 2097152 > > > 1 > > > > > > hvm > > > > > > > > > > > > /usr/libexec/qemu-kvm > > > > > > > > > > > > ? ~ virsh define /tmp/usb-pc.xml && virsh dumpxml USB|grep usb > > > Domain 'USB' defined from /tmp/usb-pc.xml > > > > > > > > > > > > And the default usb controller for q35 has been added since: > > > ed2049ea19 qemu: auto-add generic xhci rather than NEC xhci to Q35 > > domains > > > > > > As I know, pc machine supports qemu-xhci as well. Morever, the > > > performance of qemu-xhci is better than piix3-uhci. So why not update the > > > default usb controller of pc machine type to qemu-xhci? I think we can > > > improve it here. > > > > A qemu-xhci controller can be added to any x86 machien type regardless > > of the default, and most mgmt apps will do exactly that. > > > > Does that mean, the default USB controller for a specific x86 machine type > does NOT matter? > And leave the default USB controller to up-layer mgmt apps? Yes, that's our general view for most defaults in fact. There's no single perfect defaults, so we let mgmt apps select thigns explicitly With regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :| From dberrange at yahoo.com Fri Jul 15 12:37:00 2022 From: dberrange at yahoo.com (dberrange at yahoo.com) Date: Fri, 15 Jul 2022 12:37:00 +0000 (UTC) Subject: Testing DKIM handling In-Reply-To: <766755396.130791.1656689266342@mail.yahoo.com> References: <1989034383.1604187.1652432612598.ref@mail.yahoo.com> <1989034383.1604187.1652432612598@mail.yahoo.com> <1983416250.514837.1654693118987@mail.yahoo.com> <348903447.5421722.1656433445816@mail.yahoo.com> <766755396.130791.1656689266342@mail.yahoo.com> Message-ID: <631727713.1047793.1657888620914@mail.yahoo.com> Hopefully the final test message, as DKIM is believed to be? correctly handled on the mailing lists now.... On Friday, 1 July 2022 at 16:27:46 BST, dberrange at yahoo.com wrote: Testing DKIM handling with new mail server settings On Tuesday, 28 June 2022 at 17:24:05 BST, dberrange at yahoo.com wrote: Another test of DKIM handling in Red Hat mail servers, apologies for the continued nuisance. On Wednesday, 8 June 2022 at 13:58:39 BST, dberrange at yahoo.com wrote: Further DKIM handling test, apologies for the noise. On Friday, 13 May 2022, 10:03:32 BST, dberrange at yahoo.com wrote: Testing DKIM handling RH mail servers -------------- next part -------------- An HTML attachment was scrubbed... URL: From mprivozn at redhat.com Fri Jul 15 14:02:27 2022 From: mprivozn at redhat.com (=?UTF-8?B?TWljaGFsIFByw612b3puw61r?=) Date: Fri, 15 Jul 2022 16:02:27 +0200 Subject: Testing DKIM handling In-Reply-To: <631727713.1047793.1657888620914@mail.yahoo.com> References: <1989034383.1604187.1652432612598.ref@mail.yahoo.com> <1989034383.1604187.1652432612598@mail.yahoo.com> <1983416250.514837.1654693118987@mail.yahoo.com> <348903447.5421722.1656433445816@mail.yahoo.com> <766755396.130791.1656689266342@mail.yahoo.com> <631727713.1047793.1657888620914@mail.yahoo.com> Message-ID: On 7/15/22 14:37, dberrange at yahoo.com wrote: > Hopefully the final test message, as DKIM is believed to be? correctly > handled on the mailing lists now.... > Yay! ? Michal From jesonliang040705 at hotmail.com Mon Jul 25 05:10:26 2022 From: jesonliang040705 at hotmail.com (liang chaojun) Date: Mon, 25 Jul 2022 05:10:26 +0000 Subject: Eject CD ROM medium fails with 'Tray of device is not open' Message-ID: Hi Guys, I have hit an issue on testing against our testbed, It's failed to eject cdrom media after reboot from installed the guest OS. The reproduce step: 1. Attach a block device with a ISO media and start install VM from ISO. 2.
3. After installed the OS and reboot from system disk successful. 4. Then I want to eject CDROM through update device with the xml like below or using virsh tool 'virsh change-media iso_test hda --eject' 5. All those will failed at "internal error: unable to execute QEMU command 'blockdev-remove-medium': Tray of device 'ide0-0-0' is not open"
block info looks like below: virsh qemu-monitor-command iso_test --hmp info block setlocale: No such file or directory libvirt-6-format: /dev/disk/by-id/pbdx-vol-cfe60dca-c271-491b-be3c-11fa8d7625a4 (raw, read-only) Attached to: ide0-0-0 Removable device: locked, tray closed Cache mode: writeback Reproduce envrionment: Operating system: rhat8.4 Architecture:x86 kernel version:4.18.0-305 libvirt version:v7.9.0(private build) Hypervisor and version:QEMU 5.1.0(private build) Is there any workaround? Any comments are appreciated. Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: From eskultet at redhat.com Mon Jul 25 07:50:28 2022 From: eskultet at redhat.com (Erik Skultety) Date: Mon, 25 Jul 2022 09:50:28 +0200 Subject: Eject CD ROM medium fails with 'Tray of device is not open' In-Reply-To: References: Message-ID: On Mon, Jul 25, 2022 at 05:10:26AM +0000, liang chaojun wrote: > Hi Guys, > > I have hit an issue on testing against our testbed, It's failed to eject cdrom media after reboot from installed the guest OS. Sounds like this one: https://gitlab.com/qemu-project/qemu/-/issues/933 so it may we worth following up with it. If it's the same issue (from your description it sure looks like it) then it is a race condition in the IDE emulation in QEMU and we had to disable an upstream integration test in libvirt for the suite to stop failing :(. Regards, Erik From jesonliang040705 at hotmail.com Mon Jul 25 08:09:59 2022 From: jesonliang040705 at hotmail.com (liang chaojun) Date: Mon, 25 Jul 2022 08:09:59 +0000 Subject: =?gb2312?B?u9i4tDogRWplY3QgQ0QgUk9NIG1lZGl1bSBmYWlscyB3aXRoICdUcmF5IG9m?= =?gb2312?Q?_device_is_not_open'?= In-Reply-To: References: Message-ID: Thanks Erik firstly for your response, I seems have high probability to hit this issue now. Is there any workaround solution? Thanks! ________________________________ ???: Erik Skultety ????: 2022?7?25? 15:50 ???: liang chaojun ??: libvirt-users at redhat.com ??: Re: Eject CD ROM medium fails with 'Tray of device is not open' On Mon, Jul 25, 2022 at 05:10:26AM +0000, liang chaojun wrote: > Hi Guys, > > I have hit an issue on testing against our testbed, It's failed to eject cdrom media after reboot from installed the guest OS. Sounds like this one: https://gitlab.com/qemu-project/qemu/-/issues/933 so it may we worth following up with it. If it's the same issue (from your description it sure looks like it) then it is a race condition in the IDE emulation in QEMU and we had to disable an upstream integration test in libvirt for the suite to stop failing :(. Regards, Erik -------------- next part -------------- An HTML attachment was scrubbed... URL: From eskultet at redhat.com Mon Jul 25 08:25:04 2022 From: eskultet at redhat.com (Erik Skultety) Date: Mon, 25 Jul 2022 10:25:04 +0200 Subject: =?utf-8?B?5Zue5aSN?= =?utf-8?Q?=3A?= Eject CD ROM medium fails with 'Tray of device is not open' In-Reply-To: References: Message-ID: On Mon, Jul 25, 2022 at 08:09:59AM +0000, liang chaojun wrote: > Thanks Erik firstly for your response, I seems have high probability to hit this issue now. > Is there any workaround solution? > > Thanks! Try the SATA emulated backend instead of IDE for the CDROM drive. Since you claim to have a high probability reproducer rate, I'd like to kindly ask you to update the issue I linked with your setup and steps to help QEMU folks hunting the bug down? Regards, Erik > ________________________________ > ???: Erik Skultety > ????: 2022?7?25? 15:50 > ???: liang chaojun > ??: libvirt-users at redhat.com > ??: Re: Eject CD ROM medium fails with 'Tray of device is not open' > > On Mon, Jul 25, 2022 at 05:10:26AM +0000, liang chaojun wrote: > > Hi Guys, > > > > I have hit an issue on testing against our testbed, It's failed to eject cdrom media after reboot from installed the guest OS. > > Sounds like this one: > https://gitlab.com/qemu-project/qemu/-/issues/933 > > so it may we worth following up with it. If it's the same issue (from your > description it sure looks like it) then it is a race condition in the IDE > emulation in QEMU and we had to disable an upstream integration test in libvirt > for the suite to stop failing :(. > > Regards, > Erik > From yshxxsjt715 at gmail.com Tue Jul 26 06:49:21 2022 From: yshxxsjt715 at gmail.com (Jiatong Shen) Date: Tue, 26 Jul 2022 14:49:21 +0800 Subject: how to get vm uptime through libvirt api Message-ID: Hello community, I would like to know if there is an api to get a virtual machine's uptime. Thank you in advance for the help. -- Best Regards, Jiatong Shen -------------- next part -------------- An HTML attachment was scrubbed... URL: From mprivozn at redhat.com Tue Jul 26 07:15:59 2022 From: mprivozn at redhat.com (=?UTF-8?B?TWljaGFsIFByw612b3puw61r?=) Date: Tue, 26 Jul 2022 09:15:59 +0200 Subject: how to get vm uptime through libvirt api In-Reply-To: References: Message-ID: <6f2087ac-38c0-cfef-60cc-9a461ba649a1@redhat.com> On 7/26/22 08:49, Jiatong Shen wrote: > Hello community, > > ? ?I would like to know if there is an api to get a virtual machine's > uptime. Thank you in?advance for the help. There's no such API because not even qemu guest agent has an explicit API for that. However, it has an API to execute binaries: # virsh qemu-agent-command --pretty $dom '{"execute":"guest-exec", "arguments":{"path":"uptime", "capture-output":true}}' { "return": { "pid": 1174 } } # virsh qemu-agent-command --pretty $dom '{"execute":"guest-exec-status", "arguments":{"pid":1174}}' { "return": { "exitcode": 0, "out-data": "IDA5OjEwOjU4IHVwIDggbWluLCAgMSB1c2VyLCAgbG9hZCBhdmVyYWdlOiAwLjAwLCAwLjA5LCAwLjA4Cg==", "exited": true } } $ echo "IDA5OjEwOjU4IHVwIDggbWluLCAgMSB1c2VyLCAgbG9hZCBhdmVyYWdlOiAwLjAwLCAwLjA5LCAwLjA4Cg==" | base64 -d 09:10:58 up 8 min, 1 user, load average: 0.00, 0.09, 0.08 But it also depends what exactly do you mean by 'uptime'. Because if I start a guest, then pause it for 5 minutes and then let it run again, what should 'uptime' refer to? Michal From yshxxsjt715 at gmail.com Tue Jul 26 07:48:34 2022 From: yshxxsjt715 at gmail.com (Jiatong Shen) Date: Tue, 26 Jul 2022 15:48:34 +0800 Subject: how to get vm uptime through libvirt api In-Reply-To: <6f2087ac-38c0-cfef-60cc-9a461ba649a1@redhat.com> References: <6f2087ac-38c0-cfef-60cc-9a461ba649a1@redhat.com> Message-ID: Thank you very much for reply. Initially my thought of uptime is equal to executing to `uptime` inside a virtual machine. as for the second case, where virtual machine is paused for a period, does libvirt expose an api to get how long qemu process has existed? thank you. Best, Norman On Tue, Jul 26, 2022 at 3:16 PM Michal Pr?vozn?k wrote: > On 7/26/22 08:49, Jiatong Shen wrote: > > Hello community, > > > > I would like to know if there is an api to get a virtual machine's > > uptime. Thank you in advance for the help. > > There's no such API because not even qemu guest agent has an explicit > API for that. However, it has an API to execute binaries: > > # virsh qemu-agent-command --pretty $dom '{"execute":"guest-exec", > "arguments":{"path":"uptime", "capture-output":true}}' > { > "return": { > "pid": 1174 > } > } > > > # virsh qemu-agent-command --pretty $dom > '{"execute":"guest-exec-status", "arguments":{"pid":1174}}' > { > "return": { > "exitcode": 0, > "out-data": > > "IDA5OjEwOjU4IHVwIDggbWluLCAgMSB1c2VyLCAgbG9hZCBhdmVyYWdlOiAwLjAwLCAwLjA5LCAwLjA4Cg==", > "exited": true > } > } > > > $ echo > > "IDA5OjEwOjU4IHVwIDggbWluLCAgMSB1c2VyLCAgbG9hZCBhdmVyYWdlOiAwLjAwLCAwLjA5LCAwLjA4Cg==" > | base64 -d > 09:10:58 up 8 min, 1 user, load average: 0.00, 0.09, 0.08 > > > But it also depends what exactly do you mean by 'uptime'. Because if I > start a guest, then pause it for 5 minutes and then let it run again, > what should 'uptime' refer to? > > Michal > > -- Best Regards, Jiatong Shen -------------- next part -------------- An HTML attachment was scrubbed... URL: From mprivozn at redhat.com Tue Jul 26 08:04:36 2022 From: mprivozn at redhat.com (=?UTF-8?B?TWljaGFsIFByw612b3puw61r?=) Date: Tue, 26 Jul 2022 10:04:36 +0200 Subject: how to get vm uptime through libvirt api In-Reply-To: References: <6f2087ac-38c0-cfef-60cc-9a461ba649a1@redhat.com> Message-ID: <0cd44046-fcd1-41eb-10e7-1cf2a075a163@redhat.com> On 7/26/22 09:48, Jiatong Shen wrote: > Thank you very much for reply. Initially my thought of uptime is equal > to executing to `uptime` inside a virtual machine.? > as for the second case, where virtual machine is paused for a period, > does libvirt expose an api to get how long qemu process > has existed? No, it doesn't. But that should be pretty easy to implement into virDomainListGetStats()/virConnectGetAllDomainStats(). Alternatively, libvirt emits an event when a domain is started, so you may use that to record the time when the domain was started. Michal From yshxxsjt715 at gmail.com Tue Jul 26 08:07:16 2022 From: yshxxsjt715 at gmail.com (Jiatong Shen) Date: Tue, 26 Jul 2022 16:07:16 +0800 Subject: how to get vm uptime through libvirt api In-Reply-To: <0cd44046-fcd1-41eb-10e7-1cf2a075a163@redhat.com> References: <6f2087ac-38c0-cfef-60cc-9a461ba649a1@redhat.com> <0cd44046-fcd1-41eb-10e7-1cf2a075a163@redhat.com> Message-ID: thank you very much for reply. I have got another question which is off topic. Am I able to get vm's process id through libvirt api? Thank you very much. Best, Norman On Tue, Jul 26, 2022 at 4:04 PM Michal Pr?vozn?k wrote: > On 7/26/22 09:48, Jiatong Shen wrote: > > Thank you very much for reply. Initially my thought of uptime is equal > > to executing to `uptime` inside a virtual machine. > > as for the second case, where virtual machine is paused for a period, > > does libvirt expose an api to get how long qemu process > > has existed? > > No, it doesn't. But that should be pretty easy to implement into > virDomainListGetStats()/virConnectGetAllDomainStats(). > Alternatively, libvirt emits an event when a domain is started, so you > may use that to record the time when the domain was started. > > Michal > > -- Best Regards, Jiatong Shen -------------- next part -------------- An HTML attachment was scrubbed... URL: From mprivozn at redhat.com Tue Jul 26 08:27:19 2022 From: mprivozn at redhat.com (=?UTF-8?B?TWljaGFsIFByw612b3puw61r?=) Date: Tue, 26 Jul 2022 10:27:19 +0200 Subject: how to get vm uptime through libvirt api In-Reply-To: References: <6f2087ac-38c0-cfef-60cc-9a461ba649a1@redhat.com> <0cd44046-fcd1-41eb-10e7-1cf2a075a163@redhat.com> Message-ID: <137e3cfb-2d7f-0369-83ee-1a719f242d25@redhat.com> On 7/26/22 10:07, Jiatong Shen wrote: > thank you very much for reply. I have got another?question which is off > topic. > Am I able to get vm's process id through libvirt api? Unfortunately, no. We specifically try to avoid telling users this information so that they are not tempted to go behind libvirt's back and interact with QEMU directly (which can lead to a split brain scenario - libvirt thinks guest is in a certain state, but in fact it's in a different state). But as I said, it should be fairly easy to extend stats to report when a domain was started. If you don't feel comfortable providing a patch for that I can try. Michal From berrange at redhat.com Tue Jul 26 08:31:39 2022 From: berrange at redhat.com (Daniel =?utf-8?B?UC4gQmVycmFuZ8Op?=) Date: Tue, 26 Jul 2022 09:31:39 +0100 Subject: how to get vm uptime through libvirt api In-Reply-To: <137e3cfb-2d7f-0369-83ee-1a719f242d25@redhat.com> References: <6f2087ac-38c0-cfef-60cc-9a461ba649a1@redhat.com> <0cd44046-fcd1-41eb-10e7-1cf2a075a163@redhat.com> <137e3cfb-2d7f-0369-83ee-1a719f242d25@redhat.com> Message-ID: On Tue, Jul 26, 2022 at 10:27:19AM +0200, Michal Pr?vozn?k wrote: > On 7/26/22 10:07, Jiatong Shen wrote: > > thank you very much for reply. I have got another?question which is off > > topic. > > Am I able to get vm's process id through libvirt api? > > Unfortunately, no. We specifically try to avoid telling users this > information so that they are not tempted to go behind libvirt's back and > interact with QEMU directly (which can lead to a split brain scenario - > libvirt thinks guest is in a certain state, but in fact it's in a > different state). > > But as I said, it should be fairly easy to extend stats to report when a > domain was started. If you don't feel comfortable providing a patch for > that I can try. Note, the time since a guest was started on the host is NOT the same as guest uptime. Guest uptime resets on every warm reboot the guest OS does, while QEMU stays running. With regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :| From wyattcjackson2006 at outlook.com Sun Jul 24 03:21:18 2022 From: wyattcjackson2006 at outlook.com (Mnecraftchest1) Date: Sun, 24 Jul 2022 03:21:18 +0000 Subject: NetworkD or NetworkManager. Does it matter? Message-ID: Hello there. I am in the process of building an Arch Linux install for a virtualization server for my home lab, and I am trying to decide what networking system I should use. The two I am considering are SystemD-NetworkD, and NetworkManager. Looking along the lines of support from libvirt, would I be better off with one or the other, or does it not matter which one I use? -------------- next part -------------- An HTML attachment was scrubbed... URL: From yshxxsjt715 at gmail.com Tue Jul 26 08:38:33 2022 From: yshxxsjt715 at gmail.com (Jiatong Shen) Date: Tue, 26 Jul 2022 16:38:33 +0800 Subject: how to get vm uptime through libvirt api In-Reply-To: <137e3cfb-2d7f-0369-83ee-1a719f242d25@redhat.com> References: <6f2087ac-38c0-cfef-60cc-9a461ba649a1@redhat.com> <0cd44046-fcd1-41eb-10e7-1cf2a075a163@redhat.com> <137e3cfb-2d7f-0369-83ee-1a719f242d25@redhat.com> Message-ID: Thank you very much for reply. I'll read the code and try to provide patch . Best, Norman On Tue, Jul 26, 2022 at 4:27 PM Michal Pr?vozn?k wrote: > On 7/26/22 10:07, Jiatong Shen wrote: > > thank you very much for reply. I have got another question which is off > > topic. > > Am I able to get vm's process id through libvirt api? > > Unfortunately, no. We specifically try to avoid telling users this > information so that they are not tempted to go behind libvirt's back and > interact with QEMU directly (which can lead to a split brain scenario - > libvirt thinks guest is in a certain state, but in fact it's in a > different state). > > But as I said, it should be fairly easy to extend stats to report when a > domain was started. If you don't feel comfortable providing a patch for > that I can try. > > Michal > > -- Best Regards, Jiatong Shen -------------- next part -------------- An HTML attachment was scrubbed... URL: From yshxxsjt715 at gmail.com Tue Jul 26 08:40:26 2022 From: yshxxsjt715 at gmail.com (Jiatong Shen) Date: Tue, 26 Jul 2022 16:40:26 +0800 Subject: how to get vm uptime through libvirt api In-Reply-To: References: <6f2087ac-38c0-cfef-60cc-9a461ba649a1@redhat.com> <0cd44046-fcd1-41eb-10e7-1cf2a075a163@redhat.com> <137e3cfb-2d7f-0369-83ee-1a719f242d25@redhat.com> Message-ID: > > On Tue, Jul 26, 2022 at 10:27:19AM +0200, Michal Pr?vozn?k wrote: > > On 7/26/22 10:07, Jiatong Shen wrote: > > > thank you very much for reply. I have got another question which is off > > > topic. > > > Am I able to get vm's process id through libvirt api? > > > > Unfortunately, no. We specifically try to avoid telling users this > > information so that they are not tempted to go behind libvirt's back and > > interact with QEMU directly (which can lead to a split brain scenario - > > libvirt thinks guest is in a certain state, but in fact it's in a > > different state). > > > > But as I said, it should be fairly easy to extend stats to report when a > > domain was started. If you don't feel comfortable providing a patch for > > that I can try. > > Note, the time since a guest was started on the host is NOT the same as > guest uptime. Guest uptime resets on every warm reboot the guest OS > does, while QEMU stays running. > thank you very much for the reminder. Best, Norman On Tue, Jul 26, 2022 at 4:31 PM Daniel P. Berrang? wrote: > On Tue, Jul 26, 2022 at 10:27:19AM +0200, Michal Pr?vozn?k wrote: > > On 7/26/22 10:07, Jiatong Shen wrote: > > > thank you very much for reply. I have got another question which is off > > > topic. > > > Am I able to get vm's process id through libvirt api? > > > > Unfortunately, no. We specifically try to avoid telling users this > > information so that they are not tempted to go behind libvirt's back and > > interact with QEMU directly (which can lead to a split brain scenario - > > libvirt thinks guest is in a certain state, but in fact it's in a > > different state). > > > > But as I said, it should be fairly easy to extend stats to report when a > > domain was started. If you don't feel comfortable providing a patch for > > that I can try. > > Note, the time since a guest was started on the host is NOT the same as > guest uptime. Guest uptime resets on every warm reboot the guest OS > does, while QEMU stays running. > > With regards, > Daniel > -- > |: https://berrange.com -o- > https://www.flickr.com/photos/dberrange :| > |: https://libvirt.org -o- > https://fstop138.berrange.com :| > |: https://entangle-photo.org -o- > https://www.instagram.com/dberrange :| > > -- Best Regards, Jiatong Shen -------------- next part -------------- An HTML attachment was scrubbed... URL: From cbouchar at redhat.com Wed Jul 27 17:18:00 2022 From: cbouchar at redhat.com (Carol Bouchard) Date: Wed, 27 Jul 2022 13:18:00 -0400 Subject: Can RHEL7 VM run remote commands to Fedora36 host? Message-ID: I have a Fedora36 laptop which hosts VMs with RHEL7 using libvirt. One of the RHEL7 VMs, runs remote commands (as root) to 'start' another VM by way of my laptop. In other words, the following command is run: virsh --connect 'qemu+ssh://192.168.120.1/system' start beaker-test-vm1.beaker If I run non-remote version of the command on the laptop, it is successful. For example, virsh --connect qemu:///system start beaker-test-vm1.beaker <-- Successful on laptop. If I do a query like the following *(notice socket use)*, it is successful. virsh -d0 --connect 'qemu+ssh://192.168.120.1/system?*socket*=/var/run/libvirt/libvirt-sock-ro' domstate beaker-test-vm1.beaker Without socket, I get the following error: *error: failed to connect to the hypervisor* *error: End of file while reading data: Ncat: No such file or directory.: Input/output error* This does not work for 'start' because I believe this is a read-only socket since I see the error: error: Failed to start domain beaker-test-vm1.beaker error: operation forbidden: read only access prevents virDomainCreate When I look at my laptop, there is no /var/run/libvirt/libvirt-sock. So.....I've been wondering whether RHEL7 virsh/libvirt is compatible with Fedora36. Is there a work-around? I can't change the distros on my laptop or VMs. Carol -------------- next part -------------- An HTML attachment was scrubbed... URL: From cbouchar at redhat.com Thu Jul 28 18:14:30 2022 From: cbouchar at redhat.com (Carol Bouchard) Date: Thu, 28 Jul 2022 14:14:30 -0400 Subject: Can RHEL7 VM run remote libvirt commands to Fedora36 host? Message-ID: I have a test environment that use to work but no longer does. My laptop is Fedora36 (libvirt version 8.1.0.2) while the VMs it spawns are RHEL7 (max libvirt version is 4.5.0). The source of my problem seems to be that RHEL7 libvirt needs rw socket /var/run/libvirt/libvirt-sock which no longer exists in fedora36. The following is successful from RHEL7 VM to laptop: virsh -d0 --connect 'qemu+ssh://192.168.120.1/system?*socket*=/var/run/libvirt/libvirt-sock-ro' domstate beaker-test-vm1.beaker If I change the action from domstate to start, it fails on error: Failed to start domain beaker-test-vm1.beaker error: operation forbidden: read only access prevents virDomainCreate which made me realize ro stands for read-only; however, there is no libvirt-sock. I tried some of the other socket files without success. Is there a work-around? Carol -------------- next part -------------- An HTML attachment was scrubbed... URL: From yesthatguy at gmail.com Fri Jul 29 00:32:29 2022 From: yesthatguy at gmail.com (Benjamin Smith) Date: Thu, 28 Jul 2022 17:32:29 -0700 Subject: Can RHEL7 VM run remote commands to Fedora36 host? In-Reply-To: References: Message-ID: Well I don't know if this helps, but it's there a reason you haven't tried running the command that succeeds on the laptop directly over SSH? EG: ssh LAPTOPUSER at Laptop "virsh --connect qemu:///system start beaker-test-vm1.beaker" Ben S On Thu, Jul 28, 2022, 11:16 AM Carol Bouchard wrote: > I have a Fedora36 laptop which hosts VMs with RHEL7 using libvirt. One of > the RHEL7 VMs, runs remote commands (as root) to 'start' another VM by > way of my laptop. In other words, the following command is run: > virsh --connect 'qemu+ssh://192.168.120.1/system' start > beaker-test-vm1.beaker > If I run non-remote version of the command on the laptop, it is > successful. For example, > virsh --connect qemu:///system start beaker-test-vm1.beaker <-- > Successful on laptop. > > If I do a query like the following *(notice socket use)*, it is > successful. > virsh -d0 --connect 'qemu+ssh://192.168.120.1/system?*socket*=/var/run/libvirt/libvirt-sock-ro' > domstate beaker-test-vm1.beaker > > Without socket, I get the following error: > > *error: failed to connect to the hypervisor* > > *error: End of file while reading data: Ncat: No such file or directory.: > Input/output error* > > This does not work for 'start' because I believe this is a read-only > socket since I see the error: > error: Failed to start domain beaker-test-vm1.beaker > error: operation forbidden: read only access prevents virDomainCreate > > When I look at my laptop, there is no /var/run/libvirt/libvirt-sock. > So.....I've been wondering > whether RHEL7 virsh/libvirt is compatible with Fedora36. Is there a > work-around? I can't > change the distros on my laptop or VMs. > > Carol > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From eskultet at redhat.com Fri Jul 29 06:18:17 2022 From: eskultet at redhat.com (Erik Skultety) Date: Fri, 29 Jul 2022 08:18:17 +0200 Subject: Can RHEL7 VM run remote commands to Fedora36 host? In-Reply-To: References: Message-ID: On Wed, Jul 27, 2022 at 01:18:00PM -0400, Carol Bouchard wrote: > I have a Fedora36 laptop which hosts VMs with RHEL7 using libvirt. One of > the RHEL7 VMs, runs remote commands (as root) to 'start' another VM by > way of my laptop. In other words, the following command is run: > virsh --connect 'qemu+ssh://192.168.120.1/system' start > beaker-test-vm1.beaker > If I run non-remote version of the command on the laptop, it is successful. > For example, > virsh --connect qemu:///system start beaker-test-vm1.beaker <-- Successful > on laptop. > > If I do a query like the following *(notice socket use)*, it is successful. > virsh -d0 --connect > 'qemu+ssh://192.168.120.1/system?*socket*=/var/run/libvirt/libvirt-sock-ro' > domstate beaker-test-vm1.beaker > > Without socket, I get the following error: > > *error: failed to connect to the hypervisor* > > *error: End of file while reading data: Ncat: No such file or directory.: > Input/output error* > > This does not work for 'start' because I believe this is a read-only socket > since I see the error: > error: Failed to start domain beaker-test-vm1.beaker > error: operation forbidden: read only access prevents virDomainCreate > > When I look at my laptop, there is no /var/run/libvirt/libvirt-sock. > So.....I've been wondering > whether RHEL7 virsh/libvirt is compatible with Fedora36. Is there a > work-around? I can't > change the distros on my laptop or VMs. Hello, since Fedora 35 libvirt has used the modular daemons architecture. What this means for you (and appears very confusing) is that when you try starting a VM locally on your F36 laptop, your virsh client doesn't connect to libvirt-sock anymore, there's a dedicated connection socket for each of the daemons now and instead will connect to virtqemud-sock. Now, old virsh clients like the one you have on your RHEL7 don't know about this and expect to connect to libvirt-sock instead. In order to create that socket and restore functionality for old clients you need to start and enable the virtproxyd.socket systemd unit which proxies old client connections to the new sockets we have. Why the virtproxyd socket isn't running by default unless you disabled it beats me, since: $ systemctl status virtproxyd Loaded: loaded (/usr/lib/systemd/system/virtproxyd.socket; enabled; vendor preset: enabled) ^^^here^^^ is set correctly after installation. Anyhow, just do: $ sudo systemctl enable --now virtproxyd.socket on your laptop and you're good to go Regards, Erik So, if you don't have the libvirt-sock created that means the virtproxyd.socket systemd unit isn't active. Just enable the socket and try again. Here, I simulated it for you with my VMs: VM1: $ cat /etc/os-release NAME="Fedora Linux" VERSION="36 (Thirty Six)" ... $ > > Carol From eskultet at redhat.com Fri Jul 29 06:22:36 2022 From: eskultet at redhat.com (Erik Skultety) Date: Fri, 29 Jul 2022 08:22:36 +0200 Subject: Can RHEL7 VM run remote commands to Fedora36 host? In-Reply-To: References: Message-ID: On Fri, Jul 29, 2022 at 08:18:17AM +0200, Erik Skultety wrote: > On Wed, Jul 27, 2022 at 01:18:00PM -0400, Carol Bouchard wrote: > > I have a Fedora36 laptop which hosts VMs with RHEL7 using libvirt. One of > > the RHEL7 VMs, runs remote commands (as root) to 'start' another VM by > > way of my laptop. In other words, the following command is run: > > virsh --connect 'qemu+ssh://192.168.120.1/system' start > > beaker-test-vm1.beaker > > If I run non-remote version of the command on the laptop, it is successful. > > For example, > > virsh --connect qemu:///system start beaker-test-vm1.beaker <-- Successful > > on laptop. > > > > If I do a query like the following *(notice socket use)*, it is successful. > > virsh -d0 --connect > > 'qemu+ssh://192.168.120.1/system?*socket*=/var/run/libvirt/libvirt-sock-ro' > > domstate beaker-test-vm1.beaker > > > > Without socket, I get the following error: > > > > *error: failed to connect to the hypervisor* > > > > *error: End of file while reading data: Ncat: No such file or directory.: > > Input/output error* > > > > This does not work for 'start' because I believe this is a read-only socket > > since I see the error: > > error: Failed to start domain beaker-test-vm1.beaker > > error: operation forbidden: read only access prevents virDomainCreate > > > > When I look at my laptop, there is no /var/run/libvirt/libvirt-sock. > > So.....I've been wondering > > whether RHEL7 virsh/libvirt is compatible with Fedora36. Is there a > > work-around? I can't > > change the distros on my laptop or VMs. > > Hello, > since Fedora 35 libvirt has used the modular daemons architecture. What this > means for you (and appears very confusing) is that when you try starting a VM > locally on your F36 laptop, your virsh client doesn't connect to libvirt-sock > anymore, there's a dedicated connection socket for each of the daemons now and > instead will connect to virtqemud-sock. > Now, old virsh clients like the one you have on your RHEL7 don't know about > this and expect to connect to libvirt-sock instead. In order to create that > socket and restore functionality for old clients you need to start and enable > the virtproxyd.socket systemd unit which proxies old client connections to the > new sockets we have. Why the virtproxyd socket isn't running by default unless > you disabled it beats me, since: > > $ systemctl status virtproxyd > Loaded: loaded (/usr/lib/systemd/system/virtproxyd.socket; enabled; vendor preset: enabled) > ^^^here^^^ > > is set correctly after installation. > Anyhow, just do: > $ sudo systemctl enable --now virtproxyd.socket > > on your laptop and you're good to go > > Regards, > Erik > > So, if you don't have the libvirt-sock created that means the virtproxyd.socket > systemd unit isn't active. Just enable the socket and try again. > > Here, I simulated it for you with my VMs: > > VM1: > $ cat /etc/os-release > NAME="Fedora Linux" > VERSION="36 (Thirty Six)" > ... Uhm, sorry for the noise in ^this very last paragraph, it's a leftover draft of my response... Erik From berrange at redhat.com Fri Jul 29 08:43:46 2022 From: berrange at redhat.com (Daniel =?utf-8?B?UC4gQmVycmFuZ8Op?=) Date: Fri, 29 Jul 2022 09:43:46 +0100 Subject: Can RHEL7 VM run remote commands to Fedora36 host? In-Reply-To: References: Message-ID: On Wed, Jul 27, 2022 at 01:18:00PM -0400, Carol Bouchard wrote: > I have a Fedora36 laptop which hosts VMs with RHEL7 using libvirt. One of > the RHEL7 VMs, runs remote commands (as root) to 'start' another VM by > way of my laptop. In other words, the following command is run: > virsh --connect 'qemu+ssh://192.168.120.1/system' start > beaker-test-vm1.beaker > If I run non-remote version of the command on the laptop, it is successful. > For example, > virsh --connect qemu:///system start beaker-test-vm1.beaker <-- Successful > on laptop. > > If I do a query like the following *(notice socket use)*, it is successful. > virsh -d0 --connect > 'qemu+ssh://192.168.120.1/system?*socket*=/var/run/libvirt/libvirt-sock-ro' > domstate beaker-test-vm1.beaker > > Without socket, I get the following error: > > *error: failed to connect to the hypervisor* > > *error: End of file while reading data: Ncat: No such file or directory.: > Input/output error* This is peculiar, it suggests that /var/run/libvirt/libvirt-sock does not exist, while /var/run/libvirt/libvirt-sock-ro does exist. This ought to be an impossible situation in general. As Erik says, In Fedora 36 we have the moduler daemons, so these two sockets are provided by 'virtproxyd.socket' and 'virtproxyd-ro.socket' unit files, so make sure both of those are running. With regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :| From cbouchar at redhat.com Fri Jul 29 11:49:16 2022 From: cbouchar at redhat.com (Carol Bouchard) Date: Fri, 29 Jul 2022 07:49:16 -0400 Subject: Can RHEL7 VM run remote commands to Fedora36 host? In-Reply-To: References: Message-ID: TY VM!!! virtproxyd was disabled and I can assure you I didn't disable it. /run/libvirt/libvirt-sock now exists AND the remote virsh actions were successful. Background on my fedora36 install. I did not do an upgrade. This was a fresh install on a new laptop. I could see libvirt was running so I assumed it was intact. I had enabled/disabled libvirtd only because my remote virsh commands were not working. BTW I can't do the ssh approach as the scripts are used by other teams and I could break them. There had to be a better solution and use of proxy is an good one. Carol On Fri, Jul 29, 2022 at 4:43 AM Daniel P. Berrang? wrote: > On Wed, Jul 27, 2022 at 01:18:00PM -0400, Carol Bouchard wrote: > > I have a Fedora36 laptop which hosts VMs with RHEL7 using libvirt. One > of > > the RHEL7 VMs, runs remote commands (as root) to 'start' another VM by > > way of my laptop. In other words, the following command is run: > > virsh --connect 'qemu+ssh://192.168.120.1/system' start > > beaker-test-vm1.beaker > > If I run non-remote version of the command on the laptop, it is > successful. > > For example, > > virsh --connect qemu:///system start beaker-test-vm1.beaker <-- > Successful > > on laptop. > > > > If I do a query like the following *(notice socket use)*, it is > successful. > > virsh -d0 --connect > > 'qemu+ssh:// > 192.168.120.1/system?*socket*=/var/run/libvirt/libvirt-sock-ro' > > domstate beaker-test-vm1.beaker > > > > Without socket, I get the following error: > > > > *error: failed to connect to the hypervisor* > > > > *error: End of file while reading data: Ncat: No such file or directory.: > > Input/output error* > > This is peculiar, it suggests that > > /var/run/libvirt/libvirt-sock > > does not exist, while /var/run/libvirt/libvirt-sock-ro does exist. > > This ought to be an impossible situation in general. As Erik says, > In Fedora 36 we have the moduler daemons, so these two sockets are > provided by 'virtproxyd.socket' and 'virtproxyd-ro.socket' unit > files, so make sure both of those are running. > > With regards, > Daniel > -- > |: https://berrange.com -o- > https://www.flickr.com/photos/dberrange :| > |: https://libvirt.org -o- > https://fstop138.berrange.com :| > |: https://entangle-photo.org -o- > https://www.instagram.com/dberrange :| > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From berrange at redhat.com Fri Jul 29 12:02:20 2022 From: berrange at redhat.com (Daniel =?utf-8?B?UC4gQmVycmFuZ8Op?=) Date: Fri, 29 Jul 2022 13:02:20 +0100 Subject: Can RHEL7 VM run remote commands to Fedora36 host? In-Reply-To: References: Message-ID: On Fri, Jul 29, 2022 at 07:49:16AM -0400, Carol Bouchard wrote: > TY VM!!! > virtproxyd was disabled and I can assure you I didn't disable it. > > /run/libvirt/libvirt-sock now exists AND > the remote virsh actions were successful. > > Background on my fedora36 install. I did not do an upgrade. This > was a fresh install on a new laptop. I could see libvirt was > running so I assumed it was intact. I had enabled/disabled > libvirtd only because my remote virsh commands were not working. Enabling/disabling libvirtd probably interfered with virtproxyd, as they both want the same sockets. With regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :| From cbouchar at redhat.com Fri Jul 29 12:19:04 2022 From: cbouchar at redhat.com (Carol Bouchard) Date: Fri, 29 Jul 2022 08:19:04 -0400 Subject: Can RHEL7 VM run remote commands to Fedora36 host? In-Reply-To: References: Message-ID: The only reason I toggled libvirtd was because the remote virsh commands failed and I could see the socket didn't exist. That suggests to me that virtproxyd wasn't up AND it was configured at disabled. Your help was extremely appreciated! My test tool works now. So now I can test outside customer environment. This test tool is very important to me and my customers so I don't break them. Carol Carol On Fri, Jul 29, 2022 at 8:02 AM Daniel P. Berrang? wrote: > On Fri, Jul 29, 2022 at 07:49:16AM -0400, Carol Bouchard wrote: > > TY VM!!! > > virtproxyd was disabled and I can assure you I didn't disable it. > > > > /run/libvirt/libvirt-sock now exists AND > > the remote virsh actions were successful. > > > > Background on my fedora36 install. I did not do an upgrade. This > > was a fresh install on a new laptop. I could see libvirt was > > running so I assumed it was intact. I had enabled/disabled > > libvirtd only because my remote virsh commands were not working. > > Enabling/disabling libvirtd probably interfered with virtproxyd, as > they both want the same sockets. > > With regards, > Daniel > -- > |: https://berrange.com -o- > https://www.flickr.com/photos/dberrange :| > |: https://libvirt.org -o- > https://fstop138.berrange.com :| > |: https://entangle-photo.org -o- > https://www.instagram.com/dberrange :| > > -------------- next part -------------- An HTML attachment was scrubbed... URL: