Command-Line Reference
vftool
is configured entirely through command-line arguments. This page provides a comprehensive reference for all available options.
Synopsis
vftool -k <kernel path> [options]
Options
Kernel and Boot Options
-k <kernel path>
(Required)
: Specifies the path to the uncompressed Linux kernel image file.
-a <kernel cmdline arguments>
: A string containing the arguments to pass to the Linux kernel on boot. If your arguments contain spaces, you must enclose the entire string in quotes.
: Default: console=hvc0
-i <initrd path>
: Specifies the path to an initial RAM disk (initrd) image. This file can be gzipped.
: Default: None
Hardware Configuration
-p <number of processors>
: Sets the number of virtual CPUs (VCPUs) for the guest machine.
: Default: 1
-m <memory size in MB>
: Sets the amount of RAM for the guest machine in megabytes.
: Default: 512
Storage Devices
-d <disc image path>
: Attaches a raw disk image file in read-write mode. This option can be used multiple times to attach up to 8 total storage devices. The devices are attached in the order they are specified.
: Default: None
-c <CDROM image path>
: Attaches a raw disk image file in read-only mode, simulating a CD-ROM. This option can be used multiple times.
: Default: None
For more details, see the Storage Configuration guide.
Networking
-b <bridged ethernet interface>
: Configures bridged networking by attaching the VM to a specific physical network interface on the host (e.g., en0
).
: Note: This feature requires a special entitlement from Apple and is unlikely to work for most users.
: Default: NAT networking.
For more details, see the Networking guide.
Console and TTY
-t <tty type>
: Specifies the type of terminal (TTY) for the VM's serial console.
: 0
: Use standard input and standard output (stdio). The VM starts immediately, and its console is piped to the terminal running vftool
. This is useful for scripts.
: 1
: Create a pseudo-terminal (pty). vftool
will print the path to the pty device and wait for you to connect with another terminal program (like screen
or minicom
). This is best for interactive sessions.
: Default: 1
(pty)
For more details, see the Console Types guide.