I would like to list details of a VirtualBox VM, from the command line - not from the GUI. I am especially interested in the storage details.
When I click on a VM in the GUI, I can see details including the storage section:
But I haven't found so far a way to do this via the command line.
I am on 16.04 and use
VBoxManage --version
5.1.22r115126
The Machine Folder. By default, each virtual machine has a directory on your host computer where all the files of that machine are stored: the XML settings file, with a . vbox file extension, and its disk images. This is called the machine folder.
vms: Lists all virtual machines currently registered with Oracle VM VirtualBox. By default this displays a compact list with each VM's name and UUID. If you also specify --long or -l , this will be a detailed list as with the showvminfo command, see Section 7.5, “VBoxManage showvminfo”.
VBoxManage list vms -l
will list many details for each vm, including the storage controllers:
Storage Controller Name (0): SATAController
Storage Controller Type (0): IntelAhci
Storage Controller Instance Number (0): 0
Storage Controller Max Port Count (0): 30
Storage Controller Port Count (0): 1
Storage Controller Bootable (0): on
SATAController (0, 0): /home/user/VirtualBox VMs/vm/box-disk1.vmdk
To get the storage capacity,
VBoxManage list hdds
will yield something like:
UUID: 188d5da1-ec54-4f06-bdf1-a4435db40cf28
Parent UUID: base
State: locked write
Type: normal (base)
Location: /home/user/VirtualBox VMs/vm/box-disk1.vmdk
Storage format: VMDK
Capacity: 40960 MBytes
Encryption: disabled
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With