Lucky to take part in the basin teacher's class Windows Nano Server Introduction, felt this basin teacher's technology sharing, so simple to share how to make Windows Nano server process, but also very grateful for the technical sharing of the basin teacher.
1. First download windows_server_technical_preview_2 ISO (nine Uncle Selfless share provided): Link: http://pan.baidu.com/s/1gd8KP5D Password: C0TC
2. Download the translated script: https://gallery.technet.microsoft.com/scriptcenter/Convert-WindowsImageps1-0fe23a8f
3. Download completed windows_server_technical_preview_2, we can mount the ISO first, you can see the ISO with the previous Windows Server is different:
650) this.width=650; "title=" image "style=" border-right-width:0px;background-image:none;border-bottom-width:0px; padding-top:0px;padding-left:0px;margin:0px;padding-right:0px;border-top-width:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M00/6E/6D/wKioL1V8cSOhPW_vAANvjT0sTUc515.jpg "width=" 755 "height=" 583 "/>
650) this.width=650; "title=" image "style=" border-right-width:0px;background-image:none;border-bottom-width:0px; padding-top:0px;padding-left:0px;margin:0px;padding-right:0px;border-top-width:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M01/6E/6D/wKioL1V8cSPibuk0AAEWdwKMj7s828.jpg "width=" 689 "height=" 257 "/>
650) this.width=650; "title=" image "style=" border-right-width:0px;background-image:none;border-bottom-width:0px; padding-top:0px;padding-left:0px;margin:0px;padding-right:0px;border-top-width:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M01/6E/6D/wKioL1V8cSSwnyyHAAHXEIiVmJ0918.jpg "width=" 733 "height=" 243 "/>
See so many cabs, we are also curious about what this is, as I understand it is the same as the Windows Add role features, but is packaged in a cab. If we need to, we'll add the role by calling the appropriate cab package.
Role or feature |
Package file |
Hyper-V Role |
Microsoft-nanoserver-compute-package.cab |
Failover Cluster role |
Microsoft-nanoserver-failovercluster-package.cab |
Nanoserver Host Virtual Machine driver (I prefer to call it Integration Services) |
Microsoft-nanoserver-guest-package.cab |
Storage and NIC Drivers |
Microsoft-nanoserver-oem-drivers-package.cab |
File server roles and other storage components |
Microsoft-nanoserver-storage-package.cab |
From here, we can see that Windows Nano Server can be used as Hyper-V, cluster, extended file server, container container and guest virtual machine throughout the Windows architecture.
4. Let's start making Windows Nano server. Unlock the script first,
650) this.width=650; "title=" image "style=" border-right-width:0px;background-image:none;border-bottom-width:0px; padding-top:0px;padding-left:0px;margin:0px;padding-right:0px;border-top-width:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M02/6E/6D/wKioL1V8cSTyUooKAAIBEF5wgFw688.jpg "width=" 439 "height=" 662 "/>
5. Run the script
The script format is as follows:. \convert-windowsimage.ps1-sourcepath <path to wim>-vhd <path to new VHD File>–vhdformat Vhd-editio N 1
650) this.width=650; "title=" image "style=" border-right-width:0px;background-image:none;border-bottom-width:0px; padding-top:0px;padding-left:0px;padding-right:0px;border-top-width:0px; "border=" 0 "alt=" image "src=" http:// S3.51cto.com/wyfs02/m02/6e/71/wkiom1v8b3qcr8t5aanpxxrrk_c284.jpg "width=" "height=" 381 "/>
PS: This production process is probably not more than 5 minutes, the entire VHD is about 483MB.
650) this.width=650; "title=" image "style=" border-right-width:0px;background-image:none;border-bottom-width:0px; padding-top:0px;padding-left:0px;margin:0px;padding-right:0px;border-top-width:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M00/6E/71/wKiom1V8b3vAjYvoAABVCd-0Rf4213.jpg "width=" 594 "height=" 111 "/>
6. Run the VHD in Windows Server TP2 (currently only supported in the TP2 environment), and of course it needs to be configured to run as a VM.
1) need to create a directory name on disk Nanoserver
650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M02/6E/6D/wKioL1V8cSbBarPOAAJbZz4vvuE489.jpg "height=" 362 "/>
2) Copy the CAB from Windows Server TP2 ISO into the Nanoserver
650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M01/6E/71/wKiom1V8b3ygTAi6AAEtYaDZWjI941.jpg "height=" 201 "/>
3) Create a file with the directory named MountDir
650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M00/6E/71/wKiom1V8b3yiKdHUAAEeajYS5pQ745.jpg "height="/>
4) mount the NANO.VHD mount image to the MountDir directory
Dism/mount-image/imagefile:c:\nano.vhd/index:1/mountdir:.\mountdir
650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M02/6E/71/wKiom1V8b32RpJcPAADkc9ZdLZo510.jpg "height=" 104 "/>
5) load the Microsoft-nanoserver-guest-package.cab into the Nanoserver (the basin teacher said that the nano as a VM to load this cab, and later I tried not to load the CAB package to start the VM, has always been the boot interface)
Dism/add-package/packagepath:.\packages\microsoft-nanoserver-guest-package.cab/image:.\mountdir
650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M00/6E/6D/wKioL1V8cSexY-t0AAFNYyUZBUM224.jpg "height=" 127 "/>
6) This step is to display the IP information of the Nanoserver (because the IP information is displayed only the first time the Nanoserver is started) and two files are created, Setupcomplete.cmd and Startup.cmd, respectively.
The Setupcomplete.cmd script is as follows:
netsh advfirewall set domainprofile state off
netsh advfirewall set privateprofile state off
netsh advfirewall set publicprofile state off
netsh advfirewall set currentprofile state off
Ipconfig
Schtasks/create/tn "Start"/tr c:\windows\system32\startup.cmd/sc onstart/ru "System"
The Startup.cmd script is as follows:
Ping 192.168.10.101-n 7
Ipconfig
650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M02/6E/6D/wKioL1V8cSiQKsV6AAGaNMmBIcA073.jpg "height=" 224 "/>
Create a script folder for Setupcomplete.cmd first
Md. \mountdir\windows\setup\scripts
650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M00/6E/6D/wKioL1V8cSjwsHB9AACheaHNckc520.jpg "height=" 121 "/>
Copy two scripts into Nanoserver
Copy. \setupcomplete.cmd. \mountdir\windows\setup\scripts
Copy. \startup.cmd. \mountdir\windows\system32
650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M00/6E/71/wKiom1V8b37DP11rAAB1KstFsn4406.jpg "height="/>
7) Uninstalling the Nanoserver image
Dism/unmount-image/mountdir:.\mountdir/commit
650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M01/6E/71/wKiom1V8b3_RcG-OAADOJUKBDVs217.jpg "height=" 104 "/>
7. Create a new virtual machine, mount the NANO.VHD, start the virtual machine
650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M01/6E/6E/wKioL1V8cSnCoxbsAAIzCJeKJAA762.jpg "height=" 585 "/>
8. Connect via PowerShell Nanoserver
The script is as follows:
$IP = "Nano Server IP Address"
$user = "$ip \administrator"
Enter-pssession-computername $ip-credential $user
Administrator initial password is empty
650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M00/6E/6E/wKioL1V8cSqxLdTUAAB45bY7zcY613.jpg "height="/>
You can see the Nanoserver connection session
650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M00/6E/71/wKiom1V8b4DifEvbAAE_1yyBkBg784.jpg "height=" 238 "/>
Nanoserver Overview and configuration specific details can be accessed: https://technet.microsoft.com/en-gb/library/mt126167.aspx
Nanoserver startup script configuration can be accessed by: http://blogs.technet.com/b/nanoserver/archive/2015/05/19/ How-to-display-ipconfig-on-nano-server-every-time-it-boots.aspx
If there is anything missing in this article or need to add anything, please advise, thank you.
This article from "Gs_hao" blog, declined reprint!
Windows Nano Server vhd file authoring