Skip to content

Instantly share code, notes, and snippets.

@n-mam
n-mam / hv-internal-switch
Last active April 17, 2021 06:36
Hyper-V internal network
Hyper-V internal network allows communication to happen only across VMs and between the host and VM.
Assign the VM's network adapter to the Hyper-V internal switch.
We can change the ip address range on the internal hyper-v network switch to say 10.0.0.1 with subnet mask of 255.255.255.0
Assign VM a static ip address to match the ip address range of the internal switch. ex:
--------------------------------------
#iface eth0 inet dhcp
iface eth0 inet static
address 10.0.0.2
netmask 255.255.255.0
@n-mam
n-mam / hv.bat
Last active April 12, 2021 06:25
Enable Hyper-V on Windows 10 Home
REM By default client Hyper-V is available only on Windows-pro SKU. The below bat script enables Hyper-V on Windows Home
pushd "%~dp0"
dir /b %SystemRoot%\servicing\Packages\*Hyper-V*.mum >hyper-v.txt
for /f %%i in ('findstr /i . hyper-v.txt 2^>nul') do dism /online /norestart /add-package:"%SystemRoot%\servicing\Packages\%%i"
del hyper-v.txt