LinuxCommandLibrary

vboxmanage-modifyvm

Modify virtual machine settings

TLDR

Rename the VM

$ VBoxManage modifyvm [uuid|vm_name] --name [new_name]
copy

Adjust memory and CPU
$ VBoxManage modifyvm [uuid|vm_name] --memory [2048] --cpus [2]
copy

Enable Remote Display (VRDE)
$ VBoxManage modifyvm [uuid|vm_name] --vrde on
copy

Enable session recording
$ VBoxManage modifyvm [uuid|vm_name] --recording on
copy

SYNOPSIS

VBoxManage modifyvm <vmname|uuid> [--setting1 <value1>] [--setting2 <value2>] [...]
Example: VBoxManage modifyvm "MyLinuxVM" --memory 4096 --cpus 2 --nic1 bridged

PARAMETERS

--name
    Changes the display name of the virtual machine.

--ostype
    Sets the operating system type of the virtual machine (e.g., Linux26_64, Windows7_64).

--memory
    Configures the base memory size (RAM) allocated to the VM in megabytes.

--cpus
    Specifies the number of virtual CPUs assigned to the VM.

--vram
    Sets the amount of video memory (VRAM) for the VM in megabytes.

--accelerate3d
    Enables or disables 3D acceleration for the VM's display.

--accelerate2dvideo
    Enables or disables 2D video acceleration.

--nic<1-8>
    Configures the network adapter type for a specific network interface card (NIC).

--macaddress<1-8>
    Sets a specific MAC address for a network adapter.

--cableconnected<1-8>
    Simulates connecting or disconnecting the network cable for a NIC.

--boot<1-4>
    Sets the boot order for the specified boot device.

--clipboard
    Controls the clipboard sharing mode between host and guest.

--draganddrop
    Controls the drag and drop functionality between host and guest.

--usb
    Enables or disables the USB controller for the VM.

--usbehci
    Enables or disables the USB EHCI (USB 2.0) controller.

--usbxhci
    Enables or disables the USB xHCI (USB 3.0) controller.

--vrde
    Enables or disables the VirtualBox Remote Desktop Extension (VRDE) server.

--uart<1-2>
    Configures a serial port, either off, connected to a host port, or a file.

--guestcontrol
    Enables or disables the guest control interface for running guest commands.

DESCRIPTION

The VBoxManage modifyvm command is a powerful utility within Oracle VM VirtualBox that allows users to change a wide range of configuration settings for an existing virtual machine (VM). It provides granular control over hardware aspects like memory, CPU count, video memory, network adapters, storage controllers, and USB devices, as well as software features such as clipboard sharing, drag and drop, and VRDP (VirtualBox Remote Desktop Protocol) settings. This command is essential for advanced VM management, automation scripts, and adjusting VM configurations without using the graphical user interface, making it a cornerstone for headless server environments or large-scale VM deployments. Most modifications require the VM to be powered off or in a saved state before they can take effect.

CAVEATS

Most configuration changes made with modifyvm require the virtual machine to be in a powered off or saved state to take effect. Trying to modify certain settings on a running VM may result in an error.
Incorrectly configured settings, especially concerning hardware resources (memory, CPUs), can lead to performance issues, instability, or prevent the VM from starting.
Features like clipboard sharing, drag and drop, and certain display options often rely on the VirtualBox Guest Additions being installed and running within the guest operating system.

EXTENSIVE OPTIONS

The modifyvm command offers an exceptionally large number of configurable parameters, far more than can be listed concisely. For a comprehensive list of all available options and their detailed usage, refer to the official Oracle VM VirtualBox User Manual or execute VBoxManage modifyvm --help on your system.

SCRIPTING AND AUTOMATION

Due to its command-line nature, modifyvm is widely used in shell scripts and other automation frameworks to provision, configure, and manage VirtualBox VMs in an unattended manner, facilitating rapid deployment and consistent environments.

HISTORY

The VBoxManage command-line utility, including its modifyvm subcommand, has been a core component of VirtualBox since its early days under InnoTek. It has consistently served as the primary non-GUI interface for managing and configuring virtual machines. Over its development history, through its acquisition by Sun Microsystems and later Oracle, the modifyvm command has evolved significantly, gaining a vast array of new options and parameters to support the ever-expanding features and capabilities of VirtualBox. Its robust command-line interface has made it indispensable for system administrators, developers, and cloud orchestration tools requiring programmatic control over virtual environments.

SEE ALSO

VBoxManage createvm(1), VBoxManage showvminfo(1), VBoxManage startvm(1), VBoxManage controlvm(1), VBoxManage clonevm(1), VBoxManage storageattach(1)

Copied to clipboard