Project

General

Profile

Actions

Support #17275

closed

Deploy windows and userdata template

Added by Sam Amara over 7 years ago. Updated over 6 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Unattended installations
Target version:
-
Triaged:
Fixed in Releases:
Found in Releases:

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?

Actions #1

Updated by Dominic Cleal over 7 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.

Actions #2

Updated by Sam Amara over 7 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.

Actions #3

Updated by Dominic Cleal over 7 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.

Actions #4

Updated by Sam Amara over 7 years ago

Ok, thanks. I just create a new subject on the foreman users mailing list.

Actions #5

Updated by Anonymous about 7 years ago

  • Status changed from Feedback to Resolved
Actions #6

Updated by Pedro Jose Iglesias over 6 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.

Actions

Also available in: Atom PDF