Windows 11

lonely
The Windows system of the new notebook feels very difficult to use. Linux is still comfortable to use. Because of the driver, linux can only be used in virtual machines.

mount webdav with http protocol

  1. modify register
    In windows, https is the default protocol of webdav, for enable http and https support set BasicAuthLevel=2
    1
    2
    3
    4
    Windows Registry Editor Version 5.00
    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WebClient\Parameters]
    "BasicAuthLevel"=dword:2
    "FileSizeLimitInBytes"=dword:ffffffff
  2. restart webclient service
    1
    PS C:\> Restart-Service -Name webclient
  3. mount http://webdav.nas.net to z:

add hyper-v for Win home edition

hyperv.bat

1
2
3
4
5
6
7
8
9
10
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

Dism /online /enable-feature /featurename:Microsoft-Hyper-V -All /LimitAccess /ALL

pause

add gpedit for Win Home Edition

gpedit.msc.bat

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
@echo off

>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
REM --> If error flag set, we do not have admin.
if '%errorlevel%' NEQ '0' (
echo Requesting administrative privileges...
goto UACPrompt
) else ( goto gotAdmin )
:UACPrompt
echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
echo UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%\getadmin.vbs"
"%temp%\getadmin.vbs"
exit /B
:gotAdmin
if exist "%temp%\getadmin.vbs" ( del "%temp%\getadmin.vbs" )
pushd "%CD%"
CD /D "%~dp0"

pushd "%~dp0"

dir /b %SystemRoot%\servicing\Packages\Microsoft-Windows-GroupPolicy-ClientExtensions-Package~3*.mum >List.txt
dir /b %SystemRoot%\servicing\Packages\Microsoft-Windows-GroupPolicy-ClientTools-Package~3*.mum >>List.txt

for /f %%i in ('findstr /i . List.txt 2^>nul') do dism /online /norestart /add-package:"%SystemRoot%\servicing\Packages\%%i"
pause

VMWare

Enable VT-x

  1. Enable your Virtualization in BIOS
  2. Disable Hyper-V and Windows Hypervisor Platfform at Turn Windows Features on or off in control panel.
  3. Type command in CMD/PowerShell (Runs as Admin)
    1
    bcdedit /set hypervisorlaunchtype off
  4. [Option] Go to Device Security –> Core Isolation –> Core Isolation Details –> Turn off Memory Integrity
  5. Reboot system.
  6. After that Intel VT-x and other feature were detected in VMWare.

install vmware-tools in win7

  1. Close the virtual machine which named Windows7.
  2. View the virtual machine settings, then remove the floppy disk.
  3. Enter the Win7 virtual machine again, and “Install VMware Tools” again.

Driver Signature Problem

In 2019, Microsoft upgraded the driver signing algorithm from SHA1 to SHA2. Since Windows 7 *only supports SHA1 and the VMware Tools driver uses SHA2 signature, so the driver cannot be installed.We need to download and install patch kb4474419 to make Win7 support SHA2 algorithm.

Hyper-V

Share devices with your virtual machine

Hyper-V Enhanced Session Mode

Prerequisites

  1. Hyper-V version newer than 2012R2.
  2. The virtual machine is a “second generation” virtual machine.
  3. The guest virtual machine operating system version is Windows 2012 and later.
  4. Open the server enhanced session mode.
  5. Turn on user enhanced session mode

Operation steps

  1. Open Hyper-V settings, locate “Server - Enhanced Session Mode Policy” and make sure “Allow Enhanced Session Mode” is checked.
  2. Open Hyper-V settings, locate “Users - Enhanced Session Mode” and make sure “Allow Enhanced Session Mode” is checked.
  3. To create a new virtual machine, select “second generation” virtualization.
  4. Note that the second-generation virtual machine’s setup interface does not support the IDE channel, so the virtual disk can only add a SCSI channel. Systems earlier than Windows Server 2012 version are not supported to boot from SCSI channel, so to enable enhanced session mode, the guest system should be Windows Server 2012 or later.
  5. Once all the above conditions are met, open the Hyper-V virtual machine connection and the Remote Desktop Settings dialog box will pop up automatically.

Cannot use Enhanced Session Mode

If the above conditions are met, but still cannot use the enhanced session mode. Then:

  1. Go to the virtual machine
    2.Settings–>Accounts–>Login Options–>Turn off Windows Hello.

Default switch no dhcp

No dhcp server

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
$ Get-NetIPInterface

ifIndex InterfaceAlias AddressFamily NlMtu(Bytes) InterfaceMetric Dhcp ConnectionState PolicyStore
------- -------------- ------------- ------------ --------------- ---- --------------- -----------
44 vEthernet (nat) IPv6 1500 15 Enabled Connected ActiveStore
24 vEthernet (Default Switch) IPv6 1500 5000 Enabled Connected ActiveStore
20 Ethernet 2 IPv6 4074 25 Enabled Connected ActiveStore
11 Local Network* 2 IPv6 1500 25 Disabled Disconnected ActiveStore
10 Local Network* 1 IPv6 1500 25 Disabled Disconnected ActiveStore
6 WLAN IPv6 1500 35 Enabled Disconnected ActiveStore
1 Loopback Pseudo-Interface 1 IPv6 4294967295 75 Disabled Connected ActiveStore
44 vEthernet (nat) IPv4 1500 15 Disabled Connected ActiveStore
24 vEthernet (Default Switch) IPv4 1500 5000 Disabled Connected ActiveStore
20 Ethernet 2 IPv4 4074 1 Enabled Connected ActiveStore
11 Local Network* 2 IPv4 1500 25 Enabled Disconnected ActiveStore
10 Local Network* 1 IPv4 1500 25 Enabled Disconnected ActiveStore
6 WLAN IPv4 1500 2 Enabled Disconnected ActiveStore
1 Loopback Pseudo-Interface 1 IPv4 4294967295 75 Disabled Connected ActiveStore

$ set-netipinterface -InterfaceAlias "vEthernet (Default Switch)" -AddressFamily IPv4 -Dhcp Enabled

Hyper-V no Internet issue for Windows 11/10

If your Windows 11 Hyper-V no Internet access (or other late versions like Windows 10 or Windows Server 2019), you can try sharing your host network connection with Hyper-V. It is necessary to note that you need to create a new virtual network switch and specify a network adapter first before sharing the network connection in Hyper-V.

  • Step 1. Add a new Virtual Network Switch in Windows 11
  1. Access to Hyper-V Manager and shut down the Windows 11 virtual machine. Then right-click the VM and select Virtual Switch Manager.
  2. In the opened wizard, click New virtual network switch >> External >> Create Virtual Switch.
  3. Type a name for the new virtual network switch, and select External network >> Realtek PCIe GBE Family Controller >> Allow management operating system to share this network adapter.
  • Step 2. Specify the configuration of Network Adapter
  1. Back to Hyper-V Manager, select the virtual machine and Settings.
  2. Click Network Adapter, and select the virtual switch you created. Click OK.
  • Step 3. Share the Network Connection in Hyper-V
  1. From the desktop, click the Network icon and open the settings.
  2. Click Status>>Change adapter options to find the virtual machine network.
  3. Right-click it and select Properties >> Sharing >> Allow other network users to connect through this computer’s Internet connect. Then from the below box, select the created network switch. Click OK.
  4. Power on the Windows 10 virtual machine to check the network status.

IKEV VPN

Automatically open VPN and modify routes

1
2
C:\WINDOWS\system32\rasdial.exe haven200
route change 192.168.100.66 MASK 255.255.255.192 gateway 192.168.100.97 IF 2

WSL2 Kali

Install desktop environment

  • Win-KeX
  • Manual installation steps for older versions of WSL

No Internet

1
:~$ nano /etc/resolves

Reference:

  • Vt-x enabled in bios but not working in windows 11
  • Virtualization Intel VT-xEPT it not supported on this plataform
  • csdn_VVmare Tools
  • 51cto-Hyper-v
  • ubackup.com
  • Win-KeX
  • Manual installation steps for older versions of WSL