GitHub user jeanvetorello added a comment to the discussion: Need advice on creating password-enabled Windows templates.
I had the same issue when I was using NFS Ganesha on top of Ceph. When I switched to a simple NFS server running on a regular Linux host, it worked fine. In my case, I believe the problem was that the way I installed Ganesha didn’t allow proper negotiation of NFS protocol versions (3, 4.0, 4.1, or 4.2). So my workaround was on the NFS side — once I installed a standard Linux NFS server, it automatically allowed protocol negotiation, and by default, it seemed that libvirt was using version 3. Because of this, I even opened an improvement request in CloudStack to address that behavior. I’m also currently reviewing my Ceph installation to support both Ganesha and the native NFS service properly. https://github.com/apache/cloudstack/issues/11757 > Here is a guide on how i prepare my windows templates > > * I download windows server vhd file from microsoft's website.(personal > preference, instead of installing it from ISO) > * I convert the vhd file to qcow2 using qemu-img utility > > ``` > qemu-img convert -p -f vpc -O qcow2 windows_server_2019.vhd > windows_server_2019.qcow2 > ``` > > * Upload the qcow2 file to cloudstack > * Launch an instance from the uploaded template and make some customizations > * install virtio drivers and qemu-guest-agent > * enable remote desktop > * update the system > * Install cloudbase-init, and at the last steps of syspreping and sutting > down the system before continuing > * I edit the contents of C:\Program Files\Cloudbase > Solutions\Cloudbase-Init\conf\cloudbase-init.conf > > ``` > [DEFAULT] > username=Administrator > groups=Administrators > inject_user_password=true > first_logon_behaviour=no > rdp_set_keepalive=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 > log_dir=C:\Program Files\Cloudbase Solutions\Cloudbase-Init\log\ > log_file=cloudbase-init-unattend.log > default_log_levels=comtypes=INFO,suds=INFO,iso8601=WARN,requests=WARN > logging_serial_port_settings=COM1,115200,N,8 > mtu_use_dhcp_config=true > ntp_use_dhcp_config=true > local_scripts_path=C:\Program Files\Cloudbase > Solutions\Cloudbase-Init\LocalScripts\ > allow_reboot=false > check_latest_version=false > stop_service_on_exit=false > netbios_host_name_compatibility=true > metadata_services=cloudbaseinit.metadata.services.cloudstack.CloudStack,cloudbaseinit.metadata.services.configdrive.ConfigDriveService > plugins = > cloudbaseinit.plugins.common.mtu.MTUPlugin,cloudbaseinit.plugins.windows.ntpclient.NTPClientPlugin,cloudbaseinit.plugins.common.sethostname.SetHostNamePlugin,cloudbaseinit.plugins.windows.createuser.CreateUserPlugin,cloudbaseinit.plugins.common.networkconfig.NetworkConfigPlugin,cloudbaseinit.plugins.windows.licensing.WindowsLicensingPlugin,cloudbaseinit.plugins.common.sshpublickeys.SetUserSSHPublicKeysPlugin,cloudbaseinit.plugins.windows.extendvolumes.ExtendVolumesPlugin,cloudbaseinit.plugins.common.userdata.UserDataPlugin,cloudbaseinit.plugins.common.setuserpassword.SetUserPasswordPlugin,cloudbaseinit.plugins.windows.winrmlistener.ConfigWinRMListenerPlugin,cloudbaseinit.plugins.windows.winrmcertificateauth.ConfigWinRMCertificateAuthPlugin,cloudbaseinit.plugins.common.localscripts.LocalScriptsPlugin > [cloudstack] > metadata_base_url=http://192.168.1.1/ > ``` > > * you might need to change the metadata_base_url value > * then i edit the contents of C:\Program Files\Cloudbase > Solutions\Cloudbase-Init\conf\cloudbase-init-unattend.conf > > ``` > [DEFAULT] > username=Administrator > groups=Administrators > inject_user_password=true > first_logon_behaviour=no > rdp_set_keepalive=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 > log_dir=C:\Program Files\Cloudbase Solutions\Cloudbase-Init\log\ > log_file=cloudbase-init-unattend.log > default_log_levels=comtypes=INFO,suds=INFO,iso8601=WARN,requests=WARN > logging_serial_port_settings=COM1,115200,N,8 > mtu_use_dhcp_config=true > ntp_use_dhcp_config=true > local_scripts_path=C:\Program Files\Cloudbase > Solutions\Cloudbase-Init\LocalScripts\ > allow_reboot=false > check_latest_version=false > stop_service_on_exit=false > netbios_host_name_compatibility=true > metadata_services=cloudbaseinit.metadata.services.cloudstack.CloudStack,cloudbaseinit.metadata.services.configdrive.ConfigDriveService > plugins = > cloudbaseinit.plugins.common.mtu.MTUPlugin,cloudbaseinit.plugins.common.sethostname.SetHostNamePlugin > [cloudstack] > metadata_base_url=http://192.168.1.1/ > ``` > > * then I complete the cloudbase-init installation by syspreping and shutting > down > * then I convert the instance root volume to template. > > If password injection is not working or any cloudbase-init issue in general > it is help full to detach the root volume of the not working instance and try > to look for why cloudbase-init failed with in the logs GitHub link: https://github.com/apache/cloudstack/discussions/11792#discussioncomment-14614977 ---- This is an automatically sent email for [email protected]. To unsubscribe, please send an email to: [email protected]
