Nano Server in virtual machine on Linux

%3CLINGO-SUB%20id%3D%22lingo-sub-1665063%22%20slang%3D%22en-US%22%3ENano%20Server%20in%20virtual%20machine%20on%20Linux%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1665063%22%20slang%3D%22en-US%22%3E%3CP%3EHello.%20I%20do%20not%20want%20a%20full%20Windows%20install%20and%20would%20like%20to%20use%20the%20Nano%20Server%20inside%20qemu%20under%20Linux.%20The%202016%20version%20supports%20this%2C%20but%20as%20of%20version%201709%2C%20Nano%20only%20supports%20container%20images%20hosted%20on%20Windows.%20This%20obviously%20defeats%20the%20point%20of%20the%20minimal%20environment.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20was%20interested%20in%20the%20Nano%20Server%20because%20its%20license%20is%20free%20and%20it%20contains%20only%20the%20core%20system%20without%20everything%20I%20don't%20need.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E1)%20Why%20was%20the%20support%20for%20virtual%20machines%20removed%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E2)%20Is%20there%20an%20alternative%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1665063%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EContainers%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESecurity%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1665863%22%20slang%3D%22en-US%22%3ERe%3A%20Nano%20Server%20in%20virtual%20machine%20on%20Linux%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1665863%22%20slang%3D%22en-US%22%3E%3CP%3EThe%20best%20I've%20found%20for%20(2)%20is%20the%202019%20Hyper-V%20image%20but%20this%20is%20still%20pretty%20bloated.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECan%20someone%20tell%20me%20how%20small%20Nano%20should%20actually%20be%20on%20the%20latest%20container%20builds%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1696353%22%20slang%3D%22en-US%22%3ERe%3A%20Nano%20Server%20in%20virtual%20machine%20on%20Linux%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1696353%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F793110%22%20target%3D%22_blank%22%3E%40NanoServer%3C%2FA%3E%26nbsp%3BEvening%2C%20I%20feel%20your%20frustration%20as%20too%20I%20love%20the%20original%20concept%20for%20Nano%20server%20which%20support%20AD%2C%20DHCP%2C%20HYPER-V%2C%20etc.%20The%20new%20server%2020215%20is%202GB%20is%20size%2C%20so%20install%20it%20and%20also%20the%20Feature%20On%20Demand%20(check%20server%20insider%20preview).%20now%20enable%20both%20hyper-v%20and%20container%20also%20optional%20WSL%20yes%20WSL%20runs%20on%20windows%20server%20this%20will%20give%20you%20the%20Linux%20kernel%20on%20server%20core%20so%20once%20you%20have%20the%20Linux%20distro%20you%20want%20installed%20then%20you%20can%20use%20the%20Bash%20shell%20and%20do%20you%20docker%20thing%20on%20that.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMy%20assumption%20is%20if%20you%20install%20Visual%20Studio%20Code%20and%2For%20Docker%20Desktop%20on%20the%20server%20core%20and%20manage%20the%20Linux%20container%20from%20that%20application.%20I%20would%20go%20down%20the%20VSC%20route.%20I'll%20test%20on%20server%20core%20myself%20just%20to%20see%20but%20you%20need%20to%20install%20the%20feature%20on-demand%20(only%20400%20MB%20in%20size)%20this%20will%20give%20you%20access%20to%20file%20explorer%2C%20etc%20on%20the%20server%20to%20make%20life%20easier%20for%20finder%20exe%20files%2C%20etc%20but%20PowerShell%20is%20still%20viable.%20You%20can%20install%20windows%20admin%20centre%20which%20is%20tiny%20on%20the%20server%20core%20also%20then%20use%20that%20to%20manage%20containers.%20The%20size%20should%20be%20about%20approx%204GB%20total%20with%20all%20installed%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EOther%20options%3A%20(1)%20creating%20a%20nano%20server%20vhdx%20file%20using%20the%20nano%20server%20imager%20builder%20and%20attach%20it%20to%20a%20new%20VM%20as%20you%20know%20the%20size%20is%20tiny%20or%20(2)%20download%20the%20windows%20server%20container%20image%20for%20windows%20server%20nano%20(%3CA%20href%3D%22https%3A%2F%2Fhub.docker.com%2F_%2Fmicrosoft-windows-nanoserver%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fhub.docker.com%2F_%2Fmicrosoft-windows-nanoserver%3C%2FA%3E).%20As%20its%20a%20container%20of%20nano%20server%20again%20going%20to%20be%20small%20however%20it's%20a%20container%20so%20you%20need%20to%20learn%20Docker%20commands%20to%20edit%20it%20e.g.%20docker%20inspect%2C%20etc%20to%20use%20on%20PowerShell%20or%20manange%20through%20windows%20admin%20centre.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThat's%20what%20I%20currently%20use%2C%20a%20server%20core%20install%20with%20hyper-v%20and%20containers%20enable%20and%20installed%20the%20container%20image%20which%20I%20manage%20through%20windows%20admin%20centre%20but%20you'll%20need%20to%20add%20the%20container%20extension.%20For%20a%20full%20linux%2C%20you%20need%20to%20enable%20WSL%20on%20server%20core.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHope%20this%20helps%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

Hello. I do not want a full Windows install and would like to use the Nano Server inside qemu under Linux. The 2016 version supports this, but as of version 1709, Nano only supports container images hosted on Windows. This obviously defeats the point of the minimal environment.

 

I was interested in the Nano Server because its license is free and it contains only the core system without everything I don't need.

 

1) Why was the support for virtual machines removed?

 

2) Is there an alternative?

2 Replies

The best I've found for (2) is the 2019 Hyper-V image but this is still pretty bloated.

 

Can someone tell me how small Nano should actually be on the latest container builds?

@NanoServer Evening, I feel your frustration as too I love the original concept for Nano server which support AD, DHCP, HYPER-V, etc. The new server 20215 is 2GB is size, so install it and also the Feature On Demand (check server insider preview). now enable both hyper-v and container also optional WSL yes WSL runs on windows server this will give you the Linux kernel on server core so once you have the Linux distro you want installed then you can use the Bash shell and do you docker thing on that.

 

My assumption is if you install Visual Studio Code and/or Docker Desktop on the server core and manage the Linux container from that application. I would go down the VSC route. I'll test on server core myself just to see but you need to install the feature on-demand (only 400 MB in size) this will give you access to file explorer, etc on the server to make life easier for finder exe files, etc but PowerShell is still viable. You can install windows admin centre which is tiny on the server core also then use that to manage containers. The size should be about approx 4GB total with all installed

 

Other options: (1) creating a nano server vhdx file using the nano server imager builder and attach it to a new VM as you know the size is tiny or (2) download the windows server container image for windows server nano (https://hub.docker.com/_/microsoft-windows-nanoserver). As its a container of nano server again going to be small however it's a container so you need to learn Docker commands to edit it e.g. docker inspect, etc to use on PowerShell or manange through windows admin centre.

 

That's what I currently use, a server core install with hyper-v and containers enable and installed the container image which I manage through windows admin centre but you'll need to add the container extension. For a full linux, you need to enable WSL on server core.

 

Hope this helps