ThisCalculator

Everyday

How to Capture a Virtual Machine Screen and Save the Image

Updated · Standard formula, shown below

How to Capture a Virtual Machine Screen and Save the Image

This guide shows you how to take a screenshot of a virtual machine’s display and save it as an image file, which is useful for documentation, troubleshooting, or sharing. You’ll learn methods using built-in host tools, guest OS tools, and hypervisor-specific features. No special software is required beyond what you likely already have.

What You’ll Need

  • A running virtual machine (VM) in any hypervisor (e.g., VirtualBox, VMware, Hyper-V, QEMU/KVM).
  • Access to the host operating system (the one running the hypervisor).
  • Basic familiarity with your host’s screenshot tools (e.g., Snipping Tool on Windows, Screenshot app on macOS, or a tool like Flameshot on Linux).

Step-by-Step

  1. Ensure the VM window is visible. Bring the VM window to the foreground on your host desktop. If the VM is running in full-screen mode, switch to windowed mode (usually by pressing Host+F in VirtualBox or VMware, where Host is typically the Right Ctrl key). This ensures the entire VM screen is visible and not cropped.
  2. Choose your capture method. There are three main approaches:
    • Host screenshot: Use your host OS’s native screenshot tool to capture the VM window.
    • Guest screenshot: Use the VM’s own screenshot function (if it has one) to capture only the VM’s screen, not the host.
    • Hypervisor screenshot: Use the hypervisor’s built-in screenshot feature, which often captures the VM’s framebuffer directly.
  3. Method 1 – Host screenshot (Windows):
    1. Press Windows+Shift+S to open the Snipping Tool overlay.
    2. Click and drag to select the VM window area.
    3. The screenshot is copied to your clipboard. Open an image editor (e.g., Paint) and press Ctrl+V to paste, then save as PNG or JPEG.
  4. Method 2 – Host screenshot (macOS):
    1. Press Command+Shift+4. The cursor changes to a crosshair.
    2. Press Spacebar to switch to window capture mode, then click on the VM window.
    3. The screenshot is saved to your desktop by default as a PNG file.
  5. Method 3 – Hypervisor screenshot (VirtualBox):
    1. In the VM window menu, click View → Take Screenshot (or press Host+E).
    2. A dialog appears asking for a filename and format. Choose PNG or JPEG and save it to your desired location.
  6. Method 4 – Hypervisor screenshot (VMware Workstation/Player):
    1. In the VM window, click VM → Capture Screen (or press Ctrl+Alt+PrtSc).
    2. The screenshot is saved to the clipboard. Paste it into an image editor or document and save.
  7. Method 5 – Guest OS screenshot: If your VM runs an OS with its own screenshot tool (e.g., Windows Snipping Tool, macOS Cmd+Shift+4, Linux gnome-screenshot), you can use that inside the VM. The image will be saved within the VM’s virtual disk; you may need to transfer it to the host (e.g., via shared folders or drag-and-drop).
  8. Save the image. Regardless of method, ensure you save the screenshot in a format that suits your needs: PNG for lossless quality, JPEG for smaller file size. Choose a location you can easily find, and give it a descriptive filename.

Common Mistakes

  • Capturing the host instead of the VM: If you use a host screenshot tool, make sure the VM window is in the foreground and not minimized. Otherwise, you might capture the host desktop or an empty window.
  • Full-screen mode confusion: In full-screen mode, the VM takes over the entire display. Pressing the host key combination (often Right Ctrl) exits full-screen, but if you’re not aware, you might think the VM is stuck.
  • Forgetting to save: Many screenshot tools copy to clipboard only. If you don’t paste and save, you lose the image when you copy something else.
  • Using the wrong format: Saving as JPEG for text-heavy screenshots can cause blurry text. Use PNG for crisp images.

Tips

  • For high-DPI displays, ensure your host scaling is set to 100% when capturing, or the screenshot may appear blurry or larger than expected.
  • If you need to capture a specific part of the VM screen, use the host’s region capture instead of the whole window.
  • In VirtualBox, you can also use the command-line tool VBoxManage controlvm <vmname> screenshotpng <filename.png> to take a screenshot without opening the GUI.
  • For VMware, you can use vmrun captureScreen if you have the VMware VIX API installed.
  • If your VM has multiple monitors, you may need to capture each monitor separately or use the hypervisor’s multi-monitor capture feature (if available).

Troubleshooting

  • Screenshot is black or blank: This often happens when hardware acceleration or 3D acceleration is enabled in the VM. Try disabling 3D acceleration in the VM settings, or use the guest OS’s screenshot tool instead.
  • Host screenshot captures the wrong window: Ensure the VM window is not behind another window. Click on the VM window first to bring it to the front.
  • Hypervisor screenshot option is grayed out: This can occur if the VM is not running or if the hypervisor doesn’t support screenshots for that particular VM configuration (e.g., some remote VMs). Use a host screenshot method instead.
  • Guest OS screenshot saves to a location you can’t access: If you can’t find the file, check the guest’s default screenshot folder (e.g., ~/Pictures on Linux, Pictures library on Windows). If you need it on the host, use shared folders or drag-and-drop to copy it.
  • Image is too large or too small: The resolution of the VM screen determines the screenshot size. Adjust the VM’s display resolution to match your needs before capturing.

Frequently Asked Questions

Can I take a screenshot of a VM that is not currently displayed?

Yes, some hypervisors allow headless screenshots via command-line tools (e.g., VBoxManage screenshotpng). However, the VM must be running.

What is the best image format for screenshots?

PNG is recommended for screenshots because it is lossless and handles text and UI elements sharply. JPEG is acceptable for photos but can introduce artifacts.

Does the host key matter for screenshots?

No, the host key is only for exiting full-screen mode or using hypervisor-specific shortcuts. For host screenshots, you use the host’s own shortcuts.

Can I capture a scrolling screenshot of a VM?

Most built-in tools don’t support scrolling captures. You can use third-party tools on the host (like Snagit) that can capture scrolling windows, but they may not work with VM windows if the VM’s rendering is not standard.

Why does my screenshot come out with a black border?

This is often due to the VM’s display resolution not matching the window size. Try setting the VM’s resolution to match the window, or use the hypervisor’s “Auto-resize” feature if available.

Can I take a screenshot of a VM in the cloud?

If you’re using a cloud VM (like AWS EC2), you typically don’t have direct access to the console. You’d need to use the provider’s web console screenshot feature, or connect via RDP/VNC and take a screenshot on your local machine.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.