Oracle VirtualBox

(0) install Guest Additions CLI (without GUI)
https://www.techrepublic.com/article/how-to-enable-copy-and-paste-in-virtualbox/

# yum install -y epel-release dkms bzip2 kernel-devel-$(uname -r)
Devices–>Insert Guest Additions CD image…
# mount /dev/cdrom /mnt
# /mnt/VBoxLinuxAdditions.run
reboot, done

(1) install Guest Additions with GUI
https://linuxconfig.org/how-to-install-virtualbox-guest-additions-on-centos-7-linux

(2) mount shared folder
# mount -t vboxsf [Name-in-settings] /mnt

https://serverfault.com/questions/674974/how-to-mount-a-virtualbox-shared-folder

(3) cli headless start/poweroff vm (compatible on both Windows and Linux)
https://schier.co/blog/2013/03/13/start-virtualbox-vm-in-headless-mode.html
https://superuser.com/questions/1153939/start-a-vm-in-virtualbox-without-gui/1153941
https://askubuntu.com/questions/42482/how-to-safely-shutdown-guest-os-in-virtualbox-using-command-line

# vBoxManage list vms ” to list all vms’ names and ids
# VBoxManage startvm <uuid|name> –type headless ” start vm in headless mode
(or VBoxHeadless –startvm <uuid|name>
# VBoxManage controlvm <uuid|name> acpipowerbutton|poweroff “acpipowerbutton is the safe mode, just like press shutdown button on Windows or press power button on physical case, while poweroff likes to forece poweroff without save

(4) vRDP
a> download and install extension pack on vbox.com
b> enable rRDP in vm > setting > display
c> change port 3389 between 5000 and 5050, which typical not used. Mostly 3389 was used by host Windows already
d> change authentication type to <Null> and then mstsc /v:localhost:5001
e> use WinLogon or specified accounts to login
i> WinLogon
VBoxManage setproperty vrdeauthlibrary ” VBoxAuth” (this is the default type)
change authentication type to <External> and mstsc /v:localhost:5001
ii> VBoxAuthSimple
VBoxManage setproperty vrdeauthlibrary “VBoxAuthSimple”
VBoxManage internalcommands passwordhash “my_password” (this will get the word my_password’s hash code)
VBoxManage setextradata “My VM” “VBoxAuthSimple/users/login_user” 2bb80d537b1da3e38bd30361aa855686bde0eacd7162fef6a25fe97bf527a25b
mstsc /v:localhost:5001
iii> on mstsc loads, remember to tick “Allow me to remember credentials”

ref: https://www.virtualbox.org/manual/ch07.html#vbox-auth

VirtualBox VRDP authentication fails with mstsc.exe

(5) list/check vms
a> VBoxManage list vms ” list all vms
b> VBoxManage list runningvms ” list all running vms
c> VBoxManage showvminfo <vm-name> | grep State
(Windows: VBoxManage showvminfo <vm-name> | findstr State)

Leave a Reply

Your email address will not be published. Required fields are marked *