Building a Debian Virtual Machine
Create the VM
Open Hyper-V Manager
New → Virtual Machine
Give it a name
Assign memory
You can check 'dynamic' for now, and set the range later by right clicking on the VM, choosing settings, and then RAM. For Debian, I use 512-2048, depending on what the VM will be used for, but Debian is fairly lightweight.
Configure networking for your virtual switch
This assumes you've created one, if not, go into virtual switch manager, create one, and assign it to a physical port that has a connection.
Set disk space
4gb is usually fine for small applications, again, depends on your use case. this is a bit of a PITA to change later without some boot corruption, so overestimate if anything.
Installation options
install an operating system from a bootlable cd/DVD-Rom → image file → path to ISO
If you do not have an .iso, Debian can be downloaded for free from its webiste
right click on your VM, connect
Now Install Debian via CLI
Choose CLI install
Some General Settings
English
United States
American English
Give it a hostname
Input your domain name (this can be blank)
Create root password
Create a new user
Create a new password
Set the timezone
Hard drive and Installation Options
Partition disks → Guided → Use entire disk → All files in one partition → Finish
Answer “yes” for changes to disk
Wait for fxxxing ever
Answer “no” for configure package manager
United States
ftp.us.debian.org
Leave proxy blank → continue
Wait some more
Answer “no” for the survey
Installation Configuration Options
Un-check (spacebar) Debian desktop –seriously, I said CLI
Un-check printserver
Check SSH server
Check standard system utilities
Continue
Wait even more
Answer “yes” for install grub bootloader
Choose device “sda”
First Boot - Now Configure Your VM
Login with root/pw
apt-get install sudo -y usermod -aG sudo //newusernamehere// logout
Login with newusername
sudo bash sudo nano /etc/network/interfaces
leave loopback
remove dhcp
obviously the IP, subnet mask, dns, etc.. will all determine on your network configuration. This is an example with a Class C, one internal DNS, one external.
# The primary network interface auto eth0 iface eth0 inet static address 192.168.1.40 netmask 255.255.255.0 network 192.168.1.0 broadcast 192.168.1.255 gateway 192.168.1.1 dns-nameservers 192.168.1.33 208.67.222.222
(Ctrl +x) (y , enter) –This saves the document
sudo reboot
At this point stop using hyper-V terminal and ssh into the IP address you selected. Your Debian VM is setup. Now you can install whatever tools and software you wish and put it to use.

Discussion