In this article, we will see how to solve 'VBoxManage' is not recognized as an internal or external command error if you are also getting this error on Windows CMD. While this error could occur due to many reasons but most of the time it is because Oracle VirtualBox files path is not set under System PATH environment variable, hence causing the error. To fix this problem, you just need to update the PATH environment variable with the VirtualBox files path and then it will start working. This can be done in two different ways which we shall see in below section in great detail.
Solved: 'VBoxManage' is not recognized as an internal or external command
When I was trying to run
VBoxManage command from the Windows command line then I noticed below error on the output.
D:\Virtualbox\chromeos>VBoxManage convertfromraw chromeos_15054.115.0_reven_recovery_stable-channel_mp-v2.bin chromeos_15054.115.0_reven_recovery_stable-channel_mp-v2.vdi --format VDI 'VBoxManage' is not recognized as an internal or external command, operable program or batch file.
So to fix the above error, you need to set the
PATH environment variable. This can be done in two ways. First is the temporary way in which you could just set the
PATH environment variable from the command line itself as you can see below.
D:\Virtualbox\chromeos>set PATH=%PATH%;"C:\Program Files\Oracle\VirtualBox"
Then now if you try to run
VBoxManage command again, you will see it will start working like below.
D:\Virtualbox\chromeos>VBoxManage convertfromraw chromeos_15054.115.0_reven_recovery_stable-channel_mp-v2.bin chromeos_15054.115.0_reven_recovery_stable-channel_mp-v2.vdi --format VDI Converting from raw image file="chromeos_15054.115.0_reven_recovery_stable-channel_mp-v2.bin" to file="chromeos_15054.115.0_reven_recovery_stable-channel_mp-v2.vdi"... Creating dynamic image with size 6939566592 bytes (6619MB)...
But in this solution, the problem is if you close the command line session then the
VBoxManage command will again won't work. It is simply because the
PATH variable was only set for that session. So to make it permanent, you need to set the
PATH environment variable from the
System Properties. To do that, first open the system properties by searching
env in the bottom windows search bar as shown below.
Alternatively, you can open it by right clicking on
Windows Icon and then click on
System as highlighted below.
Related Settings, click on
Advanced system settings as highlighted below.
Advanced tab, you need to open
Environment Variables as highlighted below.
Here you have the option to set under either
System variables or under
User variables for a specific user. Depending on your requirements, you can set it accordingly. In our case, we want to make VBoxManage command available in all the user profiles so we are setting it under
System variables. We just need to edit the
Path environment variable by clicking on
Edit as shown below.
Then to add a new value, click on
New and then add VirtualBox path as shown below. Finally click on
OK to save and proceed.
Just to update the changes, restart your system once. Now if you try to use
VBoxManage command from anywhere in the command line then you will notice that it is working fine without any issue.
D:\Virtualbox\chromeos>VBoxManage -version 6.1.40r154048