Support #17275
closedDeploy windows and userdata template
Description
Hello,
I need to deploy a windows template with foreman.
For that purpose, I associated this userdata template with an windows operating system.
<%- powershell = '%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Unrestricted -NoLogo -NoProfile' -%> --- identity: Sysprep: guiRunOnce: commandList: - '<%= powershell %> -Command "invoke-webrequest -Uri <%= foreman_url("built") %>"' guiUnattended: autoLogon: true autoLogonCount: 1 password: plainText: true value: 'testpass123' timeZone: 110 identification: joinWorkgroup: 'MyGroup' licenseFilePrintData: autoMode: 'perSeat' userData: computerName: <%= @host.shortname %> fullName: 'IT' orgName: 'MyOrg' productId: 'D2N9P-3P6X9-2R39C-7RTCD-MDVJX' nicSettingMap: - adapter: dnsDomain: <%= @host.domain %> dnsServerList: - <%= @host.subnet.dns_primary %> globalIPSettings: dnsServerList: - <%= @host.subnet.dns_primary %> dnsSuffixList: - <%= @host.domain %> options: changeSID: true deleteAccounts: false
After deploying a vm, a build property is still on "Pending installation" and to my knowledge none of this data is passed.
Somebody can help me please?
Updated by Dominic Cleal about 8 years ago
- Status changed from New to Feedback
The host must make an HTTP request to http(s)://foreman.example.com/unattended/built at boot, e.g. via a script at startup. Consider adding it to your image.
Please prefer the foreman-users mailing list or IRC channel for support, there are many more people reading it.
Updated by Sam Amara about 8 years ago
That is what I tried to do with this powershell command in a user data template:
'<%= powershell > -Command "invoke-webrequest -Uri <= foreman_url("built") %>"'
When I launch manually this command after startup, it works but not with userdata template. Why?
Thanks for your help.
Updated by Dominic Cleal about 8 years ago
If it logs a request on Foreman then please provide the log, and I may be able to help. If it doesn't reach Foreman then I can't assist - somebody else may, but you're more likely to get a response on the mailing list.
Updated by Sam Amara about 8 years ago
Ok, thanks. I just create a new subject on the foreman users mailing list.
Updated by Anonymous almost 8 years ago
- Status changed from Feedback to Resolved
Updated by Pedro Jose Iglesias over 7 years ago
Sam Amara wrote:
Ok, thanks. I just create a new subject on the foreman users mailing list.
Hi there,
For sure this will sounds like a stupid question but, would you mind to tell where can I find the steps or details to join the Mailing List. Thanks in advanced.
Regards.