Request an invite
Docs menu

osmates vm resize

Change the size of a machine's display, and a Windows or Linux machine's scale.

Usage
osmates vm resize <machine> <size> [--scale <scale>] [--json]

A running Windows machine shows the new size within a second at a user's desktop or its lock screen; at the login screen or a User Account Control prompt it waits for that desktop. Windows takes a new scale on the user's desktop and draws at it from the next sign-in, so a scale set at the login screen or on a stopped machine shows from the second. A Linux X11 desktop changes its mode, and the result says when it keeps its own; at scale 2 Hyprland draws at twice the size, GNOME does with 3D acceleration on, and Xfce keeps its own scale; a Linux console keeps its own mode inside the new size, with bars around it; a macOS machine keeps the scale and density its window gave it. A stopped machine starts with the new display.

Arguments

<machine>Required

The machine's name or identifier.

<size>Required

The size in pixels, such as 1920x1200; a width of a multiple of 8 for Linux and on the OSMates engine, and an even height for Linux at scale 2.

--scale <scale>

Windows and Linux: 1 or 2 pixels a point, 2 for 200%. Default: the machine's.

--json

Print machine-readable JSON.

JSON output

With --json, it prints an object with these fields.

JSON Schema: /schemas/0/cli/vm/resize.json

displayobjectRequired
display.heightintegerRequired
display.pixelsPerInchinteger
display.scaleintegerRequired
display.widthintegerRequired
guestobject
guest.dpiintegerRequired
guest.heightintegerRequired
guest.scaleintegerRequired
guest.widthintegerRequired
outcomestring or objectRequired

One of shown, or an object that holds one key: pending or failed.

outcome.pendingobject
outcome.failedobject

Fields nested deeper are in the schema.

Exit statuses

Its exit status is one of these.

StatusMeaning
0The command did what it was asked.
1The command failed; with --json, standard error's last line is the error object.
64The command line is wrong, as ArgumentParser found before the command ran.
65What was given is wrong, found while the command ran; the same command fails until it changes.
75The same command can work later with nothing changed, as while an update finishes.
130Control-C cancelled what the command started.
1The command printed its result, whose check failed.

Report a problem with this page