How to Install Guest Additions via command line for Windows and Linux VM’s.
Posted: 27. Dec 2021, 00:22
Installing Guest Additions online via command line for Windows and Linux VM’s.
I was unable to install Guest Additions for either my Windows 10 or my Linux VM, via “Devices/Insert Guest Additions CD Image...”.*
However, I was able to install Guest Additions for both VM's, from online sources, via command line.
I describe how, in case this is useful to anyone (I suspect that fewer people know how to do this for a Windows VM, than for a Linux VM).
LINUX
For Linux, the command is:
WINDOWS
For Windows, open Powershell as administrator (I use version 7, but suspect this will work for other versions).
"Chocolatey" is the Windows equivalent of "apt-get".
If you don't have it installed, you'll need to install it.
Before installing Chocolatey, you may wish to check your execution policy.
My execution policy is "RemoteSigned".
If yours is "Restricted", you'll need to change it.
To see your execution policy:
To change it,
or
You may then install Chocolatey with:
Once Chocolatey is installed, you may then download and install Guest Additions:
Good Luck
*I intend to make posts regarding those issues.
I was unable to install Guest Additions for either my Windows 10 or my Linux VM, via “Devices/Insert Guest Additions CD Image...”.*
However, I was able to install Guest Additions for both VM's, from online sources, via command line.
I describe how, in case this is useful to anyone (I suspect that fewer people know how to do this for a Windows VM, than for a Linux VM).
LINUX
For Linux, the command is:
Code: Select all
sudo apt-get install virtualbox-guest-additions-isoFor Windows, open Powershell as administrator (I use version 7, but suspect this will work for other versions).
"Chocolatey" is the Windows equivalent of "apt-get".
If you don't have it installed, you'll need to install it.
Before installing Chocolatey, you may wish to check your execution policy.
My execution policy is "RemoteSigned".
If yours is "Restricted", you'll need to change it.
To see your execution policy:
Code: Select all
Get-ExecutionPolicyCode: Select all
Set-ExecutionPolicy AllSignedCode: Select all
Set-ExecutionPolicy RemoteSignedCode: Select all
iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))Code: Select all
choco install virtualbox-guest-additions-guest.install*I intend to make posts regarding those issues.