This guide will help you configure a Debian 12 virtual machine on a Windows host, including adjustments for screen resolution, installation of necessary software, and system configuration.
- Hyper-V enabled on Windows
- Debian 12 ISO
- Internet connection for the VM
- Choose "New VM" (not quick create)
- Select "Generation 2"
- Go to Settings:
- Disable Secure Boot
- Enable guest services in the Integration Services.
Run the following command in an administrator PowerShell on the Windows host (MAKE SURE YOU CHANGE DebianTest to your Hyper-V image name):
Set-VM -VMName DebianTest -EnhancedSessionTransportType HvSocket
Install Debian 12 as you prefer. Remember to set up both root/sudo and user accounts. During the final step of the installation:
- Configure Gnome
After the first boot:
# Login with your user account (not root)
su root # Switch to root on that profile
apt install git -y # Install git
git clone https://github.com/pentestfunctions/test-setup.git
cd test-setup
chmod +x setup.sh
./setup.sh
After running setup.sh
, the system will reboot. Simply click to reconnect.
When you boot the VM, on the login screen you will be prompted for enhanced session mode (RDP) after a few seconds. You can adjust the resolution now if you wish. Also ensure that give it a few seconds before logging into Xorg
Once logged into the Xorg session, run:
cd ~/test-setup
sudo chmod +x configure.sh
./configure.sh
Then simply setup your .bashrc with this one
https://github.com/pentestfunctions/test-setup/blob/main/.bashrc