Ubuntu Server Setup
Tags: Troubleshooting
Update repositories with
sudo apt update
Install Virtualbox with
sudo apt install virtualbox virtualbox-ext-pack virtualbox-guest-additions-iso -y
Acquire Windows Server 2022 ISO from microsoft official website. Since I already have a copy, I just hosted in on a webserver and download it on the ubuntu machine
# Create the VM
VBoxManage createvm --name "WinServer" --ostype "Windows2022_64" --register
# Configure basic settings with bridged networking
VBoxManage modifyvm "WinServer" --memory 2048 --vram 128 --cpus 2 --firmware efi
VBoxManage modifyvm "WinServer" --nic1 bridged --bridgeadapter1 wlan0 --nictype1 82540EM
VBoxManage modifyvm "WinServer" --audio-driver none --usb off --usbehci off
# Create virtual disk
VBoxManage createmedium disk --filename "WinServer.vdi" --size 51200
# Attach storage controller and disk
VBoxManage storagectl "WinServer" --name "SATA Controller" --add sata --controller IntelAhci
VBoxManage storageattach "WinServer" --storagectl "SATA Controller" --port 0 --device 0 --type hdd --medium "WinServer.vdi"
VBoxManage storagectl "WinServer" --name "IDE Controller" --add ide
VBoxManage storageattach "WinServer" --storagectl "IDE Controller" --port 0 --device 0 --type dvddrive --medium /usr/share/virtualbox/VBoxGuestAdditions.iso
# Attach ISO for installation
VBoxManage storagectl "WinServer" --name "IDE Controller" --add ide
VBoxManage storageattach "WinServer" --storagectl "IDE Controller" --port 0 --device 0 --type dvddrive --medium "SERVER_EVAL_x64FRE_en-us.iso"
# Enable RDP
VBoxManage modifyvm "WinServer" --vrde on --vrdeport 3389