Hyper-V Tricks, Fixes and Hacks
Creating a NAT Switch
PS> New-VMSwitch -SwitchName "NATSwitch" -SwitchType Internal PS> New-NetIPAddress -IPAddress 192.168.1.1 -PrefixLength 24 -InterfaceAlias "vEthernet (NATSwitch)" PS> New-NetNat -Name "NATNetwork" -InternalIPInterfaceAddressPrefix 192.168.1.0/24
Problem: Ubuntu running on Hyper-V doesn't appear to finish booting
In my case I got this cryptic message:
/dev/sda1: clean, w/x files, y/z blocks
And there it sits - doing nothing. To fix it do the following:
Ctrl+Alt+F2 -> Hey, there is a login prompt here!
- Login
- sudo apt-get purge nvidia*
- Why? Not sure, but this has been the cause often
- sudo ubuntu-drivers autoinstall
- Yes, you do need an internet connection for this.
- reboot
before rebooting, I actually went through the apt update && apt upgrade process.
Thanks to Ocean Wong (https://askubuntu.com/questions/882385/dev-sda1-clean-this-message-appears-after-i-startup-my-laptop-then-it-w)