openbmc.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* About KVM screenshot
@ 2021-09-13 13:47 Lei Yu
  2021-09-13 13:57 ` Paul Fertser
  0 siblings, 1 reply; 3+ messages in thread
From: Lei Yu @ 2021-09-13 13:47 UTC (permalink / raw)
  To: openbmc

This email is to introduce some progress and ask for comments about
the KVM screenshot function.

The whole KVM screenshot is implemented by the below pieces:
1. The vncsnapshot[1] is slightly modified for cross-compile, and a
bitbake recipe is created for it;
2. A service is created to host the DBus interface to provide the
"Trigger" and "Clear" methods for KVM screenshot;
3. OEM redfish actions are implemented to trigger and clear the KVM
screenshot, including the download of the picture;

Be noted that the function is currently experimental and not stable:
* vncsnapshot has some bug on skipping the black screen, so we have to
add a delay to capture the screen;
* When the BMC is in high load, it takes longer to open and capture
the KVM, so the above delay may not be enough.

If the work is got interested, we could try to upstream the changes, including:
* Submit a patch to meta-openembedded to add vncsnapshot recipe (with
patches for cross-compile)
* Add an interface to phosphor-dbus-interface to host the service interface;
* Add a new daemon (in a new repo or share some existing repo?)
* Submit patches to bmcweb about the OEM Redfish actions (for now it's
Bytedance OEM action)

Feedbacks and suggestions are welcome.

[1]: https://sourceforge.net/projects/vncsnapshot/files/vncsnapshot/1.2a/

-- 
BRs,
Lei YU

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: About KVM screenshot
  2021-09-13 13:47 About KVM screenshot Lei Yu
@ 2021-09-13 13:57 ` Paul Fertser
  2021-09-14  1:38   ` [External] " Lei Yu
  0 siblings, 1 reply; 3+ messages in thread
From: Paul Fertser @ 2021-09-13 13:57 UTC (permalink / raw)
  To: Lei Yu; +Cc: openbmc

Hello,

On Mon, Sep 13, 2021 at 09:47:03PM +0800, Lei Yu wrote:
> The whole KVM screenshot is implemented by the below pieces:
> 1. The vncsnapshot[1] is slightly modified for cross-compile, and a
> bitbake recipe is created for it;
> 2. A service is created to host the DBus interface to provide the
> "Trigger" and "Clear" methods for KVM screenshot;
> 3. OEM redfish actions are implemented to trigger and clear the KVM
> screenshot, including the download of the picture;

Currently obmc-ikvm gets a steady stream of JPG images, frame by
frame, from V4L2. Have you considered extending it a bit so that it
would be capable of simply saving the current frame to disk, without
any conversion/transformation, just dump an array of bytes to a file?

What would be the advantage of establishing a local VNC session with
this additional software compared to the straightforward JPG to file
writing?

-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:fercerpav@gmail.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [External] Re: About KVM screenshot
  2021-09-13 13:57 ` Paul Fertser
@ 2021-09-14  1:38   ` Lei Yu
  0 siblings, 0 replies; 3+ messages in thread
From: Lei Yu @ 2021-09-14  1:38 UTC (permalink / raw)
  To: Paul Fertser; +Cc: openbmc

On Mon, Sep 13, 2021 at 9:57 PM Paul Fertser <fercerpav@gmail.com> wrote:
>
> Hello,
>
> On Mon, Sep 13, 2021 at 09:47:03PM +0800, Lei Yu wrote:
> > The whole KVM screenshot is implemented by the below pieces:
> > 1. The vncsnapshot[1] is slightly modified for cross-compile, and a
> > bitbake recipe is created for it;
> > 2. A service is created to host the DBus interface to provide the
> > "Trigger" and "Clear" methods for KVM screenshot;
> > 3. OEM redfish actions are implemented to trigger and clear the KVM
> > screenshot, including the download of the picture;
>
> Currently obmc-ikvm gets a steady stream of JPG images, frame by
> frame, from V4L2. Have you considered extending it a bit so that it
> would be capable of simply saving the current frame to disk, without
> any conversion/transformation, just dump an array of bytes to a file?
>
> What would be the advantage of establishing a local VNC session with
> this additional software compared to the straightforward JPG to file
> writing?

Extending obmc-ikvm was my first thought, and when it's discussed in
Discord, @zevweiss mentioned that we could use the existing
vncsnapshot tool instead of writing new code.
And we tried and it worked fine with the limitation mentioned above.

With the obmc-ikvm extension to capture the JPG image, it has to deal
with two cases:
* When there is already a VNC session, it could just save the current
image when a snapshot is requested;
* When there is no VNC session, it has to open the video device and
capture the image.

We think vncsnapshot is much simpler to use in such case.

But I agree that it will be more efficient if we could implement the
feature in obmc-ikvm.

-- 
BRs,
Lei YU

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-09-14  1:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-13 13:47 About KVM screenshot Lei Yu
2021-09-13 13:57 ` Paul Fertser
2021-09-14  1:38   ` [External] " Lei Yu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).