> Austin.Lai |
> -----------| February 10th, 2024
> -----------| Updated on February 10th, 2024
DISCLAIMER:
This project/repository is provided "as is" and without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In no event shall the authors or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the software.
This project/repository is for Educational purpose ONLY. Do not use it without permission. The usual disclaimer applies, especially the fact that me (Austin) is not liable for any damages caused by direct or indirect use of the information or functionality provided by these programs. The author or any Internet provider bears NO responsibility for content or misuse of these programs or any derivatives thereof. By using these programs you accept the fact that any damage (data loss, system crash, system compromise, etc.) caused by the use of these programs is not Austin responsibility.
This project/repository is a local setup of Win11 VM in Virtualbox.
Note:
- The configurations in this project/repository are for your reference ONLY (the reasons are as follows):
-
The setup is hosted in Virtual Machine environment, leveraging Virtualbox on a Windows host.
-
You can download Win11 Virtualbox VM from Official Windows 11 development environment Virtual Machines.
-
This setup require you to configure two network interfaces for the Win11 Virtualbox VM:
- VirtualBox Host-Only Ethernet Adapter (192.168.56.0/24)
- NAT
-
This setup has a
virtualbox-import-and-modifyvm
powershell script: -
Please change the configuration accordingly to suits your hosting environment.
-
This powershell script will extract the Win11 VirtualBox VM archive to the specified folder and import to VirtualBox.
Then, it will change the configuration accordingly:
- Enable Hot-Pluggable HHD
- Use USB3 instead of USB1
- Enable clipboard and drag-and-drop functionality with cidirectional
- Enable hardware clock in UTC time
- Enable audio with "dsound" driver along with audio input and audio output
- Set Network Adapter 1 to "VirtualBox Host-Only Ethernet Adapter"
- Set Network Adapter 2 to "NAT"
- Enable Remote Display Server with port 5955 and use "guest" authentication method
- Enable share folder with auto-mount
The virtualbox-import-and-modifyvm.ps1
file can be found here or below:
Click here to expand for the "virtualbox-import-and-modifyvm.ps1" !!!
# Define paths and variables
$archivePath = "C:\WinDev2401Eval.VirtualBox.zip"
$extractedPath = "C:\virtual-machines-storage"
$ovaFilePath = "C:\virtual-machines-storage\WinDev2401Eval.ova"
# Set VM name
$vmName = "WinDev2401Eval"
# Extract the zip archive
Expand-Archive -Path $archivePath -DestinationPath $extractedPath -Confirm
# Import the virtual machine to VirtualBox
VBoxManage import "$ovaFilePath"
Start-Sleep -Seconds 2
# Attach the virtual machine to grouping
VBoxManage modifyvm $vmName --groups "/Windows_VM/Win11_Normal_Use"
# Enable hot-pluggable hard disk
VBoxManage storageattach "WinDev2401Eval" --storagectl "SATA Controller" --device 0 --port 0 --type hdd --hotpluggable on
# Select USB3 Controller
VBoxManage modifyvm $vmName --usbxhci on
# Enable shared clipboard and drag-and-drop
VBoxManage modifyvm $vmName --clipboard bidirectional
VBoxManage modifyvm $vmName --draganddrop bidirectional
# Enable hardware clock in UTC time
VBoxManage modifyvm $vmName --rtcuseutc on
# Enable audio with Host Audio Driver = Windows DirectSound
VBoxManage modifyvm $vmName --audio "dsound"
VBoxManage modifyvm $vmName --audioin on
VBoxManage modifyvm $vmName --audioout on
# Change Network Adapter 1 to host-only
VBoxManage modifyvm $vmName --nic1 hostonly --hostonlyadapter1 "VirtualBox Host-Only Ethernet Adapter"
# Change Network Adapter 2 to NAT
VBoxManage modifyvm $vmName --nic2 nat
# Configure remote server
VBoxManage modifyvm $vmName --vrde on
VBoxManage modifyvm $vmName --vrdeport 5955
VBoxManage modifyvm $vmName --vrdeauthtype guest
VBoxManage modifyvm $vmName --vrdemulticon on
# Enable shared folder
VBoxManage sharedfolder add $vmName --name "virtual-machines-storage" --hostpath "C:\virtual-machines-storage" --automount
VBoxManage sharedfolder add $vmName --name "host-c" --hostpath "C:\" --automount
Write-Host "WinDev2401Eval virtual machine configuration completed."