[{"data":1,"prerenderedAt":2323},["ShallowReactive",2],{"/blog/tag/linux":3},[4,1533],{"_path":5,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":9,"description":10,"date":11,"tags":12,"excerpt":16,"body":26,"_type":1527,"_id":1528,"_source":1529,"_file":1530,"_stem":1531,"_extension":1532},"/blog/hyperv-install-arch","blog",false,"","Installing Arch Linux on Hyper-V","The Linux kernel has been upgraded to version 7 and now uses Rust extensively, delivering major performance improvements. So I'm setting up the latest Arch Linux virtual machine on Hyper-V to give it a try.","2026-07-12 15:27",[13,14,15],"hyper-v","archlinux","linux",{"type":17,"children":18},"root",[19],{"type":20,"tag":21,"props":22,"children":23},"element","p",{},[24],{"type":25,"value":10},"text",{"type":17,"children":27,"toc":1508},[28,32,39,53,60,108,113,134,139,296,301,305,311,316,376,381,401,406,426,431,434,440,445,487,492,506,511,521,524,530,535,540,581,586,617,620,626,647,653,670,696,702,722,735,764,770,794,799,877,942,948,1024,1030,1047,1059,1065,1098,1103,1108,1127,1132,1135,1141,1149,1163,1171,1212,1215,1221,1226,1267,1330,1333,1339,1502],{"type":20,"tag":21,"props":29,"children":30},{},[31],{"type":25,"value":10},{"type":20,"tag":33,"props":34,"children":36},"h2",{"id":35},"installing-arch-linux",[37],{"type":25,"value":38},"Installing Arch Linux",{"type":20,"tag":21,"props":40,"children":41},{},[42,44,51],{"type":25,"value":43},"I chose the official Arch Linux rolling-release image ",{"type":20,"tag":45,"props":46,"children":48},"code",{"className":47},[],[49],{"type":25,"value":50},"archlinux-x86_64.iso",{"type":25,"value":52},", which is about 1.5GB. I went with a minimal installation, which is well suited as a high-performance development server.",{"type":20,"tag":54,"props":55,"children":57},"h3",{"id":56},"key-points-when-creating-the-hyper-v-vm",[58],{"type":25,"value":59},"Key points when creating the Hyper-V VM",{"type":20,"tag":61,"props":62,"children":63},"ul",{},[64,81,98],{"type":20,"tag":65,"props":66,"children":67},"li",{},[68,74,76],{"type":20,"tag":69,"props":70,"children":71},"strong",{},[72],{"type":25,"value":73},"Generation",{"type":25,"value":75},": Select ",{"type":20,"tag":69,"props":77,"children":78},{},[79],{"type":25,"value":80},"Generation 2 (Gen 2)",{"type":20,"tag":65,"props":82,"children":83},{},[84,89,91,96],{"type":20,"tag":69,"props":85,"children":86},{},[87],{"type":25,"value":88},"Secure Boot",{"type":25,"value":90},": Make sure to ",{"type":20,"tag":69,"props":92,"children":93},{},[94],{"type":25,"value":95},"uncheck \"Enable Secure Boot\"",{"type":25,"value":97}," in the VM settings, otherwise it won't boot",{"type":20,"tag":65,"props":99,"children":100},{},[101,106],{"type":20,"tag":69,"props":102,"children":103},{},[104],{"type":25,"value":105},"Network",{"type":25,"value":107},": Use the default network first, then switch to an internal network later",{"type":20,"tag":21,"props":109,"children":110},{},[111],{"type":25,"value":112},"After starting the VM, you'll enter the command-line Live environment. The official installer script is recommended:",{"type":20,"tag":114,"props":115,"children":119},"pre",{"className":116,"code":117,"language":118,"meta":8,"style":8},"language-bash shiki shiki-themes solarized-light github-dark monokai","archinstall\n","bash",[120],{"type":20,"tag":45,"props":121,"children":122},{"__ignoreMap":8},[123],{"type":20,"tag":124,"props":125,"children":128},"span",{"class":126,"line":127},"line",1,[129],{"type":20,"tag":124,"props":130,"children":132},{"style":131},"--shiki-default:#268BD2;--shiki-dark:#B392F0;--shiki-sepia:#A6E22E",[133],{"type":25,"value":117},{"type":20,"tag":21,"props":135,"children":136},{},[137],{"type":25,"value":138},"Key options to choose:",{"type":20,"tag":140,"props":141,"children":142},"table",{},[143,162],{"type":20,"tag":144,"props":145,"children":146},"thead",{},[147],{"type":20,"tag":148,"props":149,"children":150},"tr",{},[151,157],{"type":20,"tag":152,"props":153,"children":154},"th",{},[155],{"type":25,"value":156},"Option",{"type":20,"tag":152,"props":158,"children":159},{},[160],{"type":25,"value":161},"Recommended value",{"type":20,"tag":163,"props":164,"children":165},"tbody",{},[166,188,207,241,254,277],{"type":20,"tag":148,"props":167,"children":168},{},[169,175],{"type":20,"tag":170,"props":171,"children":172},"td",{},[173],{"type":25,"value":174},"Mirror",{"type":20,"tag":170,"props":176,"children":177},{},[178,180,186],{"type":25,"value":179},"Users in China should pick the Tsinghua / USTC mirror under ",{"type":20,"tag":45,"props":181,"children":183},{"className":182},[],[184],{"type":25,"value":185},"China",{"type":25,"value":187}," to speed up downloads",{"type":20,"tag":148,"props":189,"children":190},{},[191,196],{"type":20,"tag":170,"props":192,"children":193},{},[194],{"type":25,"value":195},"Disk partitioning",{"type":20,"tag":170,"props":197,"children":198},{},[199,201],{"type":25,"value":200},"Choose ",{"type":20,"tag":45,"props":202,"children":204},{"className":203},[],[205],{"type":25,"value":206},"Best-effort default partition layout",{"type":20,"tag":148,"props":208,"children":209},{},[210,215],{"type":20,"tag":170,"props":211,"children":212},{},[213],{"type":25,"value":214},"File system",{"type":20,"tag":170,"props":216,"children":217},{},[218,224,226,232,234,239],{"type":20,"tag":45,"props":219,"children":221},{"className":220},[],[222],{"type":25,"value":223},"ext4",{"type":25,"value":225}," (stable) or ",{"type":20,"tag":45,"props":227,"children":229},{"className":228},[],[230],{"type":25,"value":231},"btrfs",{"type":25,"value":233}," (supports snapshots); ",{"type":20,"tag":45,"props":235,"children":237},{"className":236},[],[238],{"type":25,"value":223},{"type":25,"value":240}," is preferred for VMs",{"type":20,"tag":148,"props":242,"children":243},{},[244,249],{"type":20,"tag":170,"props":245,"children":246},{},[247],{"type":25,"value":248},"Users",{"type":20,"tag":170,"props":250,"children":251},{},[252],{"type":25,"value":253},"Set a password for the root user, then add a regular user and make it a sudo user",{"type":20,"tag":148,"props":255,"children":256},{},[257,262],{"type":20,"tag":170,"props":258,"children":259},{},[260],{"type":25,"value":261},"Profile",{"type":20,"tag":170,"props":263,"children":264},{},[265,266,275],{"type":25,"value":200},{"type":20,"tag":69,"props":267,"children":268},{},[269],{"type":20,"tag":45,"props":270,"children":272},{"className":271},[],[273],{"type":25,"value":274},"Minimal",{"type":25,"value":276}," (headless, high performance)",{"type":20,"tag":148,"props":278,"children":279},{},[280,285],{"type":20,"tag":170,"props":281,"children":282},{},[283],{"type":25,"value":284},"Network configuration",{"type":20,"tag":170,"props":286,"children":287},{},[288,290],{"type":25,"value":289},"Keep the default ",{"type":20,"tag":45,"props":291,"children":293},{"className":292},[],[294],{"type":25,"value":295},"NetworkManager",{"type":20,"tag":21,"props":297,"children":298},{},[299],{"type":25,"value":300},"After installation completes, remove the ISO image and reboot into the new system.",{"type":20,"tag":302,"props":303,"children":304},"hr",{},[],{"type":20,"tag":33,"props":306,"children":308},{"id":307},"installing-ssh",[309],{"type":25,"value":310},"Installing SSH",{"type":20,"tag":21,"props":312,"children":313},{},[314],{"type":25,"value":315},"Once in Arch, install and start SSH:",{"type":20,"tag":114,"props":317,"children":319},{"className":116,"code":318,"language":118,"meta":8,"style":8},"sudo pacman -S openssh\nsudo systemctl enable sshd --now\n",[320],{"type":20,"tag":45,"props":321,"children":322},{"__ignoreMap":8},[323,348],{"type":20,"tag":124,"props":324,"children":325},{"class":126,"line":127},[326,331,337,343],{"type":20,"tag":124,"props":327,"children":328},{"style":131},[329],{"type":25,"value":330},"sudo",{"type":20,"tag":124,"props":332,"children":334},{"style":333},"--shiki-default:#2AA198;--shiki-dark:#9ECBFF;--shiki-sepia:#E6DB74",[335],{"type":25,"value":336}," pacman",{"type":20,"tag":124,"props":338,"children":340},{"style":339},"--shiki-default:#CB4B16;--shiki-dark:#79B8FF;--shiki-sepia:#AE81FF",[341],{"type":25,"value":342}," -S",{"type":20,"tag":124,"props":344,"children":345},{"style":333},[346],{"type":25,"value":347}," openssh\n",{"type":20,"tag":124,"props":349,"children":351},{"class":126,"line":350},2,[352,356,361,366,371],{"type":20,"tag":124,"props":353,"children":354},{"style":131},[355],{"type":25,"value":330},{"type":20,"tag":124,"props":357,"children":358},{"style":333},[359],{"type":25,"value":360}," systemctl",{"type":20,"tag":124,"props":362,"children":363},{"style":333},[364],{"type":25,"value":365}," enable",{"type":20,"tag":124,"props":367,"children":368},{"style":333},[369],{"type":25,"value":370}," sshd",{"type":20,"tag":124,"props":372,"children":373},{"style":339},[374],{"type":25,"value":375}," --now\n",{"type":20,"tag":21,"props":377,"children":378},{},[379],{"type":25,"value":380},"Check the IP address:",{"type":20,"tag":114,"props":382,"children":384},{"className":116,"code":383,"language":118,"meta":8,"style":8},"ip a\n",[385],{"type":20,"tag":45,"props":386,"children":387},{"__ignoreMap":8},[388],{"type":20,"tag":124,"props":389,"children":390},{"class":126,"line":127},[391,396],{"type":20,"tag":124,"props":392,"children":393},{"style":131},[394],{"type":25,"value":395},"ip",{"type":20,"tag":124,"props":397,"children":398},{"style":333},[399],{"type":25,"value":400}," a\n",{"type":20,"tag":21,"props":402,"children":403},{},[404],{"type":25,"value":405},"Then connect from a Windows terminal:",{"type":20,"tag":114,"props":407,"children":409},{"className":116,"code":408,"language":118,"meta":8,"style":8},"ssh username@IP_ADDRESS\n",[410],{"type":20,"tag":45,"props":411,"children":412},{"__ignoreMap":8},[413],{"type":20,"tag":124,"props":414,"children":415},{"class":126,"line":127},[416,421],{"type":20,"tag":124,"props":417,"children":418},{"style":131},[419],{"type":25,"value":420},"ssh",{"type":20,"tag":124,"props":422,"children":423},{"style":333},[424],{"type":25,"value":425}," username@IP_ADDRESS\n",{"type":20,"tag":21,"props":427,"children":428},{},[429],{"type":25,"value":430},"You should be able to connect normally at this point. However, if you're using the default Hyper-V network, the VM's IP may change after a reboot, so it's recommended to configure a static IP.",{"type":20,"tag":302,"props":432,"children":433},{},[],{"type":20,"tag":33,"props":435,"children":437},{"id":436},"creating-a-hyper-v-internal-network",[438],{"type":25,"value":439},"Creating a Hyper-V Internal Network",{"type":20,"tag":21,"props":441,"children":442},{},[443],{"type":25,"value":444},"Open:",{"type":20,"tag":114,"props":446,"children":449},{"className":447,"code":448,"language":25,"meta":8,"style":8},"language-text shiki shiki-themes solarized-light github-dark monokai","Hyper-V Manager\n→ Virtual Switch Manager\n→ New Virtual Switch\n→ Internal\n",[450],{"type":20,"tag":45,"props":451,"children":452},{"__ignoreMap":8},[453,461,469,478],{"type":20,"tag":124,"props":454,"children":455},{"class":126,"line":127},[456],{"type":20,"tag":124,"props":457,"children":458},{},[459],{"type":25,"value":460},"Hyper-V Manager\n",{"type":20,"tag":124,"props":462,"children":463},{"class":126,"line":350},[464],{"type":20,"tag":124,"props":465,"children":466},{},[467],{"type":25,"value":468},"→ Virtual Switch Manager\n",{"type":20,"tag":124,"props":470,"children":472},{"class":126,"line":471},3,[473],{"type":20,"tag":124,"props":474,"children":475},{},[476],{"type":25,"value":477},"→ New Virtual Switch\n",{"type":20,"tag":124,"props":479,"children":481},{"class":126,"line":480},4,[482],{"type":20,"tag":124,"props":483,"children":484},{},[485],{"type":25,"value":486},"→ Internal\n",{"type":20,"tag":21,"props":488,"children":489},{},[490],{"type":25,"value":491},"For example, name it:",{"type":20,"tag":114,"props":493,"children":495},{"className":447,"code":494,"language":25,"meta":8,"style":8},"VM-Internal\n",[496],{"type":20,"tag":45,"props":497,"children":498},{"__ignoreMap":8},[499],{"type":20,"tag":124,"props":500,"children":501},{"class":126,"line":127},[502],{"type":20,"tag":124,"props":503,"children":504},{},[505],{"type":25,"value":494},{"type":20,"tag":21,"props":507,"children":508},{},[509],{"type":25,"value":510},"After creation, you also need to go into the VM settings and switch the network adapter to this new virtual switch.",{"type":20,"tag":21,"props":512,"children":513},{},[514,519],{"type":20,"tag":69,"props":515,"children":516},{},[517],{"type":25,"value":518},"Note",{"type":25,"value":520},": Switching the network will immediately drop the existing SSH connection, so it's recommended to finish the Windows-side network configuration first, then switch the VM's network.",{"type":20,"tag":302,"props":522,"children":523},{},[],{"type":20,"tag":33,"props":525,"children":527},{"id":526},"configuring-windows-nat",[528],{"type":25,"value":529},"Configuring Windows NAT",{"type":20,"tag":21,"props":531,"children":532},{},[533],{"type":25,"value":534},"Open PowerShell as Administrator:",{"type":20,"tag":21,"props":536,"children":537},{},[538],{"type":25,"value":539},"Configure the gateway address for the virtual network adapter created by Hyper-V:",{"type":20,"tag":114,"props":541,"children":545},{"className":542,"code":543,"language":544,"meta":8,"style":8},"language-powershell shiki shiki-themes solarized-light github-dark monokai","New-NetIPAddress `\n  -IPAddress 192.168.100.1 `\n  -PrefixLength 24 `\n  -InterfaceAlias \"vEthernet (VM-Internal)\"\n","powershell",[546],{"type":20,"tag":45,"props":547,"children":548},{"__ignoreMap":8},[549,557,565,573],{"type":20,"tag":124,"props":550,"children":551},{"class":126,"line":127},[552],{"type":20,"tag":124,"props":553,"children":554},{},[555],{"type":25,"value":556},"New-NetIPAddress `\n",{"type":20,"tag":124,"props":558,"children":559},{"class":126,"line":350},[560],{"type":20,"tag":124,"props":561,"children":562},{},[563],{"type":25,"value":564},"  -IPAddress 192.168.100.1 `\n",{"type":20,"tag":124,"props":566,"children":567},{"class":126,"line":471},[568],{"type":20,"tag":124,"props":569,"children":570},{},[571],{"type":25,"value":572},"  -PrefixLength 24 `\n",{"type":20,"tag":124,"props":574,"children":575},{"class":126,"line":480},[576],{"type":20,"tag":124,"props":577,"children":578},{},[579],{"type":25,"value":580},"  -InterfaceAlias \"vEthernet (VM-Internal)\"\n",{"type":20,"tag":21,"props":582,"children":583},{},[584],{"type":25,"value":585},"Create the NAT:",{"type":20,"tag":114,"props":587,"children":589},{"className":542,"code":588,"language":544,"meta":8,"style":8},"New-NetNat `\n  -Name \"VM-NAT\" `\n  -InternalIPInterfaceAddressPrefix \"192.168.100.0/24\"\n",[590],{"type":20,"tag":45,"props":591,"children":592},{"__ignoreMap":8},[593,601,609],{"type":20,"tag":124,"props":594,"children":595},{"class":126,"line":127},[596],{"type":20,"tag":124,"props":597,"children":598},{},[599],{"type":25,"value":600},"New-NetNat `\n",{"type":20,"tag":124,"props":602,"children":603},{"class":126,"line":350},[604],{"type":20,"tag":124,"props":605,"children":606},{},[607],{"type":25,"value":608},"  -Name \"VM-NAT\" `\n",{"type":20,"tag":124,"props":610,"children":611},{"class":126,"line":471},[612],{"type":20,"tag":124,"props":613,"children":614},{},[615],{"type":25,"value":616},"  -InternalIPInterfaceAddressPrefix \"192.168.100.0/24\"\n",{"type":20,"tag":302,"props":618,"children":619},{},[],{"type":20,"tag":33,"props":621,"children":623},{"id":622},"configuring-a-static-ip-on-arch-linux",[624],{"type":25,"value":625},"Configuring a Static IP on Arch Linux",{"type":20,"tag":21,"props":627,"children":628},{},[629,631,637,639,645],{"type":25,"value":630},"Arch Linux uses ",{"type":20,"tag":45,"props":632,"children":634},{"className":633},[],[635],{"type":25,"value":636},"systemd-networkd",{"type":25,"value":638}," to manage networking, and configuration files live in ",{"type":20,"tag":45,"props":640,"children":642},{"className":641},[],[643],{"type":25,"value":644},"/etc/systemd/network/",{"type":25,"value":646},".",{"type":20,"tag":54,"props":648,"children":650},{"id":649},"_1-check-the-network-interface-name",[651],{"type":25,"value":652},"1. Check the network interface name",{"type":20,"tag":114,"props":654,"children":655},{"className":116,"code":383,"language":118,"meta":8,"style":8},[656],{"type":20,"tag":45,"props":657,"children":658},{"__ignoreMap":8},[659],{"type":20,"tag":124,"props":660,"children":661},{"class":126,"line":127},[662,666],{"type":20,"tag":124,"props":663,"children":664},{"style":131},[665],{"type":25,"value":395},{"type":20,"tag":124,"props":667,"children":668},{"style":333},[669],{"type":25,"value":400},{"type":20,"tag":21,"props":671,"children":672},{},[673,675,681,683,689,690],{"type":25,"value":674},"Common names: ",{"type":20,"tag":45,"props":676,"children":678},{"className":677},[],[679],{"type":25,"value":680},"eth0",{"type":25,"value":682},", ",{"type":20,"tag":45,"props":684,"children":686},{"className":685},[],[687],{"type":25,"value":688},"ens160",{"type":25,"value":682},{"type":20,"tag":45,"props":691,"children":693},{"className":692},[],[694],{"type":25,"value":695},"enp0s3",{"type":20,"tag":54,"props":697,"children":699},{"id":698},"_2-inspect-and-clean-up-existing-configuration",[700],{"type":25,"value":701},"2. Inspect and clean up existing configuration",{"type":20,"tag":114,"props":703,"children":705},{"className":116,"code":704,"language":118,"meta":8,"style":8},"ls /etc/systemd/network/\n",[706],{"type":20,"tag":45,"props":707,"children":708},{"__ignoreMap":8},[709],{"type":20,"tag":124,"props":710,"children":711},{"class":126,"line":127},[712,717],{"type":20,"tag":124,"props":713,"children":714},{"style":131},[715],{"type":25,"value":716},"ls",{"type":20,"tag":124,"props":718,"children":719},{"style":333},[720],{"type":25,"value":721}," /etc/systemd/network/\n",{"type":20,"tag":21,"props":723,"children":724},{},[725,727,733],{"type":25,"value":726},"If a DHCP config file exists (e.g. ",{"type":20,"tag":45,"props":728,"children":730},{"className":729},[],[731],{"type":25,"value":732},"10-eth0.network",{"type":25,"value":734},"), delete or back it up first to avoid conflicts with the static config (systemd loads files in filename order and matches the first one):",{"type":20,"tag":114,"props":736,"children":738},{"className":116,"code":737,"language":118,"meta":8,"style":8},"sudo mv /etc/systemd/network/10-eth0.network /etc/systemd/network/10-eth0.network.bak\n",[739],{"type":20,"tag":45,"props":740,"children":741},{"__ignoreMap":8},[742],{"type":20,"tag":124,"props":743,"children":744},{"class":126,"line":127},[745,749,754,759],{"type":20,"tag":124,"props":746,"children":747},{"style":131},[748],{"type":25,"value":330},{"type":20,"tag":124,"props":750,"children":751},{"style":333},[752],{"type":25,"value":753}," mv",{"type":20,"tag":124,"props":755,"children":756},{"style":333},[757],{"type":25,"value":758}," /etc/systemd/network/10-eth0.network",{"type":20,"tag":124,"props":760,"children":761},{"style":333},[762],{"type":25,"value":763}," /etc/systemd/network/10-eth0.network.bak\n",{"type":20,"tag":54,"props":765,"children":767},{"id":766},"_3-create-the-static-ip-config-file",[768],{"type":25,"value":769},"3. Create the static IP config file",{"type":20,"tag":114,"props":771,"children":773},{"className":116,"code":772,"language":118,"meta":8,"style":8},"sudo vim /etc/systemd/network/20-wired.network\n",[774],{"type":20,"tag":45,"props":775,"children":776},{"__ignoreMap":8},[777],{"type":20,"tag":124,"props":778,"children":779},{"class":126,"line":127},[780,784,789],{"type":20,"tag":124,"props":781,"children":782},{"style":131},[783],{"type":25,"value":330},{"type":20,"tag":124,"props":785,"children":786},{"style":333},[787],{"type":25,"value":788}," vim",{"type":20,"tag":124,"props":790,"children":791},{"style":333},[792],{"type":25,"value":793}," /etc/systemd/network/20-wired.network\n",{"type":20,"tag":21,"props":795,"children":796},{},[797],{"type":25,"value":798},"Write the following content (adjust the IP according to your setup):",{"type":20,"tag":114,"props":800,"children":804},{"className":801,"code":802,"language":803,"meta":8,"style":8},"language-ini shiki shiki-themes solarized-light github-dark monokai","[Match]\nName=eth0\n\n[Network]\nAddress=192.168.100.10/24\nGateway=192.168.100.1\nDNS=1.1.1.1\nDNS=8.8.8.8\n","ini",[805],{"type":20,"tag":45,"props":806,"children":807},{"__ignoreMap":8},[808,816,824,833,841,850,859,868],{"type":20,"tag":124,"props":809,"children":810},{"class":126,"line":127},[811],{"type":20,"tag":124,"props":812,"children":813},{},[814],{"type":25,"value":815},"[Match]\n",{"type":20,"tag":124,"props":817,"children":818},{"class":126,"line":350},[819],{"type":20,"tag":124,"props":820,"children":821},{},[822],{"type":25,"value":823},"Name=eth0\n",{"type":20,"tag":124,"props":825,"children":826},{"class":126,"line":471},[827],{"type":20,"tag":124,"props":828,"children":830},{"emptyLinePlaceholder":829},true,[831],{"type":25,"value":832},"\n",{"type":20,"tag":124,"props":834,"children":835},{"class":126,"line":480},[836],{"type":20,"tag":124,"props":837,"children":838},{},[839],{"type":25,"value":840},"[Network]\n",{"type":20,"tag":124,"props":842,"children":844},{"class":126,"line":843},5,[845],{"type":20,"tag":124,"props":846,"children":847},{},[848],{"type":25,"value":849},"Address=192.168.100.10/24\n",{"type":20,"tag":124,"props":851,"children":853},{"class":126,"line":852},6,[854],{"type":20,"tag":124,"props":855,"children":856},{},[857],{"type":25,"value":858},"Gateway=192.168.100.1\n",{"type":20,"tag":124,"props":860,"children":862},{"class":126,"line":861},7,[863],{"type":20,"tag":124,"props":864,"children":865},{},[866],{"type":25,"value":867},"DNS=1.1.1.1\n",{"type":20,"tag":124,"props":869,"children":871},{"class":126,"line":870},8,[872],{"type":20,"tag":124,"props":873,"children":874},{},[875],{"type":25,"value":876},"DNS=8.8.8.8\n",{"type":20,"tag":878,"props":879,"children":880},"blockquote",{},[881,891],{"type":20,"tag":21,"props":882,"children":883},{},[884,889],{"type":20,"tag":69,"props":885,"children":886},{},[887],{"type":25,"value":888},"Important",{"type":25,"value":890},":",{"type":20,"tag":61,"props":892,"children":893},{},[894,905,924],{"type":20,"tag":65,"props":895,"children":896},{},[897,903],{"type":20,"tag":45,"props":898,"children":900},{"className":899},[],[901],{"type":25,"value":902},"Name",{"type":25,"value":904}," must match the interface name exactly",{"type":20,"tag":65,"props":906,"children":907},{},[908,910,916,918],{"type":25,"value":909},"Use the ",{"type":20,"tag":45,"props":911,"children":913},{"className":912},[],[914],{"type":25,"value":915},"/24",{"type":25,"value":917}," format for the subnet mask, not ",{"type":20,"tag":45,"props":919,"children":921},{"className":920},[],[922],{"type":25,"value":923},"255.255.255.0",{"type":20,"tag":65,"props":925,"children":926},{},[927,940],{"type":20,"tag":69,"props":928,"children":929},{},[930,932,938],{"type":25,"value":931},"Do not add any ",{"type":20,"tag":45,"props":933,"children":935},{"className":934},[],[936],{"type":25,"value":937},"#",{"type":25,"value":939}," comments or non-ASCII characters",{"type":25,"value":941},", otherwise systemd-networkd may fail to parse the file",{"type":20,"tag":54,"props":943,"children":945},{"id":944},"_4-enable-and-restart-the-network-service",[946],{"type":25,"value":947},"4. Enable and restart the network service",{"type":20,"tag":114,"props":949,"children":951},{"className":116,"code":950,"language":118,"meta":8,"style":8},"sudo systemctl enable systemd-networkd --now\nsudo systemctl enable systemd-resolved --now\nsudo systemctl restart systemd-networkd\n",[952],{"type":20,"tag":45,"props":953,"children":954},{"__ignoreMap":8},[955,979,1003],{"type":20,"tag":124,"props":956,"children":957},{"class":126,"line":127},[958,962,966,970,975],{"type":20,"tag":124,"props":959,"children":960},{"style":131},[961],{"type":25,"value":330},{"type":20,"tag":124,"props":963,"children":964},{"style":333},[965],{"type":25,"value":360},{"type":20,"tag":124,"props":967,"children":968},{"style":333},[969],{"type":25,"value":365},{"type":20,"tag":124,"props":971,"children":972},{"style":333},[973],{"type":25,"value":974}," systemd-networkd",{"type":20,"tag":124,"props":976,"children":977},{"style":339},[978],{"type":25,"value":375},{"type":20,"tag":124,"props":980,"children":981},{"class":126,"line":350},[982,986,990,994,999],{"type":20,"tag":124,"props":983,"children":984},{"style":131},[985],{"type":25,"value":330},{"type":20,"tag":124,"props":987,"children":988},{"style":333},[989],{"type":25,"value":360},{"type":20,"tag":124,"props":991,"children":992},{"style":333},[993],{"type":25,"value":365},{"type":20,"tag":124,"props":995,"children":996},{"style":333},[997],{"type":25,"value":998}," systemd-resolved",{"type":20,"tag":124,"props":1000,"children":1001},{"style":339},[1002],{"type":25,"value":375},{"type":20,"tag":124,"props":1004,"children":1005},{"class":126,"line":471},[1006,1010,1014,1019],{"type":20,"tag":124,"props":1007,"children":1008},{"style":131},[1009],{"type":25,"value":330},{"type":20,"tag":124,"props":1011,"children":1012},{"style":333},[1013],{"type":25,"value":360},{"type":20,"tag":124,"props":1015,"children":1016},{"style":333},[1017],{"type":25,"value":1018}," restart",{"type":20,"tag":124,"props":1020,"children":1021},{"style":333},[1022],{"type":25,"value":1023}," systemd-networkd\n",{"type":20,"tag":54,"props":1025,"children":1027},{"id":1026},"_5-confirm-the-ip",[1028],{"type":25,"value":1029},"5. Confirm the IP",{"type":20,"tag":114,"props":1031,"children":1032},{"className":116,"code":383,"language":118,"meta":8,"style":8},[1033],{"type":20,"tag":45,"props":1034,"children":1035},{"__ignoreMap":8},[1036],{"type":20,"tag":124,"props":1037,"children":1038},{"class":126,"line":127},[1039,1043],{"type":20,"tag":124,"props":1040,"children":1041},{"style":131},[1042],{"type":25,"value":395},{"type":20,"tag":124,"props":1044,"children":1045},{"style":333},[1046],{"type":25,"value":400},{"type":20,"tag":21,"props":1048,"children":1049},{},[1050,1052,1058],{"type":25,"value":1051},"It should now show ",{"type":20,"tag":45,"props":1053,"children":1055},{"className":1054},[],[1056],{"type":25,"value":1057},"inet 192.168.100.10/24",{"type":25,"value":646},{"type":20,"tag":54,"props":1060,"children":1062},{"id":1061},"_6-test-the-network",[1063],{"type":25,"value":1064},"6. Test the network",{"type":20,"tag":114,"props":1066,"children":1068},{"className":116,"code":1067,"language":118,"meta":8,"style":8},"ping 1.1.1.1\nping google.com\n",[1069],{"type":20,"tag":45,"props":1070,"children":1071},{"__ignoreMap":8},[1072,1086],{"type":20,"tag":124,"props":1073,"children":1074},{"class":126,"line":127},[1075,1080],{"type":20,"tag":124,"props":1076,"children":1077},{"style":131},[1078],{"type":25,"value":1079},"ping",{"type":20,"tag":124,"props":1081,"children":1083},{"style":1082},"--shiki-default:#D33682;--shiki-dark:#79B8FF;--shiki-sepia:#AE81FF",[1084],{"type":25,"value":1085}," 1.1.1.1\n",{"type":20,"tag":124,"props":1087,"children":1088},{"class":126,"line":350},[1089,1093],{"type":20,"tag":124,"props":1090,"children":1091},{"style":131},[1092],{"type":25,"value":1079},{"type":20,"tag":124,"props":1094,"children":1095},{"style":333},[1096],{"type":25,"value":1097}," google.com\n",{"type":20,"tag":21,"props":1099,"children":1100},{},[1101],{"type":25,"value":1102},"If you can reach the internet normally, the NAT and DNS configuration are working.",{"type":20,"tag":21,"props":1104,"children":1105},{},[1106],{"type":25,"value":1107},"From now on you can connect using the fixed address:",{"type":20,"tag":114,"props":1109,"children":1111},{"className":116,"code":1110,"language":118,"meta":8,"style":8},"ssh username@192.168.100.10\n",[1112],{"type":20,"tag":45,"props":1113,"children":1114},{"__ignoreMap":8},[1115],{"type":20,"tag":124,"props":1116,"children":1117},{"class":126,"line":127},[1118,1122],{"type":20,"tag":124,"props":1119,"children":1120},{"style":131},[1121],{"type":25,"value":420},{"type":20,"tag":124,"props":1123,"children":1124},{"style":333},[1125],{"type":25,"value":1126}," username@192.168.100.10\n",{"type":20,"tag":21,"props":1128,"children":1129},{},[1130],{"type":25,"value":1131},"without worrying about the IP changing.",{"type":20,"tag":302,"props":1133,"children":1134},{},[],{"type":20,"tag":33,"props":1136,"children":1138},{"id":1137},"configuring-passwordless-login",[1139],{"type":25,"value":1140},"Configuring Passwordless Login",{"type":20,"tag":61,"props":1142,"children":1143},{},[1144],{"type":20,"tag":65,"props":1145,"children":1146},{},[1147],{"type":25,"value":1148},"Generate an SSH key pair on Windows (skip this if you've already generated one before):",{"type":20,"tag":114,"props":1150,"children":1152},{"className":542,"code":1151,"language":544,"meta":8,"style":8},"ssh-keygen -t rsa -b 4096\n",[1153],{"type":20,"tag":45,"props":1154,"children":1155},{"__ignoreMap":8},[1156],{"type":20,"tag":124,"props":1157,"children":1158},{"class":126,"line":127},[1159],{"type":20,"tag":124,"props":1160,"children":1161},{},[1162],{"type":25,"value":1151},{"type":20,"tag":61,"props":1164,"children":1165},{},[1166],{"type":20,"tag":65,"props":1167,"children":1168},{},[1169],{"type":25,"value":1170},"Copy the public key to Arch Linux:",{"type":20,"tag":114,"props":1172,"children":1174},{"className":116,"code":1173,"language":118,"meta":8,"style":8},"cat ~/.ssh/id_rsa.pub | ssh username@192.168.100.10 \"mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys\"\n",[1175],{"type":20,"tag":45,"props":1176,"children":1177},{"__ignoreMap":8},[1178],{"type":20,"tag":124,"props":1179,"children":1180},{"class":126,"line":127},[1181,1186,1191,1197,1202,1207],{"type":20,"tag":124,"props":1182,"children":1183},{"style":131},[1184],{"type":25,"value":1185},"cat",{"type":20,"tag":124,"props":1187,"children":1188},{"style":333},[1189],{"type":25,"value":1190}," ~/.ssh/id_rsa.pub",{"type":20,"tag":124,"props":1192,"children":1194},{"style":1193},"--shiki-default:#859900;--shiki-dark:#F97583;--shiki-sepia:#F92672",[1195],{"type":25,"value":1196}," |",{"type":20,"tag":124,"props":1198,"children":1199},{"style":131},[1200],{"type":25,"value":1201}," ssh",{"type":20,"tag":124,"props":1203,"children":1204},{"style":333},[1205],{"type":25,"value":1206}," username@192.168.100.10",{"type":20,"tag":124,"props":1208,"children":1209},{"style":333},[1210],{"type":25,"value":1211}," \"mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys\"\n",{"type":20,"tag":302,"props":1213,"children":1214},{},[],{"type":20,"tag":33,"props":1216,"children":1218},{"id":1217},"bonus-installing-basic-tools",[1219],{"type":25,"value":1220},"Bonus: Installing Basic Tools",{"type":20,"tag":21,"props":1222,"children":1223},{},[1224],{"type":25,"value":1225},"A minimal system lacks some common tools, so it's recommended to install them:",{"type":20,"tag":114,"props":1227,"children":1229},{"className":116,"code":1228,"language":118,"meta":8,"style":8},"sudo pacman -S git less vim fish\n",[1230],{"type":20,"tag":45,"props":1231,"children":1232},{"__ignoreMap":8},[1233],{"type":20,"tag":124,"props":1234,"children":1235},{"class":126,"line":127},[1236,1240,1244,1248,1253,1258,1262],{"type":20,"tag":124,"props":1237,"children":1238},{"style":131},[1239],{"type":25,"value":330},{"type":20,"tag":124,"props":1241,"children":1242},{"style":333},[1243],{"type":25,"value":336},{"type":20,"tag":124,"props":1245,"children":1246},{"style":339},[1247],{"type":25,"value":342},{"type":20,"tag":124,"props":1249,"children":1250},{"style":333},[1251],{"type":25,"value":1252}," git",{"type":20,"tag":124,"props":1254,"children":1255},{"style":333},[1256],{"type":25,"value":1257}," less",{"type":20,"tag":124,"props":1259,"children":1260},{"style":333},[1261],{"type":25,"value":788},{"type":20,"tag":124,"props":1263,"children":1264},{"style":333},[1265],{"type":25,"value":1266}," fish\n",{"type":20,"tag":61,"props":1268,"children":1269},{},[1270,1281,1300,1319],{"type":20,"tag":65,"props":1271,"children":1272},{},[1273,1279],{"type":20,"tag":45,"props":1274,"children":1276},{"className":1275},[],[1277],{"type":25,"value":1278},"git",{"type":25,"value":1280},": version control",{"type":20,"tag":65,"props":1282,"children":1283},{},[1284,1290,1292,1298],{"type":20,"tag":45,"props":1285,"children":1287},{"className":1286},[],[1288],{"type":25,"value":1289},"less",{"type":25,"value":1291},": Git pager (otherwise ",{"type":20,"tag":45,"props":1293,"children":1295},{"className":1294},[],[1296],{"type":25,"value":1297},"git log",{"type":25,"value":1299}," will error out)",{"type":20,"tag":65,"props":1301,"children":1302},{},[1303,1309,1311,1317],{"type":20,"tag":45,"props":1304,"children":1306},{"className":1305},[],[1307],{"type":25,"value":1308},"vim",{"type":25,"value":1310}," or ",{"type":20,"tag":45,"props":1312,"children":1314},{"className":1313},[],[1315],{"type":25,"value":1316},"nano",{"type":25,"value":1318},": text editor",{"type":20,"tag":65,"props":1320,"children":1321},{},[1322,1328],{"type":20,"tag":45,"props":1323,"children":1325},{"className":1324},[],[1326],{"type":25,"value":1327},"fish",{"type":25,"value":1329},": a friendly interactive shell (optional)",{"type":20,"tag":302,"props":1331,"children":1332},{},[],{"type":20,"tag":33,"props":1334,"children":1336},{"id":1335},"faq",[1337],{"type":25,"value":1338},"FAQ",{"type":20,"tag":140,"props":1340,"children":1341},{},[1342,1358],{"type":20,"tag":144,"props":1343,"children":1344},{},[1345],{"type":20,"tag":148,"props":1346,"children":1347},{},[1348,1353],{"type":20,"tag":152,"props":1349,"children":1350},{},[1351],{"type":25,"value":1352},"Problem",{"type":20,"tag":152,"props":1354,"children":1355},{},[1356],{"type":25,"value":1357},"Solution",{"type":20,"tag":163,"props":1359,"children":1360},{},[1361,1377,1393,1430,1470],{"type":20,"tag":148,"props":1362,"children":1363},{},[1364,1372],{"type":20,"tag":170,"props":1365,"children":1366},{},[1367],{"type":20,"tag":69,"props":1368,"children":1369},{},[1370],{"type":25,"value":1371},"Still boots into the installer after reboot",{"type":20,"tag":170,"props":1373,"children":1374},{},[1375],{"type":25,"value":1376},"Remove the ISO image from the VM",{"type":20,"tag":148,"props":1378,"children":1379},{},[1380,1388],{"type":20,"tag":170,"props":1381,"children":1382},{},[1383],{"type":20,"tag":69,"props":1384,"children":1385},{},[1386],{"type":25,"value":1387},"Doesn't boot into the system after reboot",{"type":20,"tag":170,"props":1389,"children":1390},{},[1391],{"type":25,"value":1392},"Move the disk to the first position in the boot order",{"type":20,"tag":148,"props":1394,"children":1395},{},[1396,1404],{"type":20,"tag":170,"props":1397,"children":1398},{},[1399],{"type":20,"tag":69,"props":1400,"children":1401},{},[1402],{"type":25,"value":1403},"Static IP not taking effect",{"type":20,"tag":170,"props":1405,"children":1406},{},[1407,1409,1415,1417,1423,1425],{"type":25,"value":1408},"Check for conflicting ",{"type":20,"tag":45,"props":1410,"children":1412},{"className":1411},[],[1413],{"type":25,"value":1414},".network",{"type":25,"value":1416}," files (e.g. files prefixed with ",{"type":20,"tag":45,"props":1418,"children":1420},{"className":1419},[],[1421],{"type":25,"value":1422},"10-",{"type":25,"value":1424}," have higher priority); remove the conflicting file and restart ",{"type":20,"tag":45,"props":1426,"children":1428},{"className":1427},[],[1429],{"type":25,"value":636},{"type":20,"tag":148,"props":1431,"children":1432},{},[1433,1452],{"type":20,"tag":170,"props":1434,"children":1435},{},[1436],{"type":20,"tag":69,"props":1437,"children":1438},{},[1439,1444,1446],{"type":20,"tag":45,"props":1440,"children":1442},{"className":1441},[],[1443],{"type":25,"value":1297},{"type":25,"value":1445}," errors with ",{"type":20,"tag":45,"props":1447,"children":1449},{"className":1448},[],[1450],{"type":25,"value":1451},"cannot run less",{"type":20,"tag":170,"props":1453,"children":1454},{},[1455,1457,1462,1464],{"type":25,"value":1456},"Install ",{"type":20,"tag":45,"props":1458,"children":1460},{"className":1459},[],[1461],{"type":25,"value":1289},{"type":25,"value":1463},": ",{"type":20,"tag":45,"props":1465,"children":1467},{"className":1466},[],[1468],{"type":25,"value":1469},"sudo pacman -S less",{"type":20,"tag":148,"props":1471,"children":1472},{},[1473,1489],{"type":20,"tag":170,"props":1474,"children":1475},{},[1476],{"type":20,"tag":69,"props":1477,"children":1478},{},[1479,1481,1487],{"type":25,"value":1480},"No network but ",{"type":20,"tag":45,"props":1482,"children":1484},{"className":1483},[],[1485],{"type":25,"value":1486},"ip a",{"type":25,"value":1488}," shows an IP",{"type":20,"tag":170,"props":1490,"children":1491},{},[1492,1494,1500],{"type":25,"value":1493},"Check the DNS configuration and make sure ",{"type":20,"tag":45,"props":1495,"children":1497},{"className":1496},[],[1498],{"type":25,"value":1499},"systemd-resolved",{"type":25,"value":1501}," is enabled",{"type":20,"tag":1503,"props":1504,"children":1505},"style",{},[1506],{"type":25,"value":1507},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html .sepia .shiki span {color: var(--shiki-sepia);background: var(--shiki-sepia-bg);font-style: var(--shiki-sepia-font-style);font-weight: var(--shiki-sepia-font-weight);text-decoration: var(--shiki-sepia-text-decoration);}html.sepia .shiki span {color: var(--shiki-sepia);background: var(--shiki-sepia-bg);font-style: var(--shiki-sepia-font-style);font-weight: var(--shiki-sepia-font-weight);text-decoration: var(--shiki-sepia-text-decoration);}",{"title":8,"searchDepth":350,"depth":350,"links":1509},[1510,1513,1514,1515,1516,1524,1525,1526],{"id":35,"depth":350,"text":38,"children":1511},[1512],{"id":56,"depth":471,"text":59},{"id":307,"depth":350,"text":310},{"id":436,"depth":350,"text":439},{"id":526,"depth":350,"text":529},{"id":622,"depth":350,"text":625,"children":1517},[1518,1519,1520,1521,1522,1523],{"id":649,"depth":471,"text":652},{"id":698,"depth":471,"text":701},{"id":766,"depth":471,"text":769},{"id":944,"depth":471,"text":947},{"id":1026,"depth":471,"text":1029},{"id":1061,"depth":471,"text":1064},{"id":1137,"depth":350,"text":1140},{"id":1217,"depth":350,"text":1220},{"id":1335,"depth":350,"text":1338},"markdown","content:blog:971.hyperv-install-arch.md","content","blog/971.hyperv-install-arch.md","blog/971.hyperv-install-arch","md",{"_path":1534,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":1535,"description":1536,"date":1537,"tags":1538,"excerpt":1541,"body":1547,"_type":1527,"_id":2320,"_source":1529,"_file":2321,"_stem":2322,"_extension":1532},"/blog/hyperv-debian-network","Installing Debian on Hyper-V and Configuring Networking: An Alternative to WSL2","A series of issues started when I tried to upgrade my Ubuntu 20 WSL2 installation.","2026-06-09 23:51",[13,1539,1540,15],"debian","wsl",{"type":17,"children":1542},[1543],{"type":20,"tag":21,"props":1544,"children":1545},{},[1546],{"type":25,"value":1536},{"type":17,"children":1548,"toc":2311},[1549,1553,1558,1578,1592,1610,1622,1641,1646,1651,1657,1662,1673,1678,1691,1696,1700,1705,1750,1755,1772,1777,1796,1801,1805,1809,1845,1849,1862,1867,1875,1880,1884,1889,1894,1928,1933,1960,1966,1971,1988,1993,2024,2029,2053,2058,2072,2077,2124,2129,2156,2161,2178,2183,2197,2202,2230,2235,2240,2257,2262,2268,2293,2299,2307],{"type":20,"tag":21,"props":1550,"children":1551},{},[1552],{"type":25,"value":1536},{"type":20,"tag":21,"props":1554,"children":1555},{},[1556],{"type":25,"value":1557},"After removing my last WSL distribution, I found that installing a new Linux distribution would get stuck and never finish.",{"type":20,"tag":21,"props":1559,"children":1560},{},[1561,1563,1568,1570,1576],{"type":25,"value":1562},"Installing a WSL distribution depends on the ",{"type":20,"tag":69,"props":1564,"children":1565},{},[1566],{"type":25,"value":1567},"VirtualMachinePlatform",{"type":25,"value":1569}," Windows feature. Press ",{"type":20,"tag":45,"props":1571,"children":1573},{"className":1572},[],[1574],{"type":25,"value":1575},"Win + R",{"type":25,"value":1577},", type:",{"type":20,"tag":114,"props":1579,"children":1581},{"className":447,"code":1580,"language":25,"meta":8,"style":8},"optionalfeatures\n",[1582],{"type":20,"tag":45,"props":1583,"children":1584},{"__ignoreMap":8},[1585],{"type":20,"tag":124,"props":1586,"children":1587},{"class":126,"line":127},[1588],{"type":20,"tag":124,"props":1589,"children":1590},{},[1591],{"type":25,"value":1580},{"type":20,"tag":21,"props":1593,"children":1594},{},[1595,1597,1602,1604,1608],{"type":25,"value":1596},"and open ",{"type":20,"tag":69,"props":1598,"children":1599},{},[1600],{"type":25,"value":1601},"Turn Windows features on or off",{"type":25,"value":1603},". Make sure ",{"type":20,"tag":69,"props":1605,"children":1606},{},[1607],{"type":25,"value":1567},{"type":25,"value":1609}," is enabled.",{"type":20,"tag":21,"props":1611,"children":1612},{},[1613,1615,1620],{"type":25,"value":1614},"However, on my machine, the Windows feature installation itself would also get stuck after clicking ",{"type":20,"tag":69,"props":1616,"children":1617},{},[1618],{"type":25,"value":1619},"OK",{"type":25,"value":1621},", for the same reason as before.",{"type":20,"tag":21,"props":1623,"children":1624},{},[1625,1627,1632,1634,1639],{"type":25,"value":1626},"After some investigation, I found that ",{"type":20,"tag":69,"props":1628,"children":1629},{},[1630],{"type":25,"value":1631},"VBS (Virtualization-Based Security)",{"type":25,"value":1633}," was running on the system. In theory, disabling ",{"type":20,"tag":69,"props":1635,"children":1636},{},[1637],{"type":25,"value":1638},"Memory Integrity",{"type":25,"value":1640}," should also disable VBS. However, on my Windows 11 24H2 installation, VBS remained enabled even after Memory Integrity was turned off.",{"type":20,"tag":21,"props":1642,"children":1643},{},[1644],{"type":25,"value":1645},"Some guides suggest disabling CPU virtualization (Intel VT-x / AMD SVM) in the BIOS. Unfortunately, my motherboard BIOS does not provide such an option, so I could not try that approach.",{"type":20,"tag":21,"props":1647,"children":1648},{},[1649],{"type":25,"value":1650},"As a result, I decided to run a Linux virtual machine directly in Hyper-V instead of using WSL.",{"type":20,"tag":33,"props":1652,"children":1654},{"id":1653},"installing-debian",[1655],{"type":25,"value":1656},"Installing Debian",{"type":20,"tag":21,"props":1658,"children":1659},{},[1660],{"type":25,"value":1661},"I chose the Debian Netinst image. The ISO is around 700 MB and has relatively low resource usage, making it suitable as a development server.",{"type":20,"tag":21,"props":1663,"children":1664},{},[1665,1667,1672],{"type":25,"value":1666},"During installation, simply select ",{"type":20,"tag":69,"props":1668,"children":1669},{},[1670],{"type":25,"value":1671},"Graphical Install",{"type":25,"value":646},{"type":20,"tag":21,"props":1674,"children":1675},{},[1676],{"type":25,"value":1677},"When you reach the software selection screen, I recommend disabling all desktop environments and selecting only:",{"type":20,"tag":61,"props":1679,"children":1680},{},[1681,1686],{"type":20,"tag":65,"props":1682,"children":1683},{},[1684],{"type":25,"value":1685},"SSH Server",{"type":20,"tag":65,"props":1687,"children":1688},{},[1689],{"type":25,"value":1690},"Standard System Utilities",{"type":20,"tag":21,"props":1692,"children":1693},{},[1694],{"type":25,"value":1695},"This results in a lightweight command-line-only server with lower memory usage.",{"type":20,"tag":33,"props":1697,"children":1698},{"id":307},[1699],{"type":25,"value":310},{"type":20,"tag":21,"props":1701,"children":1702},{},[1703],{"type":25,"value":1704},"After Debian is installed, install and start OpenSSH:",{"type":20,"tag":114,"props":1706,"children":1708},{"className":116,"code":1707,"language":118,"meta":8,"style":8},"sudo apt update\nsudo apt install openssh-server\n",[1709],{"type":20,"tag":45,"props":1710,"children":1711},{"__ignoreMap":8},[1712,1729],{"type":20,"tag":124,"props":1713,"children":1714},{"class":126,"line":127},[1715,1719,1724],{"type":20,"tag":124,"props":1716,"children":1717},{"style":131},[1718],{"type":25,"value":330},{"type":20,"tag":124,"props":1720,"children":1721},{"style":333},[1722],{"type":25,"value":1723}," apt",{"type":20,"tag":124,"props":1725,"children":1726},{"style":333},[1727],{"type":25,"value":1728}," update\n",{"type":20,"tag":124,"props":1730,"children":1731},{"class":126,"line":350},[1732,1736,1740,1745],{"type":20,"tag":124,"props":1733,"children":1734},{"style":131},[1735],{"type":25,"value":330},{"type":20,"tag":124,"props":1737,"children":1738},{"style":333},[1739],{"type":25,"value":1723},{"type":20,"tag":124,"props":1741,"children":1742},{"style":333},[1743],{"type":25,"value":1744}," install",{"type":20,"tag":124,"props":1746,"children":1747},{"style":333},[1748],{"type":25,"value":1749}," openssh-server\n",{"type":20,"tag":21,"props":1751,"children":1752},{},[1753],{"type":25,"value":1754},"Check the VM's IP address:",{"type":20,"tag":114,"props":1756,"children":1757},{"className":116,"code":383,"language":118,"meta":8,"style":8},[1758],{"type":20,"tag":45,"props":1759,"children":1760},{"__ignoreMap":8},[1761],{"type":20,"tag":124,"props":1762,"children":1763},{"class":126,"line":127},[1764,1768],{"type":20,"tag":124,"props":1765,"children":1766},{"style":131},[1767],{"type":25,"value":395},{"type":20,"tag":124,"props":1769,"children":1770},{"style":333},[1771],{"type":25,"value":400},{"type":20,"tag":21,"props":1773,"children":1774},{},[1775],{"type":25,"value":1776},"Then connect from Windows Terminal:",{"type":20,"tag":114,"props":1778,"children":1780},{"className":116,"code":1779,"language":118,"meta":8,"style":8},"ssh username@ip-address\n",[1781],{"type":20,"tag":45,"props":1782,"children":1783},{"__ignoreMap":8},[1784],{"type":20,"tag":124,"props":1785,"children":1786},{"class":126,"line":127},[1787,1791],{"type":20,"tag":124,"props":1788,"children":1789},{"style":131},[1790],{"type":25,"value":420},{"type":20,"tag":124,"props":1792,"children":1793},{"style":333},[1794],{"type":25,"value":1795}," username@ip-address\n",{"type":20,"tag":21,"props":1797,"children":1798},{},[1799],{"type":25,"value":1800},"This works, but if you use Hyper-V's default networking, the VM's IP address may change after a reboot. To avoid that, you can configure a static IP address.",{"type":20,"tag":33,"props":1802,"children":1803},{"id":436},[1804],{"type":25,"value":439},{"type":20,"tag":21,"props":1806,"children":1807},{},[1808],{"type":25,"value":444},{"type":20,"tag":114,"props":1810,"children":1812},{"className":447,"code":1811,"language":25,"meta":8,"style":8},"Hyper-V Manager\n→ Virtual Switch Manager\n→ New Virtual Network Switch\n→ Internal\n",[1813],{"type":20,"tag":45,"props":1814,"children":1815},{"__ignoreMap":8},[1816,1823,1830,1838],{"type":20,"tag":124,"props":1817,"children":1818},{"class":126,"line":127},[1819],{"type":20,"tag":124,"props":1820,"children":1821},{},[1822],{"type":25,"value":460},{"type":20,"tag":124,"props":1824,"children":1825},{"class":126,"line":350},[1826],{"type":20,"tag":124,"props":1827,"children":1828},{},[1829],{"type":25,"value":468},{"type":20,"tag":124,"props":1831,"children":1832},{"class":126,"line":471},[1833],{"type":20,"tag":124,"props":1834,"children":1835},{},[1836],{"type":25,"value":1837},"→ New Virtual Network Switch\n",{"type":20,"tag":124,"props":1839,"children":1840},{"class":126,"line":480},[1841],{"type":20,"tag":124,"props":1842,"children":1843},{},[1844],{"type":25,"value":486},{"type":20,"tag":21,"props":1846,"children":1847},{},[1848],{"type":25,"value":491},{"type":20,"tag":114,"props":1850,"children":1851},{"className":447,"code":494,"language":25,"meta":8,"style":8},[1852],{"type":20,"tag":45,"props":1853,"children":1854},{"__ignoreMap":8},[1855],{"type":20,"tag":124,"props":1856,"children":1857},{"class":126,"line":127},[1858],{"type":20,"tag":124,"props":1859,"children":1860},{},[1861],{"type":25,"value":494},{"type":20,"tag":21,"props":1863,"children":1864},{},[1865],{"type":25,"value":1866},"After creating the switch, open the VM settings and attach the virtual network adapter to the new switch.",{"type":20,"tag":21,"props":1868,"children":1869},{},[1870],{"type":20,"tag":69,"props":1871,"children":1872},{},[1873],{"type":25,"value":1874},"Note:",{"type":20,"tag":21,"props":1876,"children":1877},{},[1878],{"type":25,"value":1879},"Once you switch the network adapter, the existing SSH connection will immediately stop working. It's recommended to complete the Windows networking configuration first and switch the VM network afterward.",{"type":20,"tag":33,"props":1881,"children":1882},{"id":526},[1883],{"type":25,"value":529},{"type":20,"tag":21,"props":1885,"children":1886},{},[1887],{"type":25,"value":1888},"Open PowerShell as Administrator.",{"type":20,"tag":21,"props":1890,"children":1891},{},[1892],{"type":25,"value":1893},"Assign a gateway IP address to the Hyper-V virtual adapter:",{"type":20,"tag":114,"props":1895,"children":1896},{"className":542,"code":543,"language":544,"meta":8,"style":8},[1897],{"type":20,"tag":45,"props":1898,"children":1899},{"__ignoreMap":8},[1900,1907,1914,1921],{"type":20,"tag":124,"props":1901,"children":1902},{"class":126,"line":127},[1903],{"type":20,"tag":124,"props":1904,"children":1905},{},[1906],{"type":25,"value":556},{"type":20,"tag":124,"props":1908,"children":1909},{"class":126,"line":350},[1910],{"type":20,"tag":124,"props":1911,"children":1912},{},[1913],{"type":25,"value":564},{"type":20,"tag":124,"props":1915,"children":1916},{"class":126,"line":471},[1917],{"type":20,"tag":124,"props":1918,"children":1919},{},[1920],{"type":25,"value":572},{"type":20,"tag":124,"props":1922,"children":1923},{"class":126,"line":480},[1924],{"type":20,"tag":124,"props":1925,"children":1926},{},[1927],{"type":25,"value":580},{"type":20,"tag":21,"props":1929,"children":1930},{},[1931],{"type":25,"value":1932},"Create a NAT network:",{"type":20,"tag":114,"props":1934,"children":1935},{"className":542,"code":588,"language":544,"meta":8,"style":8},[1936],{"type":20,"tag":45,"props":1937,"children":1938},{"__ignoreMap":8},[1939,1946,1953],{"type":20,"tag":124,"props":1940,"children":1941},{"class":126,"line":127},[1942],{"type":20,"tag":124,"props":1943,"children":1944},{},[1945],{"type":25,"value":600},{"type":20,"tag":124,"props":1947,"children":1948},{"class":126,"line":350},[1949],{"type":20,"tag":124,"props":1950,"children":1951},{},[1952],{"type":25,"value":608},{"type":20,"tag":124,"props":1954,"children":1955},{"class":126,"line":471},[1956],{"type":20,"tag":124,"props":1957,"children":1958},{},[1959],{"type":25,"value":616},{"type":20,"tag":33,"props":1961,"children":1963},{"id":1962},"configuring-a-static-ip-address-in-debian",[1964],{"type":25,"value":1965},"Configuring a Static IP Address in Debian",{"type":20,"tag":21,"props":1967,"children":1968},{},[1969],{"type":25,"value":1970},"Check the network interface name:",{"type":20,"tag":114,"props":1972,"children":1973},{"className":116,"code":383,"language":118,"meta":8,"style":8},[1974],{"type":20,"tag":45,"props":1975,"children":1976},{"__ignoreMap":8},[1977],{"type":20,"tag":124,"props":1978,"children":1979},{"class":126,"line":127},[1980,1984],{"type":20,"tag":124,"props":1981,"children":1982},{"style":131},[1983],{"type":25,"value":395},{"type":20,"tag":124,"props":1985,"children":1986},{"style":333},[1987],{"type":25,"value":400},{"type":20,"tag":21,"props":1989,"children":1990},{},[1991],{"type":25,"value":1992},"Common interface names include:",{"type":20,"tag":114,"props":1994,"children":1996},{"className":447,"code":1995,"language":25,"meta":8,"style":8},"eth0\nens160\nenp0s3\n",[1997],{"type":20,"tag":45,"props":1998,"children":1999},{"__ignoreMap":8},[2000,2008,2016],{"type":20,"tag":124,"props":2001,"children":2002},{"class":126,"line":127},[2003],{"type":20,"tag":124,"props":2004,"children":2005},{},[2006],{"type":25,"value":2007},"eth0\n",{"type":20,"tag":124,"props":2009,"children":2010},{"class":126,"line":350},[2011],{"type":20,"tag":124,"props":2012,"children":2013},{},[2014],{"type":25,"value":2015},"ens160\n",{"type":20,"tag":124,"props":2017,"children":2018},{"class":126,"line":471},[2019],{"type":20,"tag":124,"props":2020,"children":2021},{},[2022],{"type":25,"value":2023},"enp0s3\n",{"type":20,"tag":21,"props":2025,"children":2026},{},[2027],{"type":25,"value":2028},"Edit the network configuration:",{"type":20,"tag":114,"props":2030,"children":2032},{"className":116,"code":2031,"language":118,"meta":8,"style":8},"sudo nano /etc/network/interfaces\n",[2033],{"type":20,"tag":45,"props":2034,"children":2035},{"__ignoreMap":8},[2036],{"type":20,"tag":124,"props":2037,"children":2038},{"class":126,"line":127},[2039,2043,2048],{"type":20,"tag":124,"props":2040,"children":2041},{"style":131},[2042],{"type":25,"value":330},{"type":20,"tag":124,"props":2044,"children":2045},{"style":333},[2046],{"type":25,"value":2047}," nano",{"type":20,"tag":124,"props":2049,"children":2050},{"style":333},[2051],{"type":25,"value":2052}," /etc/network/interfaces\n",{"type":20,"tag":21,"props":2054,"children":2055},{},[2056],{"type":25,"value":2057},"Change:",{"type":20,"tag":114,"props":2059,"children":2061},{"className":447,"code":2060,"language":25,"meta":8,"style":8},"iface eth0 inet dhcp\n",[2062],{"type":20,"tag":45,"props":2063,"children":2064},{"__ignoreMap":8},[2065],{"type":20,"tag":124,"props":2066,"children":2067},{"class":126,"line":127},[2068],{"type":20,"tag":124,"props":2069,"children":2070},{},[2071],{"type":25,"value":2060},{"type":20,"tag":21,"props":2073,"children":2074},{},[2075],{"type":25,"value":2076},"to:",{"type":20,"tag":114,"props":2078,"children":2080},{"className":447,"code":2079,"language":25,"meta":8,"style":8},"iface eth0 inet static\n  address 192.168.100.10\n  netmask 255.255.255.0\n  gateway 192.168.100.1\n  dns-nameservers 1.1.1.1 8.8.8.8\n",[2081],{"type":20,"tag":45,"props":2082,"children":2083},{"__ignoreMap":8},[2084,2092,2100,2108,2116],{"type":20,"tag":124,"props":2085,"children":2086},{"class":126,"line":127},[2087],{"type":20,"tag":124,"props":2088,"children":2089},{},[2090],{"type":25,"value":2091},"iface eth0 inet static\n",{"type":20,"tag":124,"props":2093,"children":2094},{"class":126,"line":350},[2095],{"type":20,"tag":124,"props":2096,"children":2097},{},[2098],{"type":25,"value":2099},"  address 192.168.100.10\n",{"type":20,"tag":124,"props":2101,"children":2102},{"class":126,"line":471},[2103],{"type":20,"tag":124,"props":2104,"children":2105},{},[2106],{"type":25,"value":2107},"  netmask 255.255.255.0\n",{"type":20,"tag":124,"props":2109,"children":2110},{"class":126,"line":480},[2111],{"type":20,"tag":124,"props":2112,"children":2113},{},[2114],{"type":25,"value":2115},"  gateway 192.168.100.1\n",{"type":20,"tag":124,"props":2117,"children":2118},{"class":126,"line":843},[2119],{"type":20,"tag":124,"props":2120,"children":2121},{},[2122],{"type":25,"value":2123},"  dns-nameservers 1.1.1.1 8.8.8.8\n",{"type":20,"tag":21,"props":2125,"children":2126},{},[2127],{"type":25,"value":2128},"Restart networking:",{"type":20,"tag":114,"props":2130,"children":2132},{"className":116,"code":2131,"language":118,"meta":8,"style":8},"sudo systemctl restart networking\n",[2133],{"type":20,"tag":45,"props":2134,"children":2135},{"__ignoreMap":8},[2136],{"type":20,"tag":124,"props":2137,"children":2138},{"class":126,"line":127},[2139,2143,2147,2151],{"type":20,"tag":124,"props":2140,"children":2141},{"style":131},[2142],{"type":25,"value":330},{"type":20,"tag":124,"props":2144,"children":2145},{"style":333},[2146],{"type":25,"value":360},{"type":20,"tag":124,"props":2148,"children":2149},{"style":333},[2150],{"type":25,"value":1018},{"type":20,"tag":124,"props":2152,"children":2153},{"style":333},[2154],{"type":25,"value":2155}," networking\n",{"type":20,"tag":21,"props":2157,"children":2158},{},[2159],{"type":25,"value":2160},"Verify the IP address:",{"type":20,"tag":114,"props":2162,"children":2163},{"className":116,"code":383,"language":118,"meta":8,"style":8},[2164],{"type":20,"tag":45,"props":2165,"children":2166},{"__ignoreMap":8},[2167],{"type":20,"tag":124,"props":2168,"children":2169},{"class":126,"line":127},[2170,2174],{"type":20,"tag":124,"props":2171,"children":2172},{"style":131},[2173],{"type":25,"value":395},{"type":20,"tag":124,"props":2175,"children":2176},{"style":333},[2177],{"type":25,"value":400},{"type":20,"tag":21,"props":2179,"children":2180},{},[2181],{"type":25,"value":2182},"You should now see:",{"type":20,"tag":114,"props":2184,"children":2186},{"className":447,"code":2185,"language":25,"meta":8,"style":8},"192.168.100.10\n",[2187],{"type":20,"tag":45,"props":2188,"children":2189},{"__ignoreMap":8},[2190],{"type":20,"tag":124,"props":2191,"children":2192},{"class":126,"line":127},[2193],{"type":20,"tag":124,"props":2194,"children":2195},{},[2196],{"type":25,"value":2185},{"type":20,"tag":21,"props":2198,"children":2199},{},[2200],{"type":25,"value":2201},"Test Internet connectivity:",{"type":20,"tag":114,"props":2203,"children":2204},{"className":116,"code":1067,"language":118,"meta":8,"style":8},[2205],{"type":20,"tag":45,"props":2206,"children":2207},{"__ignoreMap":8},[2208,2219],{"type":20,"tag":124,"props":2209,"children":2210},{"class":126,"line":127},[2211,2215],{"type":20,"tag":124,"props":2212,"children":2213},{"style":131},[2214],{"type":25,"value":1079},{"type":20,"tag":124,"props":2216,"children":2217},{"style":1082},[2218],{"type":25,"value":1085},{"type":20,"tag":124,"props":2220,"children":2221},{"class":126,"line":350},[2222,2226],{"type":20,"tag":124,"props":2223,"children":2224},{"style":131},[2225],{"type":25,"value":1079},{"type":20,"tag":124,"props":2227,"children":2228},{"style":333},[2229],{"type":25,"value":1097},{"type":20,"tag":21,"props":2231,"children":2232},{},[2233],{"type":25,"value":2234},"If both commands work, NAT and DNS are configured correctly.",{"type":20,"tag":21,"props":2236,"children":2237},{},[2238],{"type":25,"value":2239},"You can now always connect using:",{"type":20,"tag":114,"props":2241,"children":2242},{"className":116,"code":1110,"language":118,"meta":8,"style":8},[2243],{"type":20,"tag":45,"props":2244,"children":2245},{"__ignoreMap":8},[2246],{"type":20,"tag":124,"props":2247,"children":2248},{"class":126,"line":127},[2249,2253],{"type":20,"tag":124,"props":2250,"children":2251},{"style":131},[2252],{"type":25,"value":420},{"type":20,"tag":124,"props":2254,"children":2255},{"style":333},[2256],{"type":25,"value":1126},{"type":20,"tag":21,"props":2258,"children":2259},{},[2260],{"type":25,"value":2261},"without worrying about the VM's IP address changing after a reboot.",{"type":20,"tag":33,"props":2263,"children":2265},{"id":2264},"configure-passwordless-ssh-connection",[2266],{"type":25,"value":2267},"Configure Passwordless SSH Connection",{"type":20,"tag":61,"props":2269,"children":2270},{},[2271,2282],{"type":20,"tag":65,"props":2272,"children":2273},{},[2274,2276],{"type":25,"value":2275},"Generate an SSH key pair on Windows. If you have generated one before, you can skip this step: ",{"type":20,"tag":45,"props":2277,"children":2279},{"className":2278},[],[2280],{"type":25,"value":2281},"ssh-keygen -t rsa -b 4096",{"type":20,"tag":65,"props":2283,"children":2284},{},[2285,2287],{"type":25,"value":2286},"Copy the public key to Debian: ",{"type":20,"tag":45,"props":2288,"children":2290},{"className":2289},[],[2291],{"type":25,"value":2292},"cat ~/.ssh/id_rsa.pub | ssh username@server_ip \"mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys\"",{"type":20,"tag":33,"props":2294,"children":2296},{"id":2295},"quickly-open-projects-in-vs-code",[2297],{"type":25,"value":2298},"Quickly Open Projects in VS Code",{"type":20,"tag":61,"props":2300,"children":2301},{},[2302],{"type":20,"tag":65,"props":2303,"children":2304},{},[2305],{"type":25,"value":2306},"VS Code allows you to connect to your project via the \"Connect to Host...\" option in the bottom left corner. If the project does not appear in your \"Open Recent\" history and you want to open it quickly, you can install the \"Project Manager\" extension to save and manage your projects.",{"type":20,"tag":1503,"props":2308,"children":2309},{},[2310],{"type":25,"value":1507},{"title":8,"searchDepth":350,"depth":350,"links":2312},[2313,2314,2315,2316,2317,2318,2319],{"id":1653,"depth":350,"text":1656},{"id":307,"depth":350,"text":310},{"id":436,"depth":350,"text":439},{"id":526,"depth":350,"text":529},{"id":1962,"depth":350,"text":1965},{"id":2264,"depth":350,"text":2267},{"id":2295,"depth":350,"text":2298},"content:blog:972.hyperv-debian-network.md","blog/972.hyperv-debian-network.md","blog/972.hyperv-debian-network",1783843574513]