- Getting Started with Nano Server
- Charbel Nemnom
- 270字
- 2021-07-02 21:11:09
Injecting unattend.xml into VHD(X)
After creating the unattend.xml file which includes your customized settings, we need to inject it into the image.
Injecting the unattend.xml into a VHD(X) basically involves mounting the image first.
There are four steps involved to inject the unattend.xml file, as follow:
- Before we inject the unattend.xml file, we should create a mount directory.
From an elevated command prompt, run the following command:
dism /Mount-Image /ImageFile:.\NanoServer.vhdx /Index:1 /MountDir:.\mountdir
Please update the extension of the image VHD(X) according to the image created earlier.
- Apply the unattend.xml file that you already created and customized by running the following command:
dism /image:.\mountdir /Apply-Unattend:.\unattend.xml
- Create a Panther folder under C:\Windows\ (this folder is used by Windows systems for storing files during setup). Copy the unattend.xml file to it using the following two commands:
md .\mountdir\windows\panther
copy .\unattend.xml .\mountdir\windows\panther
What this does is basically, when the image is booting, the offline servicing section of the unattend.xml file will execute without any reboot. However, with oobeSystem and specialize, the content of those two sections of the unattend.xml will execute on boot, so as the Nano Server boots, they will execute.
- Unmount the VHD with /commit which is very important to keep these changes by running the following command:
dism /Unmount-Image /MountDir:.\mountdir /Commit
We would prefer to use Windows PowerShell that we covered earlier to create and customize a Nano image using the Nano PowerShell module.
- Web應用系統開發實踐(C#)
- Python 3.7網絡爬蟲快速入門
- PHP 7底層設計與源碼實現
- 程序員面試算法寶典
- Learn Programming in Python with Cody Jackson
- Java:Data Science Made Easy
- 編譯系統透視:圖解編譯原理
- PhoneGap:Beginner's Guide(Third Edition)
- Mathematica Data Analysis
- PySide 6/PyQt 6快速開發與實戰
- 蘋果的產品設計之道:創建優秀產品、服務和用戶體驗的七個原則
- Internet of Things with ESP8266
- C++從入門到精通(第6版)
- jQuery for Designers Beginner's Guide Second Edition
- Docker:容器與容器云(第2版)