cobbler自动化安装CentOS、windows和ubuntu

环境介绍

同时玩cobbler3.3和cobbler2.8.5

cobbler3.3

系统CentOS8.3

VMware虚拟机

桥接到物理网络

IP: 192.168.1.33

cobbler2.8.5

系统CentOS7.9

VMWare虚拟机

桥接到物理网络

IP:192.168.1.33

安装cobbler3.3

yum源修改

cat /etc/yum.repo.d/Centos8.repo[base]
name=CentOS-$releasever - Base - mirrors.aliyun.com
baseurl=http://mirrors.aliyun.com/centos/$releasever/BaseOS/$basearch/os/http://mirrors.aliyuncs.com/centos/$releasever/BaseOS/$basearch/os/http://mirrors.cloud.aliyuncs.com/centos/$releasever/BaseOS/$basearch/os/
gpgcheck=1
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-Official[extras]
name=CentOS-$releasever - Extras - mirrors.aliyun.com
baseurl=http://mirrors.aliyun.com/centos/$releasever/extras/$basearch/os/http://mirrors.aliyuncs.com/centos/$releasever/extras/$basearch/os/http://mirrors.cloud.aliyuncs.com/centos/$releasever/extras/$basearch/os/
gpgcheck=1
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-Official[centosplus]
name=CentOS-$releasever - Plus - mirrors.aliyun.com
baseurl=http://mirrors.aliyun.com/centos/$releasever/centosplus/$basearch/os/http://mirrors.aliyuncs.com/centos/$releasever/centosplus/$basearch/os/http://mirrors.cloud.aliyuncs.com/centos/$releasever/centosplus/$basearch/os/
gpgcheck=1
enabled=0
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-Official[PowerTools]
name=CentOS-$releasever - PowerTools - mirrors.aliyun.com
baseurl=http://mirrors.aliyun.com/centos/$releasever/PowerTools/$basearch/os/http://mirrors.aliyuncs.com/centos/$releasever/PowerTools/$basearch/os/http://mirrors.cloud.aliyuncs.com/centos/$releasever/PowerTools/$basearch/os/
gpgcheck=1
enabled=0
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-Official[AppStream]
name=CentOS-$releasever - AppStream - mirrors.aliyun.com
baseurl=http://mirrors.aliyun.com/centos/$releasever/AppStream/$basearch/os/http://mirrors.aliyuncs.com/centos/$releasever/AppStream/$basearch/os/http://mirrors.cloud.aliyuncs.com/centos/$releasever/AppStream/$basearch/os/
gpgcheck=1
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-Officialyum clean all
yum makecache

防火墙

systemctl disable --now firewalldsetenforce 0
sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config

安装cobbler

yum -y install epel-release rsync rsync-daemon# rocky9.1上不用执行此三行
yum module list | grep cobbler
dnf module enable cobbler:3 -y
yum list all | grep cobbleryum -y install httpd dhcp-server tftp tftp-server cobbler cobbler-web pykickstart

安装cobbler2.8.5

yum源

wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo

防火墙

systemctl disable --now firewalldsetenforce 0
sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config

安装cobbler

yum install -y dhcp cobbler cobbler-web debmirror pykickstart syslinux

cobbler 配置

cobbler3.3和cobbler2.8.5大同小异

systemctl enable --now httpd
systemctl enable --now cobblerd
systemctl enable --now rsyncd
systemctl enable --now tftp

配置cobbler

sed -i 's/^server: 127.0.0.1/server: 192.168.1.33/' /etc/cobbler/settings.yaml
sed -i "s/next_server: 127.0.0.1/next_server: 192.168.1.33/" /etc/cobbler/settings.yaml
sed -i "s#manage_dhcp: false#manage_dhcp: true#" /etc/cobbler/settings.yaml# 检查配置问题
cobbler check# 解决 reposync is not installed, install yum-utils or dnf-plugins-core
# 解决 yumdownloader is not installed, install yum-utils or dnf-plugins-core
yum -y install yum-utils# 解决 some network boot-loaders are missing from /var/lib/cobbler/loaders
yum -y install syslinux*
cp /usr/share/syslinux/pxelinux.0 /var/lib/cobbler/loaders/
cp /usr/share/syslinux/menu.c32 /var/lib/cobbler/loaders/
ls /var/lib/cobbler/loaders/

配置dhcp

[root@localhost ~]# cat /etc/cobbler/dhcp.templateddns-update-style interim;allow booting;
allow bootp;ignore client-updates;
set vendorclass = option vendor-class-identifier;option system-arch code 93 = unsigned integer 16;subnet 192.168.0.0 netmask 255.255.0.0 {option routers             192.168.1.1;option domain-name-servers 192.168.1.33;option subnet-mask         255.255.0.0;range dynamic-bootp        192.168.32.100 192.168.32.254;default-lease-time         21600;max-lease-time             43200;next-server                $next_server;# systemctl restart httpd cobblerd
cobbler sync

安装CentOS8

导入

mkdir /centos8
mount -o loop,ro CentOS-Stream-8-20230710.0-x86_64-dvd1.iso /centos8cobbler import --path=/centos8 --name=MyC8 --arch=x86_64
cobbler list
cobbler distro report --name MyC8-x86_64# 删除
cobbler profile remove --name MyC8-x86_64
cobbler distro remove --name MyC8-x86_64

创建kickstarts自动安装脚本

# 生成密码
openssl passwd -1 'root'# cobbler profile get-autoinstall --name MyC8-x86_64 > /var/lib/cobbler/templates/centos8.ks # 适用cobbler3
# cobbler profile getks --name centos7-x86_64 > /var/lib/cobbler/kickstarts/centos7.ks # 适用cobbler2.8.5# 检查ks文件语法
cobbler validate-autoinstalls# 配置绑定ks
# cobbler profile edit --name MyC8-x86_64 --autoinstall centos8.ks # 适用cobbler3# 配置修改内核参数,以统一网卡名称
cobbler profile edit --name MyC8-x86_64 --kernel-options='net.ifnames=0 biosdevname=0'# 打印
cobbler profile report --name MyC8-x86_64# 同步
cobbler syncsystemctl restart httpd cobblerd rsyncd dhcpd

定制安装

使用https访问到cobbler的网页 https://192.168.1.33/cobbler_web/
账号密码都为cobbler

创建系统

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

执行cobbler sync

然后便可以开启VMware虚拟机,玩一玩PXE启动虚拟机了

安装ubuntu20.04.6

以下均在cobbler2.8.5上操作

目前仅成功ubuntu-18.04.5-server-amd64.iso

安装依赖软件

yum -y install debmirror

配置debmirror

sed -i 's/@dists="sid";/#@dists="sid";/g' /etc/debmirror.conf
sed -i 's/@arches="i386";/#@arches="i386";/g' /etc/debmirror.conf

需要注意的是,如果你使用的是 cobbler,那你应该使用 ubuntu-20.04-legacy-server-amd64.iso,而不是 live-server(应该是缺少netboot),Ubuntu 20.04 已没有 server

配置ubuntu18045.seed

# ankele comment out 1 from csdn
# cd /var/lib/cobbler/kickstart/sample.seed
# Mostly based on the Ubuntu installation guide
# https://help.ubuntu.com/18.04/installation-guide/
# Debian sample
# https://www.debian.org/releases/stable/example-preseed.txt# Preseeding only locale sets language, country and locale.
d-i debian-installer/locale string en_US.UTF-8# Keyboard selection.
# Disable automatic (interactive) keymap detection.
d-i console-setup/ask_detect boolean false
d-i keyboard-configuration/xkb-keymap select us
d-i keyboard-configuration/toggle select No toggling
d-i keyboard-configuration/layoutcode string us
d-i keyboard-configuration/variantcode string# netcfg will choose an interface that has link if possible. This makes it
# skip displaying a list if there is more than one interface.
#set $myhostname = $getVar('hostname',$getVar('name','cobbler')).replace("_","-")
#d-i netcfg/choose_interface select auto
#d-i netcfg/choose_interface select ens33
#d-i netcfg/get_hostname string helmsman
#d-i netcfg/choose_interface select auto
#d-i netcfg/dhcp_failed note
#d-i netcfg/dhcp_options select Do not configure the network at this time
#d-i netcfg/get_hostname string keqi-server
#d-i netcfg/get_domain string keqi-server
# ankele comment out 1 from csdn
# d-i netcfg/enable boolea false# If non-free firmware is needed for the network or other hardware, you can
# configure the installer to always try to load it, without prompting. Or
# change to false to disable asking.
# d-i hw-detect/load_firmware boolean true# NTP/Time Setup
d-i time/zone string Asia/Shanghai
d-i clock-setup/ntp-server string ntp1.aliyun.com
d-i clock-setup/utc boolean true
d-i clock-setup/ntp boolean true# Setup the installation source
d-i mirror/country string manual
d-i mirror/http/hostname string $http_server
d-i mirror/http/directory string $install_source_directory
d-i mirror/http/proxy string#set $os_v = $getVar('os_version','')
#if $breed == "ubuntu" and $os_v and $os_v.lower() != 'precise'
# Required at least for ubuntu 12.10+ , so test os_v is not precise. Olders versions are not supported anymore
d-i live-installer/net-image string http://$http_server/cobbler/links/$distro_name/install/filesystem.squashfs
#end if# Suite to install.
# d-i mirror/suite string precise
# d-i mirror/udeb/suite string precise# Components to use for loading installer components (optional).
#d-i mirror/udeb/components multiselect main, restricted# Disk Partitioning
# Use LVM, and wipe out anything that already existsd-i partman-auto/disk string /dev/sda
d-i partman-auto/choose_recipe select atomic
d-i partman-auto/method string lvm
d-i partman-auto-lvm/guided_size string 100%
d-i partman-lvm/confirm boolean true
d-i partman-lvm/confirm_nooverwrite boolean true
d-i partman-lvm/device_remove_lvm boolean true
d-i partman-md/device_remove_md boolean true
d-i partman-partitioning/confirm_write_new_label boolean true
d-i partman/choose_partition select finish
d-i partman/confirm boolean true
d-i partman/confirm_nooverwrite boolean true
d-i partman/default_filesystem string ext4
d-i partman/mount_style select uuid
# You can choose one of the three predefined partitioning recipes:
# - atomic: all files in one partition
# - home:   separate /home partition
# - multi:  separate /home, /usr, /var, and /tmp partitions
d-i partman-auto/choose_recipe select atomic# If you just want to change the default filesystem from ext3 to something
# else, you can do that without providing a full recipe.
# d-i partman/default_filesystem string ext4# root account and password
d-i passwd/root-login boolean true
d-i passwd/root-password-crypted password $1$L2xUdTaN$J5OHlZxtjUmbA6HzD.4Iq/# skip creation of a normal user account.
d-i passwd/make-user boolean false# You can choose to install restricted and universe software, or to install
# software from the backports repository.
d-i apt-setup/restricted boolean true
d-i apt-setup/universe boolean true
d-i apt-setup/backports boolean true# Uncomment this if you don't want to use a network mirror.
# d-i apt-setup/use_mirror boolean false# Select which update services to use; define the mirrors to be used.
# Values shown below are the normal defaults.
d-i apt-setup/services-select multiselect security
d-i apt-setup/security_host string mirrors.aliyun.com
d-i apt-setup/security_path string /ubuntu$SNIPPET('preseed_apt_repo_config')# Enable deb-src lines
# d-i apt-setup/local0/source boolean true# URL to the public key of the local repository; you must provide a key or
# apt will complain about the unauthenticated repository and so the
# sources.list line will be left commented out
# d-i apt-setup/local0/key string http://local.server/key# By default the installer requires that repositories be authenticated
# using a known gpg key. This setting can be used to disable that
# authentication. Warning: Insecure, not recommended.
# d-i debian-installer/allow_unauthenticated boolean true# Package selection
# Default for minimal
tasksel tasksel/first multiselect standard
# Default for server
# tasksel tasksel/first multiselect standard, web-server
# Default for gnome-desktop
# tasksel tasksel/first multiselect standard, gnome-desktop# Individual additional packages to install
# wget is REQUIRED otherwise quite a few things won't work
# later in the build (like late-command scripts)
d-i pkgsel/include string openssh-server vim# Debian needs this for the installer to avoid any question for grub
# Please verify that it suit your needs as it may overwrite any usb stick
#if $breed == "debian"
d-i grub-installer/grub2_instead_of_grub_legacy boolean true
d-i grub-installer/bootdev string /dev/sda
#end if# Use the following option to add additional boot parameters for the
# installed system (if supported by the bootloader installer).
# Note: options passed to the installer will be added automatically.
d-i debian-installer/add-kernel-opts string $kernel_options_post# Avoid that last message about the install being complete.
d-i finish-install/reboot_in_progress note## Figure out if we're kickstarting a system or a profile
#if $getVar('system_name','') != ''
#set $what = "system"
#else
#set $what = "profile"
#end if# This first command is run as early as possible, just after preseeding is read.
# d-i preseed/early_command string [command]
d-i preseed/early_command string wget -O- \http://$http_server/cblr/svc/op/script/$what/$name/?script=preseed_early_default | \/bin/sh -s# This command is run immediately before the partitioner starts. It may be# useful to apply dynamic partitioner preseeding that depends on the state# of the disks (which may not be visible when preseed/early_command runs).# d-i partman/early_command \#       string debconf-set partman-auto/disk "\$(list-devices disk | head -n1)"# This command is run just before the install finishes, but when there is# still a usable /target directory. You can chroot to /target and use it# directly, or use the apt-install and in-target commands to easily install# packages and run commands in the target system.# d-i preseed/late_command string [command]d-i preseed/late_command string wget -O- \http://$http_server/cblr/svc/op/script/$what/$name/?script=preseed_late_default | \chroot /target /bin/sh -s

注意,seed文件中不能包含中文

file /var/lib/cobbler/kickstarts/ubuntu18045.seed
/var/lib/cobbler/kickstarts/ubuntu18045.seed: ASCII text

导入

cobbler import --path=/ubuntu1804 --name=ubuntu18045 --kickstart=/var/lib/cobbler/kickstarts/ubuntu18045.seed --arch=x86_64

导入后会自动生成两个profile,其中一个是xxx-hwe-xxx,可以干掉它,我们仅使用ubuntu18045-x86_64

安装windows系统

仅在cobbler2.8.5下测试通过

准备工作

windows ADK

windows PE add-on for ADK

然后到msdn i tell u 下载windows ISO

Snipaste_2019-02-25_22-18-07.png

安装ADK和WinPE

安装ADK时,仅用勾选部署工具即可

安装winPE时,默认勾选Windows预安装环境

安装完成后,以管理员身份运行部署和映像工具环境

定制 PE

部署和映像工具环境交互框中执行如下命令

windows 10

copype amd64 c:\winpe # 本地生成winpe目录Dism /mount-image /imagefile:c:\winpe\media\sources\boot.wim /index:1 /mountdir:c:\winpe\mount # dism挂载WinPE的启动文件到mount目录echo net use z: \\192.168.1.33/share >> c:\winpe\mount\Windows\System32\startnet.cmd # 将启动命令硬编码写死到 winpe 的 startnet.cmd 文件里
# 此处硬编码可以改为域名,便可动态设置smb主机echo z:\win10\setup.exe /unattend:z:\win10\win10_x64_bios_auto.xml >> c:\winpe\mount\Windows\System32\startnet.cmd # 自动应答Dism /unmount-image /mountdir:c:\winpe\mount /commit # 卸载WinPE的挂载
MakeWinPEMedia /ISO c:\winpe c:\winpe\winpe_win10_amd64.iso # 生成win10 PE镜像

window server 2019

####windows 2019 winpe制作###
copype amd64 c:\winpe2019 # 本地生成winpe目录Dism /mount-image /imagefile:c:\winpe2019\media\sources\boot.wim /index:1 /mountdir:c:\winpe\mount
echo ping -n 5 -l 69 192.168.1.33>> C:\winpe2019\mount\Windows\System32\startnet.cmd
echo net use z: \\192.168.1.33/share >> c:\winpe2019\mount\Windows\System32\startnet.cmd
echo z:\win2019\setup.exe /unattend:z:\win2019\win2019_x64_bios_auto.xml >> c:\winpe2019\mount\Windows\System32\startnet.cmdDism /unmount-image /mountdir:c:\winpe2019\mount /commit
MakeWinPEMedia /ISO c:\winpe2019 c:\winpe2019\winpe_win2019_amd64.iso

报错

若在执行第二条命令时报错

Failed to load the provider: D:\tools_install\Windows Kits\10\Assessment and Deployment Kit\Deployment Tools\AMD64\DISM\MetaDeployProvider.dll. - CDISMProviderStore::Internal_GetProvider(hr:0x8007007e)
...
[4024] ImageUnmarshallHandle: Reconstituting wim at c:\winpe\media\sources\boot.wim.
[4024] [0xc1420127] WIMMountImageHandle:(1120)
[4024] [0x80070002] StateStoreRemoveMountedImage:(1124): 系统找不到指定的文件。
[4024] [0x80070002] WIMMountImageHandle:(1332): 系统找不到指定的文件。

可以执行(没啥卵用)

dism.exe /online /cleanup-image /restorehealth

换个名字

比如copype amd64 c:\winpe1 缓存 copype amd64 c:\winpe2

配置Cobbler Server

导入Cobbler

首先将上一步创建的PE文件winpe_winxx_amd64.iso传递到Cobbler服务器上

cobbler distro add --name=windows_xx_x64 --kernel=/var/lib/tftpboot/memdisk --initrd=/root/winpe_winxx_amd64.iso --kopts="raw iso"
touch /var/lib/cobbler/kickstarts/winxx_x64_bios_auto.xml
cobbler profile add --name=windows_xx_x64 --distro=windows_xx_x64 --kickstart=/var/lib/cobbler/kickstarts/winxx_x64_bios_auto.xml

做好的/var/lib/cobbler/kickstarts/winpe.xml for win10见文章末尾

配置samba

安装

yum -y install samba

配置

cat /etc/samba/smb.conf
...
[share]
comment = share directory目录
path = /iso/
directory mask = 0755
create mask = 0755
guest ok=yes
writable=yes

启动

systemctl enable --now smb

挂载winxx ISO

mkdir /iso
mkfs.xfs /dev/sdb
mount /dev/sdb /iso
mkdir /iso/winxx
mount -o loop,ro /root/cn_windows_xx_business_edition_version_1809_updated_sept_2018_x64_dvd_84ac403f.iso /mnt/
cp -r /mnt/* /iso/winxx
umount /mnt
cp winxx_x64_bios_auto.xml /iso/xx

自动化安装

从 vmware 创建一台内存 4G,cpu2 核,磁盘 60G 的空盘,win10 虚拟机,记得选 BIOS,别选 UEFI

然后开机

进入后选择windows_10_x64(若在cobbler_web 的system中创建指定了此system的profile,并指定了MAC地址,则不用再手动选择)

做好的win10_x64_bios_auto.xml

win10的xml中没有适配远程连接,密码zhizhizhi

<!--*************************************************
Windows 10 Answer File Generator
Created using Windows AFG found at:
;http://www.windowsafg.comInstallation Notes
Location: zh-CN
Notes: Enter your comments here...
**************************************************-->
<?xml version="1.0" encoding="utf-8"?>
<unattendxmlns="urn:schemas-microsoft-com:unattend"><settings pass="windowsPE"><component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">#### 特别注意此处,使用全中文,或许不能成功设置,会让你手动选择语言<SetupUILanguage><UILanguage>en-US</UILanguage></SetupUILanguage><InputLocale>0804:{81D4E9C9-1D3B-41BC-9E6C-4B40BF79E35E}{FA550B04-5AD7-411f-A5AC-CA038EC515D7}</InputLocale><SystemLocale>zh-CN</SystemLocale><UILanguage>zh-CN</UILanguage><UILanguageFallback>zh-CN</UILanguageFallback><UserLocale>zh-CN</UserLocale></component><component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><SetupUILanguage><UILanguage>en-US</UILanguage></SetupUILanguage><InputLocale>0804:{81D4E9C9-1D3B-41BC-9E6C-4B40BF79E35E}{FA550B04-5AD7-411f-A5AC-CA038EC515D7}</InputLocale><SystemLocale>zh-CN</SystemLocale><UILanguage>zh-CN</UILanguage><UILanguageFallback>zh-CN</UILanguageFallback><UserLocale>zh-CN</UserLocale></component><component name="Microsoft-Windows-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><DiskConfiguration><Disk wcm:action="add"><CreatePartitions><CreatePartition wcm:action="add"><Order>1</Order><Type>Primary</Type><Size>100</Size></CreatePartition><CreatePartition wcm:action="add"><Extend>true</Extend><Order>2</Order><Type>Primary</Type></CreatePartition></CreatePartitions><ModifyPartitions><ModifyPartition wcm:action="add"><Active>true</Active><Format>NTFS</Format><Label>System Reserved</Label><Order>1</Order><PartitionID>1</PartitionID><TypeID>0x27</TypeID></ModifyPartition><ModifyPartition wcm:action="add"><Active>true</Active><Format>NTFS</Format><Label>OS</Label><Letter>C</Letter><Order>2</Order><PartitionID>2</PartitionID></ModifyPartition></ModifyPartitions><DiskID>0</DiskID><WillWipeDisk>true</WillWipeDisk></Disk></DiskConfiguration><ImageInstall><OSImage><InstallTo><DiskID>0</DiskID><PartitionID>2</PartitionID></InstallTo><InstallToAvailablePartition>false</InstallToAvailablePartition></OSImage></ImageInstall><UserData><AcceptEula>true</AcceptEula><FullName>wocao</FullName><Organization>wocao</Organization><ProductKey><Key>VK7JG-NPHTM-C97JM-9MPGT-3V66T</Key></ProductKey></UserData></component><component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><DiskConfiguration><Disk wcm:action="add"><CreatePartitions><CreatePartition wcm:action="add"><Order>1</Order><Type>Primary</Type><Size>100</Size></CreatePartition><CreatePartition wcm:action="add"><Extend>true</Extend><Order>2</Order><Type>Primary</Type></CreatePartition></CreatePartitions><ModifyPartitions><ModifyPartition wcm:action="add"><Active>true</Active><Format>NTFS</Format><Label>System Reserved</Label><Order>1</Order><PartitionID>1</PartitionID><TypeID>0x27</TypeID></ModifyPartition><ModifyPartition wcm:action="add"><Active>true</Active><Format>NTFS</Format><Label>OS</Label><Letter>C</Letter><Order>2</Order><PartitionID>2</PartitionID></ModifyPartition></ModifyPartitions><DiskID>0</DiskID><WillWipeDisk>true</WillWipeDisk></Disk></DiskConfiguration><ImageInstall><OSImage><InstallTo><DiskID>0</DiskID><PartitionID>2</PartitionID></InstallTo><InstallToAvailablePartition>false</InstallToAvailablePartition></OSImage></ImageInstall><UserData><AcceptEula>true</AcceptEula><FullName>zhizhizhi</FullName><Organization>zhizhizhi</Organization><ProductKey><Key>VK7JG-NPHTM-C97JM-9MPGT-3V66T</Key></ProductKey></UserData></component></settings><settings pass="offlineServicing"><component name="Microsoft-Windows-LUA-Settings" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><EnableLUA>false</EnableLUA></component></settings><settings pass="offlineServicing"><component name="Microsoft-Windows-LUA-Settings" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><EnableLUA>false</EnableLUA></component></settings><settings pass="generalize"><component name="Microsoft-Windows-Security-SPP" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><SkipRearm>1</SkipRearm></component></settings><settings pass="generalize"><component name="Microsoft-Windows-Security-SPP" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><SkipRearm>1</SkipRearm></component></settings><settings pass="specialize"><component name="Microsoft-Windows-International-Core" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><InputLocale>0804:{81D4E9C9-1D3B-41BC-9E6C-4B40BF79E35E}{FA550B04-5AD7-411f-A5AC-CA038EC515D7}</InputLocale><SystemLocale>zh-CN</SystemLocale><UILanguage>zh-CN</UILanguage><UILanguageFallback>zh-CN</UILanguageFallback><UserLocale>zh-CN</UserLocale></component><component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><InputLocale>0804:{81D4E9C9-1D3B-41BC-9E6C-4B40BF79E35E}{FA550B04-5AD7-411f-A5AC-CA038EC515D7}</InputLocale><SystemLocale>zh-CN</SystemLocale><UILanguage>zh-CN</UILanguage><UILanguageFallback>zh-CN</UILanguageFallback><UserLocale>zh-CN</UserLocale></component><component name="Microsoft-Windows-Security-SPP-UX" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><SkipAutoActivation>true</SkipAutoActivation></component><component name="Microsoft-Windows-Security-SPP-UX" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><SkipAutoActivation>true</SkipAutoActivation></component><component name="Microsoft-Windows-SQMApi" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><CEIPEnabled>0</CEIPEnabled></component><component name="Microsoft-Windows-SQMApi" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><CEIPEnabled>0</CEIPEnabled></component><component name="Microsoft-Windows-Shell-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><ComputerName>zhizhizhi-PC</ComputerName><ProductKey>VK7JG-NPHTM-C97JM-9MPGT-3V66T</ProductKey></component><component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><ComputerName>zhizhizhi-PC</ComputerName><ProductKey>VK7JG-NPHTM-C97JM-9MPGT-3V66T</ProductKey></component></settings><settings pass="oobeSystem"><component name="Microsoft-Windows-Shell-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><AutoLogon><Password><Value></Value><PlainText>true</PlainText></Password><Enabled>true</Enabled><Username>zhizhizhi</Username></AutoLogon><OOBE><HideEULAPage>true</HideEULAPage><HideOEMRegistrationScreen>true</HideOEMRegistrationScreen><HideOnlineAccountScreens>true</HideOnlineAccountScreens><HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE><NetworkLocation>Work</NetworkLocation><SkipUserOOBE>true</SkipUserOOBE><SkipMachineOOBE>true</SkipMachineOOBE><ProtectYourPC>1</ProtectYourPC></OOBE><UserAccounts><LocalAccounts><LocalAccount wcm:action="add"><Password><Value></Value><PlainText>true</PlainText></Password><Description>zhizhizhi</Description><DisplayName>zhizhizhi</DisplayName><Group>Administrators</Group><Name>zhizhizhi</Name></LocalAccount></LocalAccounts></UserAccounts><RegisteredOrganization>zhizhizhi</RegisteredOrganization><RegisteredOwner>zhizhizhi</RegisteredOwner><DisableAutoDaylightTimeSet>false</DisableAutoDaylightTimeSet><FirstLogonCommands><SynchronousCommand wcm:action="add"><Description>Control Panel View</Description><Order>1</Order><CommandLine>reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel" /v StartupPage /t REG_DWORD /d 1 /f</CommandLine><RequiresUserInput>true</RequiresUserInput></SynchronousCommand><SynchronousCommand wcm:action="add"><Order>2</Order><Description>Control Panel Icon Size</Description><RequiresUserInput>false</RequiresUserInput><CommandLine>reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel" /v AllItemsIconView /t REG_DWORD /d 0 /f</CommandLine></SynchronousCommand><SynchronousCommand wcm:action="add"><Order>3</Order><RequiresUserInput>false</RequiresUserInput><CommandLine>cmd /C wmic useraccount where name="zhizhizhi" set PasswordExpires=false</CommandLine><Description>Password Never Expires</Description></SynchronousCommand></FirstLogonCommands><TimeZone>China Standard Time</TimeZone></component><component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><AutoLogon><Password><Value></Value><PlainText>true</PlainText></Password><Enabled>true</Enabled><Username>zhizhizhi</Username></AutoLogon><OOBE><HideEULAPage>true</HideEULAPage><HideOEMRegistrationScreen>true</HideOEMRegistrationScreen><HideOnlineAccountScreens>true</HideOnlineAccountScreens><HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE><NetworkLocation>Work</NetworkLocation><SkipUserOOBE>true</SkipUserOOBE><SkipMachineOOBE>true</SkipMachineOOBE><ProtectYourPC>1</ProtectYourPC></OOBE><UserAccounts><LocalAccounts><LocalAccount wcm:action="add"><Password><Value></Value><PlainText>true</PlainText></Password><Description>zhizhizhi</Description><DisplayName>zhizhizhi</DisplayName><Group>Administrators</Group><Name>zhizhizhi</Name></LocalAccount></LocalAccounts></UserAccounts><RegisteredOrganization>zhizhizhi</RegisteredOrganization><RegisteredOwner>zhizhizhi</RegisteredOwner><DisableAutoDaylightTimeSet>false</DisableAutoDaylightTimeSet><FirstLogonCommands><SynchronousCommand wcm:action="add"><Description>Control Panel View</Description><Order>1</Order><CommandLine>reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel" /v StartupPage /t REG_DWORD /d 1 /f</CommandLine><RequiresUserInput>true</RequiresUserInput></SynchronousCommand><SynchronousCommand wcm:action="add"><Order>2</Order><Description>Control Panel Icon Size</Description><RequiresUserInput>false</RequiresUserInput><CommandLine>reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel" /v AllItemsIconView /t REG_DWORD /d 0 /f</CommandLine></SynchronousCommand><SynchronousCommand wcm:action="add"><Order>3</Order><RequiresUserInput>false</RequiresUserInput><CommandLine>cmd /C wmic useraccount where name="zhizhizhi" set PasswordExpires=false</CommandLine><Description>Password Never Expires</Description></SynchronousCommand></FirstLogonCommands><TimeZone>China Standard Time</TimeZone></component></settings>
</unattend>

做好的win2019_x64_bios_auto.xml

适配了远程连接,密码wocao

<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend"><settings pass="windowsPE"><component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="x86"publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><SetupUILanguage><UILanguage>en-US</UILanguage></SetupUILanguage><InputLocale>0c09:00000409</InputLocale><SystemLocale>zh-CN</SystemLocale><UILanguage>zh-CN</UILanguage><UILanguageFallback>zh-CN</UILanguageFallback><UserLocale>zh-CN</UserLocale></component><component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64"publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">#### 特别注意此处,使用全中文,或许不能成功设置,会让你手动选择语言<SetupUILanguage><UILanguage>en-US</UILanguage></SetupUILanguage><InputLocale>0c09:00000409</InputLocale><SystemLocale>zh-CN</SystemLocale><UILanguage>zh-CN</UILanguage><UILanguageFallback>zh-CN</UILanguageFallback><UserLocale>zh-CN</UserLocale></component><component name="Microsoft-Windows-Setup" processorArchitecture="x86"publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><DiskConfiguration><Disk wcm:action="add"><CreatePartitions><CreatePartition wcm:action="add"><Order>1</Order><Type>Primary</Type><Size>100</Size></CreatePartition><CreatePartition wcm:action="add"><Extend>true</Extend><Order>2</Order><Type>Primary</Type></CreatePartition></CreatePartitions><ModifyPartitions><ModifyPartition wcm:action="add"><Active>true</Active><Format>NTFS</Format><Label>System Reserved</Label><Order>1</Order><PartitionID>1</PartitionID><TypeID>0x27</TypeID></ModifyPartition><ModifyPartition wcm:action="add"><Active>true</Active><Format>NTFS</Format><Label>OS</Label><Letter>C</Letter><Order>2</Order><PartitionID>2</PartitionID></ModifyPartition></ModifyPartitions><DiskID>0</DiskID><WillWipeDisk>true</WillWipeDisk></Disk></DiskConfiguration><ImageInstall><OSImage><InstallFrom><MetaData wcm:action="add"><Key>/IMAGE/NAME</Key><Value>Windows Server 2019 SERVERSTANDARD</Value></MetaData></InstallFrom><InstallTo><DiskID>0</DiskID><PartitionID>2</PartitionID></InstallTo><InstallToAvailablePartition>false</InstallToAvailablePartition></OSImage></ImageInstall><UserData><AcceptEula>true</AcceptEula><FullName>wocao</FullName><Organization>wocao</Organization><ProductKey><Key>N69G4-B89J2-4G8F4-WWYCC-J464C</Key></ProductKey></UserData></component><component name="Microsoft-Windows-Setup" processorArchitecture="amd64"publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><DiskConfiguration><Disk wcm:action="add"><CreatePartitions><CreatePartition wcm:action="add"><Order>1</Order><Type>Primary</Type><Size>100</Size></CreatePartition><CreatePartition wcm:action="add"><Extend>true</Extend><Order>2</Order><Type>Primary</Type></CreatePartition></CreatePartitions><ModifyPartitions><ModifyPartition wcm:action="add"><Active>true</Active><Format>NTFS</Format><Label>System Reserved</Label><Order>1</Order><PartitionID>1</PartitionID><TypeID>0x27</TypeID></ModifyPartition><ModifyPartition wcm:action="add"><Active>true</Active><Format>NTFS</Format><Label>OS</Label><Letter>C</Letter><Order>2</Order><PartitionID>2</PartitionID></ModifyPartition></ModifyPartitions><DiskID>0</DiskID><WillWipeDisk>true</WillWipeDisk></Disk></DiskConfiguration>#### 特别注意此处,需要提前指定安装镜像,否则会安装过程中会让你手动选择<ImageInstall><OSImage><InstallFrom><MetaData wcm:action="add"><Key>/IMAGE/NAME</Key><Value>Windows Server 2019 SERVERSTANDARD</Value></MetaData></InstallFrom><InstallTo><DiskID>0</DiskID><PartitionID>2</PartitionID></InstallTo><InstallToAvailablePartition>false</InstallToAvailablePartition></OSImage></ImageInstall><UserData><AcceptEula>true</AcceptEula><FullName>wocao</FullName><Organization>wocao</Organization><ProductKey><Key>N69G4-B89J2-4G8F4-WWYCC-J464C</Key></ProductKey></UserData></component></settings><settings pass="offlineServicing"><component name="Microsoft-Windows-LUA-Settings" processorArchitecture="x86"publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><EnableLUA>false</EnableLUA></component></settings><settings pass="offlineServicing"><component name="Microsoft-Windows-LUA-Settings" processorArchitecture="amd64"publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><EnableLUA>false</EnableLUA></component></settings><settings pass="generalize"><component name="Microsoft-Windows-Security-SPP" processorArchitecture="x86"publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><SkipRearm>1</SkipRearm></component></settings><settings pass="generalize"><component name="Microsoft-Windows-Security-SPP" processorArchitecture="amd64"publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><SkipRearm>1</SkipRearm></component></settings><settings pass="specialize"><component name="Microsoft-Windows-International-Core" processorArchitecture="x86"publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><InputLocale>0c09:00000409</InputLocale><SystemLocale>zh-CN</SystemLocale><UILanguage>zh-CN</UILanguage><UILanguageFallback>zh-CN</UILanguageFallback><UserLocale>zh-CN</UserLocale></component><component name="Microsoft-Windows-International-Core" processorArchitecture="amd64"publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><InputLocale>0c09:00000409</InputLocale><SystemLocale>zh-CN</SystemLocale><UILanguage>zh-CN</UILanguage><UILanguageFallback>zh-CN</UILanguageFallback><UserLocale>zh-CN</UserLocale></component><component name="Microsoft-Windows-Security-SPP-UX" processorArchitecture="x86"publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><SkipAutoActivation>true</SkipAutoActivation></component><component name="Microsoft-Windows-Security-SPP-UX" processorArchitecture="amd64"publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><SkipAutoActivation>true</SkipAutoActivation></component><component name="Microsoft-Windows-SQMApi" processorArchitecture="x86"publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><CEIPEnabled>0</CEIPEnabled></component><component name="Microsoft-Windows-SQMApi" processorArchitecture="amd64"publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><CEIPEnabled>0</CEIPEnabled></component><component name="Microsoft-Windows-Shell-Setup" processorArchitecture="x86"publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><ComputerName>INSTCK0-PC</ComputerName><ProductKey>N69G4-B89J2-4G8F4-WWYCC-J464C</ProductKey></component><component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64"publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><ComputerName>-PC-wocao</ComputerName><ProductKey>N69G4-B89J2-4G8F4-WWYCC-J464C</ProductKey></component><component name="Networking-MPSSVC-Svc" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">#### 特别注意此处,关闭防火墙<!-- WLSD Disable windows firewall --><!-- <DomainProfile_EnableFirewall>false</DomainProfile_EnableFirewall> --><PrivateProfile_EnableFirewall>false</PrivateProfile_EnableFirewall><PublicProfile_EnableFirewall>false</PublicProfile_EnableFirewall></component></settings><settings pass="oobeSystem"><component name="Microsoft-Windows-Shell-Setup" processorArchitecture="x86"publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><AutoLogon><Password><Value>wocao</Value><PlainText>true</PlainText></Password><Enabled>true</Enabled><Username>wocao</Username></AutoLogon><OOBE><HideEULAPage>true</HideEULAPage><HideOEMRegistrationScreen>true</HideOEMRegistrationScreen><HideOnlineAccountScreens>true</HideOnlineAccountScreens><HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE><NetworkLocation>Work</NetworkLocation><SkipUserOOBE>true</SkipUserOOBE><SkipMachineOOBE>true</SkipMachineOOBE><ProtectYourPC>3</ProtectYourPC></OOBE><UserAccounts><LocalAccounts><LocalAccount wcm:action="add"><Password><Value>wocao</Value><PlainText>true</PlainText></Password><Description></Description><DisplayName>wocao</DisplayName><Group>Administrators</Group><Name>wocao</Name></LocalAccount></LocalAccounts></UserAccounts><RegisteredOrganization>wocao</RegisteredOrganization><RegisteredOwner>wocao</RegisteredOwner><DisableAutoDaylightTimeSet>false</DisableAutoDaylightTimeSet><FirstLogonCommands><SynchronousCommand wcm:action="add"><Description>Control Panel View</Description><Order>1</Order><CommandLine>reg add"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel"/v StartupPage /t REG_DWORD /d 1 /f</CommandLine><RequiresUserInput>true</RequiresUserInput></SynchronousCommand><SynchronousCommand wcm:action="add"><Order>2</Order><Description>Control Panel Icon Size</Description><RequiresUserInput>false</RequiresUserInput><CommandLine>reg add"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel"/v AllItemsIconView /t REG_DWORD /d 0 /f</CommandLine></SynchronousCommand><SynchronousCommand wcm:action="add"><Order>3</Order><RequiresUserInput>false</RequiresUserInput><CommandLine>cmd /C wmic useraccount where name="wocao" setPasswordExpires=false</CommandLine><Description>Password Never Expires</Description></SynchronousCommand></FirstLogonCommands><TimeZone>AUS Eastern Standard Time</TimeZone></component><component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64"publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><AutoLogon><Password><Value>wocao</Value><PlainText>true</PlainText></Password><Enabled>true</Enabled><Username>wocao</Username></AutoLogon><OOBE><HideEULAPage>true</HideEULAPage><HideOEMRegistrationScreen>true</HideOEMRegistrationScreen><HideOnlineAccountScreens>true</HideOnlineAccountScreens><HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE><NetworkLocation>Home</NetworkLocation><SkipUserOOBE>true</SkipUserOOBE><SkipMachineOOBE>true</SkipMachineOOBE><ProtectYourPC>3</ProtectYourPC></OOBE><UserAccounts><LocalAccounts><LocalAccount wcm:action="add"><Password><Value>wocao</Value><PlainText>true</PlainText></Password><Description></Description><DisplayName>wocao</DisplayName><Group>Administrators</Group><Name>wocao</Name></LocalAccount></LocalAccounts></UserAccounts><RegisteredOrganization>wocao</RegisteredOrganization><RegisteredOwner>wocao</RegisteredOwner><DisableAutoDaylightTimeSet>false</DisableAutoDaylightTimeSet>#### 特别注意此处,允许远程连接<!-- WLSD Enable RDP --><FirstLogonCommands><SynchronousCommand wcm:action="add"><CommandLine>reg add &quot;HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server&quot; /v fDenyTSConnections /t REG_DWORD /d 0 /f</CommandLine><Order>1</Order><RequiresUserInput>false</RequiresUserInput></SynchronousCommand></FirstLogonCommands><TimeZone>AUS Eastern Standard Time</TimeZone></component></settings>
</unattend>

参考

windows answer file generator

cobbler 安装ubuntu18.04.5

cobbler批量自动化部署Windows10和Server2019

cobbler之安装windows server 2019(win10)

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/64031.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

指针(一)------指针概念+指针类型+野指针+指针运算+二级指针

&#x1f493;博主csdn个人主页&#xff1a;小小unicorn ⏩专栏分类&#xff1a;C语言 &#x1f69a;代码仓库&#xff1a;小小unicorn的代码仓库&#x1f69a; &#x1f339;&#x1f339;&#x1f339;关注我带你学习编程知识 指针&#xff08;一&#xff09; 指针是什么指针…

ModaHub魔搭社区:自动化机器学习Auto-Sklearn全面详细教程

Auto-Sklearn的简介 Auto-Sklearn(基于scikit-learn库的自动化的机器学习工具)的概述 简介 Auto-Sklearn,在2015年由德国图宾根大学的研究人员提出的,最初的版本于2016年发布。auto-sklearn基于scikit-learn库进行开发,支持多种机器学习任务,包括分类、回归、时间序列…

【Unity】URP屏幕后处理UI模糊效果实现

这里Canvas(1)设置为Overlay能渲染出指定UI高清&#xff0c;其他UI模糊&#xff0c;然而这做法非常不好&#xff0c;如果此时再打开UI 以及 关闭模糊效果 要将这些置顶UI 恢复到原本Canvas里&#xff0c;也就是要管理2套Canvas using System; using System.Collections; using…

【算法与数据结构】404、LeetCode左叶子之和

文章目录 一、题目二、解法三、完整代码 所有的LeetCode题解索引&#xff0c;可以看这篇文章——【算法和数据结构】LeetCode题解。 一、题目 二、解法 思路分析&#xff1a;思路比较简单&#xff0c;遍历所有节点然后判断该节点是否为左叶子节点&#xff0c;如果是&#xff0c…

windows11 利用vmware17 安装ky10-server-x86操作系统

下载相关软件和镜像 vmware17 下载 下载页面 Download VMware Workstation Pro ky10server-x86镜像下载 官网 国产操作系统、银河麒麟、中标麒麟、开放麒麟、星光麒麟——麒麟软件官方网站 (kylinos.cn) 选择对应版本去下载 安装 选择镜像&#xff0c;点击下一步 磁盘设置要…

ssm+vue宠物领养系统源码和论文

ssmvue宠物领养系统源码和论文103 开发工具&#xff1a;idea 数据库mysql5.7 数据库链接工具&#xff1a;navcat,小海豚等 技术&#xff1a;ssm 摘 要 本课题是根据用户的需要以及网络的优势建立的一个宠物领养系统&#xff0c;来满足用宠物领养的需求。 本宠物领养系统…

Android JNI系列详解之生成指定CPU的库文件

一、前提 这次主要了解Android的cpu架构类型&#xff0c;以及在使用CMake工具的时候&#xff0c;如何指定生成哪种类型的库文件。 如上图所示&#xff0c;是我们之前使用CMake工具默认生成的四种cpu架构的动态库文件&#xff1a;arm64-v8a、armeabi-v7a、x86、x86_64&#xff0…

5年测试在职经验之谈:2年功能测试、3年自动化测试,从入门到不可自拔...

毕业3年了&#xff0c;学的是环境工程专业&#xff0c;毕业后零基础转行做软件测试。 已近从事测试行业8年了&#xff0c;自己也从事过2年的手工测试&#xff0c;从事期间越来越觉得如果一直在手工测试的道路上前进&#xff0c;并不会有很大的发展&#xff0c;所以通过自己的努…

KVM虚拟化ubuntu

KVM&#xff08;Kernel-based Virtual Machine&#xff09;是一种基于Linux内核的虚拟化技术&#xff0c;它将Linux内核作为虚拟机的底层操作系统&#xff0c;利用硬件虚拟化支持创建和管理虚拟机。KVM虚拟化技术被广泛应用于云计算、虚拟化服务器、虚拟化桌面等场景。 KVM虚拟…

CodeBlocks20.03配置wxWidgets

背景 - 现在是2023年 1. 很多年前&#xff0c;下载使用CodeBlocks就发现里面有自带的wxWidgets Project的项目&#xff0c;然而一路Next下去出来的程序根本就不能运行&#xff0c;心有不甘&#xff1b; 2. 前几年&#xff0c;用python做小工具的时候&#xff0c;界面用的wxPy…

编程题四大算法思想(三)——贪心法:找零问题、背包问题、任务调度问题、活动选择问题、Prim算法

文章目录 贪心法找零问题&#xff08;change-making problem&#xff09;贪心算法要求基本思想适合求解问题的特征 背包问题0/1背包问题0/1背包问题——贪心法 分数背包问题 任务调度问题活动选择问题活动选择——贪心法最早结束时间优先——最优性证明 Prim算法 贪心法 我在当…

pytorch中nn.Conv1d功能介绍

在使用Conv1d函数时&#xff0c;pytorch默认你的数据是一维的&#xff0c;比如一句话“深度学习”可以用一个一维数组 [深, 度, 学, 习] 表示&#xff0c;这个数据就是一维的。图片是二维数据&#xff0c;它有长宽两个维度。 因此在使用 Conv1d 函数时&#xff0c;输入是一个三…

java八股文面试[多线程]——synchronized锁升级详细流程

偏向锁 偏向锁是JDK6中的重要引进&#xff0c;因为HotSpot作者经过研究实践发现&#xff0c;在大多数情况下&#xff0c;锁不仅不存在多线程竞争&#xff0c;而且总是由同一线程多次获得&#xff0c;为了让线程获得锁的代价更低&#xff0c;引进了偏向锁。 偏向锁是在单线程执…

表白墙程序

目录 一、页面代码部分 二、设计程序 二、实现 doPost​编辑 三、实现 doGet 四、前端代码部分 五、使用数据库存储数据 一、页面代码部分 在之前的一篇博客中&#xff0c;已经写过了表白墙的页面代码实现&#xff0c;这里就不再重复了 页面代码如下&#xff1a; <!…

ubuntu22安装和部署Kettle8.2

前提 kettle是纯java编写的etl开源工具&#xff0c;目前kettle7和kettle8都需要java8或者以上才能正常运行。所以运行kettle前先检查java环境是否正确配置&#xff0c;java版本是否是8或者以上。 kettle安装 1、创建kettle目录&#xff0c;并将kettle的zip包解压到kettle目…

linux开启端口

目录 1.查看防火墙状态 1.1 开启防火墙 1.2 再次查看防火墙状态 2.开启指定端口 3. 重启防火墙 4.重新加载防火墙 5.查看已经开启的端口 1.查看防火墙状态 firewall-cmd --state 如果返回的是 not running&#xff0c;那么需要先开启防火墙&#xff0c; 1.1 开启防火…

机器人中的数值优化(五)——信赖域方法

本系列文章主要是我在学习《数值优化》过程中的一些笔记和相关思考&#xff0c;主要的学习资料是深蓝学院的课程《机器人中的数值优化》和高立编著的《数值最优化方法》等&#xff0c;本系列文章篇数较多&#xff0c;不定期更新&#xff0c;上半部分介绍无约束优化&#xff0c;…

写的一款简易的热点词汇记录工具

项目需要对用户提交的附件、文章、搜索框内容等做热词分析。如下图&#xff1a; 公司有大数据团队。本着不麻烦别人就不麻烦别人的原则&#xff0c;写了一款简易的记录工具&#xff0c;原理也简单&#xff0c;手工在业务插入锚点&#xff0c;用分词器分好词&#xff0c;排掉字…

Ansible-playbook循环学习

循环语句简介 我们在编写playbook的时候&#xff0c;不可避免的要执行一些重复性操作&#xff0c;比如指安装软件包&#xff0c;批量创建用户&#xff0c;操作某个目录下的所有文件等。正如我们所说&#xff0c;ansible一门简单的自动化语言&#xff0c;所以流程控制、循环语句…

Ceph入门到精通-LVS基础知识

LB集群: &#xff08;Load Balancing&#xff09;即负载均衡集群,其目的是为了提高访问的并发量及提升服务器的性能&#xff0c;其 实现方式分为硬件方式和软件方式。 硬件实现方式&#xff1a; 常用的有 F5公司的BIG-IP系列、A10公司的AX系列、Citrix公司的 NetScaler系列…