Deploy WSL2 on Windows
Select available Linux and install it
wsl --list --online wsl --install Ubuntu
Edit the Hyper-V vSwitch
notepad %USERPROFILE%\.wslconfig
[wsl2] vmSwitch="WSL" dhcp=true ipv6=false memory=4GB processors=12 localhostForwarding=true
wsl
vi /etc/wsl.conf
[boot] systemd=true [user] default=user
echo -e "network:\n version: 2\n renderer: networkd\n ethernets:\n eth0:\n dhcp4: true\n optional: true" | sudo tee /etc/netplan/01-netcfg.yaml && sudo netplan apply
VMWare env setup
@echo off
setlocal enabledelayedexpansion
set "VMW_PATH=C:\Program Files (x86)\VMware\VMware Workstation"
cd /d "%VMW_PATH%"
for /f "tokens=*" %%i in ('vmrun.exe list') do (
set line=%%i
if "!line:~0,4!" NEQ "Total" (
if "!line!" NEQ "" (
echo Starting VM: !line!
vmrun.exe start "!line!" nogui
)
)
)
Login
0 Comments
Oldest