VirtualBox does not provide a direct command to list unregistered virtual machines (VMs)—that is, VMs that exist on disk but are not currently registered in the VirtualBox manager. The standard commands like VBoxManage list vms or VBoxManage list runningvms only show VMs that are registered for the current user[2][10][8]. However, you can identify unregistered VMs by comparing the files present on disk with the list of registered VMs.
Why Unregistered VMs Occur
Unregistered VMs typically result from:
Moving VM folders or files outside of VirtualBox.
Deleting VMs from VirtualBox without deleting their files.
Restoring VMs from backup without re-registering them.
How to Find Unregistered VMs
1. Locate the VirtualBox VMs Folder
By default, VirtualBox stores VMs in the "VirtualBox VMs" folder in your home directory (e.g., ~/VirtualBox VMs on Linux/macOS or C:\Users\<username>\VirtualBox VMs on Windows)[14]. Each VM typically has its own subfolder containing a .vbox file (the VM definition) and one or more virtual disk files (e.g., .vdi).
2. List Registered VMs
Run the following command to list all VMs currently registered with VirtualBox for the current user:
sh
VBoxManage list vms
This will output the names and UUIDs of all registered VMs[2][10].
3. Compare with Disk Contents
Manually or with a script, list all .vbox files in your "VirtualBox VMs" directory.
Any .vbox file not shown in the output of VBoxManage list vms is an unregistered VM.
Example Bash Script (Linux/macOS):
bash
cd ~/VirtualBox\ VMs
for vboxfile in */*.vbox; do
vmname=$(basename "${vboxfile}" .vbox)
if ! VBoxManage list vms | grep -q "\"${vmname}\""; then
echo "Unregistered VM found: $vmname ($vboxfile)"
fi
done
On Windows (PowerShell):
powershell
$vmFolders = Get-ChildItem "$env:USERPROFILE\VirtualBox VMs" -Directory
$registeredVMs = VBoxManage list vms | ForEach-Object {
($_ -split '"')[1]
}
foreach ($folder in $vmFolders) {
$vboxFile = Get-ChildItem $folder.FullName -Filter *.vbox
if ($vboxFile) {
$vmName = $vboxFile.BaseName
if ($registeredVMs -notcontains $vmName) {
Write-Host "Unregistered VM found: $vmName ($($vboxFile.FullName))"
}
}
}
Registering an Unregistered VM
To register an unregistered VM, use:
sh
VBoxManage registervm "/path/to/your/vm.vbox"
This will add the VM back to the VirtualBox manager for the current user[7][4].
Important Notes
User Context: VirtualBox VM registration is per user. Running VBoxManage list vms as a different user (including root) will not show VMs registered under another user[8][1].
VM Disk Files: If you only have the disk file (e.g., .vdi) and not the .vbox file, you will need to create a new VM and attach the existing disk[4][13].
Inaccessible VMs: If a VM is registered but its files are missing or corrupted, it will appear as "inaccessible" in the VM list, not as unregistered[16].
Summary Table
Method
What It Shows
Command/Action
VBoxManage list vms
Registered VMs (current user)
VBoxManage list vms
Disk scan
All VM folders and .vbox files
List files in VirtualBox VMs directory
Manual comparison
Unregistered VMs
Compare .vbox files to list vms output
Register VM
Add unregistered VM
VBoxManage registervm /path/to/vm.vbox
In summary:
To list unregistered VMs in VirtualBox, compare the .vbox files present in your VM storage directory with the output of VBoxManage list vms. Any .vbox file not listed by the command is an unregistered VM, which you can re-register using VBoxManage registervm[4][7][14].
User
i dont want to register the vm. is there any command in virtualbox that shows me vm info of a unregistered vm. i have the path to the vbox file.
Assistant
There is no VirtualBox command that will display information about a VM directly from a .vbox file (the VM definition XML) if that VM is not registered in VirtualBox. All standard VBoxManage commands such as showvminfo or list vms only operate on VMs that are already registered in the VirtualBox manager for the current user[8][10][9].
where "VM Name" is not registered, you will receive an error like:
> VBoxManage: error: Could not find a registered machine named 'VM Name'
> VBoxManage: error: Details: code VBOX_E_OBJECT_NOT_FOUND (0x80bb0001), component VirtualBoxWrap, interface IVirtualBox, callee IUnknown[9].
Workarounds
Manual Inspection:
The .vbox file is an XML file. You can open it with any text editor or XML viewer to inspect the VM's configuration (name, hardware, attached disks, etc.).
Register Temporarily:
If you need to use VBoxManage tools, you must register the VM first with:
Disk Info Only:
If you only want information about a virtual disk (e.g., .vdi), you can use:
sh
VBoxManage showhdinfo /path/to/disk.vdi
This works even if the disk is not attached to a registered VM[9].
Summary Table
Task
Command/Method
Works on Unregistered VM?
Show VM info
`VBoxManage showvminfo <name
uuid
Show disk info
VBoxManage showhdinfo <disk file="">
Yes
Manual config inspection
Open .vbox file in text/XML editor
Yes
Register, then show info
VBoxManage registervm ... → showvminfo ...
Yes (after register)
In conclusion:
You cannot use VBoxManage or any VirtualBox command to directly show info about an unregistered VM using only the .vbox file path. Manual inspection or temporary registration is required[8][10][9].
User
I only want to see the graphics controller of that unregistered vm. and this isnt mentioned in the vbox file itself.
Assistant
You cannot use any VirtualBox command (including VBoxManage) to display the graphics controller of an unregistered VM directly from its .vbox file. VirtualBox commands only work with registered VMs, and there is no option to query a .vbox file directly for this information[9].
Why Isn't It in the .vbox File?
The graphics controller setting is stored in the .vbox file (which is XML), but it may not always be obvious or present if the VM was created with defaults or by an older VirtualBox version. If it's missing, the controller is determined by VirtualBox heuristics based on the guest OS type and VirtualBox version[2][6][14].
How to Find the Graphics Controller for an Unregistered VM
If this attribute is present, it tells you the controller.
2. If the Attribute is Missing
If graphicsController is not specified, VirtualBox will use its default for the VM's OS type:
Linux guests:VMSVGA
Windows 7 or later:VBoxSVGA
Windows XP or earlier, Solaris:VBoxVGA
You can check the <guest ...="" ostype="..."></guest> line in the .vbox file to see the intended OS, then infer the likely default[2][6][14].
3. No Command-Line Option
There is no command-line or GUI method to extract this info from an unregistered VM except by reading the .vbox file manually.
Summary Table
Method
Works for Unregistered VM?
Notes
VBoxManage showvminfo
No
Only for registered VMs
Manual XML inspection
Yes
Look for graphicsController in .vbox file
Guess by OS type
Yes (if missing)
Use VirtualBox defaults based on guest OS
In conclusion:
If the graphics controller is not explicitly mentioned in the .vbox file, you must infer it from the guest OS type, as there is no VirtualBox command to display this info for unregistered VMs[2][6][14].