How to take screenshot of Virtualbox Guest OS

By | April 30, 2023

Virtualbox

If you are a blogger, doing experiments with various oses on virtualbox and writing tutorials and posts, then you will need to take screenshots of the guest os things inside virtualbox.

For normal screenshot tasks a tool like shutter works very well. But with virtualbox you get the screenshot of the entire virtualbox window which has to be edited later and consumes time.

There is a quicker way to take a snapshot of the guest os inside virtualbox directly. However this has to be done from the commandline and is not available in the virtualbox gui.

The VBoxManage command is used to do this.

List the running vms

First list out the running virtual machines. You would be taking screenshot from one of the running machines.

$ VBoxManage list runningvms
"Centos 64bit" {5186c620-0656-4f03-8d01-6114d8fd12bb}

Now we get the uuid of the running vm. Here its centos.

Take screenshot as a png

Now lets take the screenshot of the running vm in png format. The format of the command is

$ VBoxManage controlvm vm_uuid screenshotpng /path/to/image

So use it like this

$ VBoxManage controlvm 5186c620-0656-4f03-8d01-6114d8fd12bb screenshotpng ~/centos_htop64.png

Simple! The screenshot is now saved in the home directory with the given name.
Now upload the image in your blog post and publish away.

About Silver Moon

A Tech Enthusiast, Blogger, Linux Fan and a Software Developer. Writes about Computer hardware, Linux and Open Source software and coding in Python, Php and Javascript. He can be reached at [email protected].

Leave a Reply

Your email address will not be published. Required fields are marked *