VMX(1) VMX(1)
NAME
vmx - virtual PC
SYNOPSIS
vmx [ -D ] [ -M mem ] [ -c com1 ] [ -C com2 ] [ -n nic ] [
-d blockfile ] [ -v|-w vga ] [ -m bootmod ] kernel [ args
... ]
DESCRIPTION
Vmx uses Intel VT-x through vmx(3) to simulate a virtual PC,
running the specified kernel (see below for supported for-
mats).
By default the virtual PC has 64 MB of memory. The amount
of memory can be changed with the -M option, the argument of
which is interpreted in bytes unless suffixed by K, M, or G
to change the unit to kilobytes, megabytes or gigabytes,
respectively.
Args is passed to the kernel as its command line. Boot mod-
ules can be specified with the -m argument.
-D enables debug messages.
If -v is specified, a graphics device, PS/2 keyboard and
mouse are simulated. The -w flag behaves the same as -v but
also creates a new window for the screen. Clicking on the
screen "grabs" the mouse; pressing Ctrl and Alt simultane-
ously releases the grab. Valid values for the argument are
text Simulate a VGA text-mode console.
widthxheight [ xchan ] [ @addr ]
Simulate a framebuffer at address addr of the specified
size and channel format chan (see image(6)). xchan and
@addr are optional, in which case they default to
x8r8g8b8 and 0xf0000000, respectively (in this mode
there is no way to change the resolution and accesses
to VGA registers have no effect).
vesa:modes [ @addr ]
(modes is a comma separated list of modes of the format
widthxheightxchan with the chan optional as before.)
Simulate a VESA-compatible PCI graphics adapter, ini-
tially in text mode. The guest can use VESA functions
to switch the mode to one of those listed, which are
assigned consecutive mode numbers starting with 0x120.
The first mode is indicated as the preferred mode of
the monitor.
Page 1 Plan 9 (printed 10/30/25)
VMX(1) VMX(1)
The -c and -C options specify the targets for the COM1 and
COM2 devices. The argument consists of two fields separated
by a comma, which specify the file to be used for input and
output, respectively. Either field can be left empty. If
there is no comma in the argument, the same value is used
for both fields.
A -n option adds a network card. The argument to -n speci-
fies a physical network device (such as ether0) to use.
Alternatively, a dial string such as udp!host!port can be
used. It can also be prefixed by file! to interpret the
argument as a file instead and it can be prefixed by hdr! to
enable headers matching the binary snoopy(8) format. The
MAC address can be specified with the ea:nnnnnnnnnnnn! pre-
fix, otherwise a random address is used.
A -d option adds a virtio block device (a hard disk) with
the argument as a disk image.
Multiboot kernels
If the specified kernel complies with the Multiboot specifi-
cation, then args is concatenated with spaces and passed as
the cmdline; the -m modules are passed as boot modules.
Note that 9front is Multiboot compliant and interprets the
first boot module as plan9.ini(8).
OpenBSD kernels
If the specified kernel is an OpenBSD kernel, the boot mod-
ules are ignored and the cmdline is interpreted as
[ -asdc ] [ var=value ... ]
where the options correspond to the boot options and the
assignments to the boot variables, which are defined in the
OpenBSD manpage boot(8).
Linux kernels
If the specified kernel is a Linux kernel (which must be
2.6.22 or newer and in bzImage format), args are concate-
nated with spaces and passed as the cmdline (see
Documentation/admin-guide/kernel-parameters.txt). The first
boot module is passed as the initrd; any further boot mod-
ules are ignored.
SOURCE
/sys/src/cmd/vmx
SEE ALSO
vmx(3), cpuid(8)
BUGS
Page 2 Plan 9 (printed 10/30/25)
VMX(1) VMX(1)
Vmx can and will crash your kernel.
Currently only one core is supported.
The Linux vga= option is not supported, as well as many of
the OpenBSD boot variables.
HISTORY
Vmx first appeared in 9front (June, 2017).
Page 3 Plan 9 (printed 10/30/25)