VirtualBox - command line

In VirtualBox not all parameters can be changed from the graphical interface. Some part is changed using the command line. Change the size of the hard disk

The virtual machine’s hard disk is usually located in the ~ / VirtualBox directories, then the name of the virtual machine or ~ / .VirtualBox / HardDisks

Note

Resizing is possible only for a disk in VDI format. Drives imported from an OVA image cannot be enlarged with this command!

Resize a hard disk

Is performed with the command

VBoxManage modifyhd Your_disk.vdi –resize size_in_Mb

The full path to the disk must be specified. In the current 5th version of VirtualBox (command service VBoxManage), the modifyhd command has been replaced by modifymedium.

More details. For example, if you want to set the disk size to 12000 Megabytes (12 GB) then execute:

VBoxManage modifyhd natty.vdi –resize 12000

Change the amount of RAM

Go to the directory C\:ProgramFiles\Oracle\Virtualbox and execute the command:

VBoxManage modifyvm «machine_name» –memory 4000

The size of the RAM is specified in megabytes, it allows you to set the virtual machine memory larger than it is on a real machine.

Note

After setting the amount of memory exceeding that on the host machine, you will not be able to edit the properties of the machine chz. graphical interface.

Change OS name

The OS name is changed with a command of this type:

VboxManage modifyvm «имя_машины_до» –name NEW_NAME

Quotation characters in the new computer name are optional.

Convert VMWare vmdk image to VirtualBox vdi

The original guide - https://vmblog.ru/konvertaciya-obraza-vmware-

Below are the instructions on converting VMWAre image (vmdk file format to Oracle VirtualBox image (vdi). This guide will help you to launch virtual machine created in VMWare environment on a workstation with VirtualBox.

We require the desktop version of Oracle VirtualBox. Copy vmdk files to the local hard drive, run command line interface as administrator and go to the directory containing VirtualBox:

cd c: \Program Files\Oracle\VirtualBox\

Then launch embedded VBoxManage tool with clonehd parameter to create a copy of virtual machine file and convert it from VMDK to VDI.

Note

Note. Before starting the conversion you should delete snapshot of the virtual machine and make sure that the disk is not used by any running virtual machines.

VBoxManage clonehd --format VDI D:\clonation\PROJECT.virtual.vmdk D:\Virtual.vdi

Now you can create a new virtual machine on VirtualBox and connect the created vdi disk to it. Converted disk will be placed in the root of D:\