pve制作cloudinit windows
参考网址:https://blog.csdn.net/feitianyul/article/details/113683909
https://forum.proxmox.com/threads/windows-cloud-init-working.83511/
https://foxi.buduanwang.vip/windows/1789.html/
1、首先在pve上创建一个winodws虚拟机,创建完成后,添加 硬件-->串行端口
2、下载cloudinit可执行程序
https://cloudbase.it/cloudbase-init/
或者
https://github.com/cloudbase/cloudbase-init/releases
3、配置安装Windows,然后执行
假设虚拟机ID为102
qm set 102 --ide2 local-lvm:cloudinit
qm set 102 --boot c --bootdisk scsi0
qm set 102 --serial0 socket
qm set 102 --citype configdrive2
4、上传上面下载的exe;执行
5、修改C:\Program Files\Cloudbase Solutions\Cloudbase-Init\conf文件夹下cloudbaset-init.conf文件
[DEFAULT]
username=Administrator
groups=Administrators
inject_user_password=no
config_drive_raw_hhd=true
config_drive_cdrom=true
config_drive_vfat=true
bsdtar_path=C:\Program Files\Cloudbase Solutions\Cloudbase-Init\bin\bsdtar.exe
mtools_path=C:\Program Files\Cloudbase Solutions\Cloudbase-Init\bin
verbose=true
debug=true
logdir=C:\Program Files\Cloudbase Solutions\Cloudbase-Init\log
logfile=cloudbase-init.log
default_log_levels=comtypes=INFO,suds=INFO,iso8601=WARN,requests=WARN
logging_serial_port_settings=COM1,115200,N,8
mtu_use_dhcp_config=false
ntp_use_dhcp_config=false
metadata_services=cloudbaseinit.metadata.services.configdrive.ConfigDriveService
local_scripts_path=C:\Program Files\Cloudbase Solutions\Cloudbase-Init\LocalScripts
check_latest_version=true
plugins=cloudbaseinit.plugins.common.networkconfig.NetworkConfigPlugin,cloudbaseinit.plugins.common.mtu.MTUPlugin,cloudbaseinit.plugins.common.sethostname.SetHostNamePlugin,cloudbaseinit.plugins.windows.extendvolumes.ExtendVolumesPlugin,cloudbaseinit.plugins.common.sshpublickeys.SetUserSSHPublicKeysPlugin,cloudbaseinit.plugins.common.setuserpassword.SetUserPasswordPlugin
6、设置Administrator用户可用;修改完成后关机就可以执行cloudinit操作
由于修改密码需要修改pve底层源码,这里未操作