Skip to content
This repository has been archived by the owner on Jul 1, 2021. It is now read-only.

Vmware Customization doesn't (seem to) pick up run-once commands #79

Open
finkelamein opened this issue Jun 14, 2016 · 4 comments
Open

Comments

@finkelamein
Copy link

Coming from a problem noticed in foreman vpshere integration, through fog-vsphere, ending over here.
See:
fog/fog-vsphere#37 (comment)
http://projects.theforeman.org/issues/14979

The following hash get's passed from foreman, through fog-vsphere, but never makes it to the customization. (at least, it doesn't execute the commands, and no evidence of them is found in any of the run once parts in windows.

hash that get's passed to rbvmomi

{"customization_spec"=>{},
 "globalIPSettings"=>{"dnsServerList"=>["8.8.8.8"], "dnsSuffixList"=>["local.lan"]},
 "identity"=>
  {"Sysprep"=>
    {"guiRunOnce"=>nil,
     "commandList"=>
      ["%SystemRoot%\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -ExecutionPolicy Unrestricted -NoLogo -NoProfile -Command \"echo wood > C:\\test.txt\"",
       "%SystemRoot%\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -ExecutionPolicy Unrestricted -NoLogo -NoProfile -Command \"(New-Object System.Net.WebClient).DownloadFile(\\\"http://yum.beheer.lan/windows/puppet/installpuppet.ps1\\\", \\\"c:\\installpuppet.ps1\\\")\"",
       "%SystemRoot%\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -ExecutionPolicy Unrestricted -NoLogo -NoProfile -Command \"& \\\".\\installpuppet.ps1 -PuppetVersion 3.8.7-x64\\\"\"",
       "%SystemRoot%\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -ExecutionPolicy Unrestricted -NoLogo -NoProfile -Command \"(New-Object System.Net.WebClient).DownloadFile(\\\"http://foreman.local.lan/unattended/built?token=\\\", \\\"c:\\foremaninstalled.txt\\\")\""],
     "guiUnattended"=>{"autoLogon"=>true, "autoLogonCount"=>1, "password"=>{"plainText"=>true, "value"=>"password"}, "timeZone"=>110},
     "identification"=>{"joinWorkgroup"=>"WORKGROUP"},
     "licenseFilePrintData"=>{"autoMode"=>"perSeat"},
     "userData"=>{"computerName"=>"w2k8r2-test", "fullName"=>"fullname", "orgName"=>"Organization", "productId"=>"Valid VLK license"}}},
 "nicSettingMap"=>
  [{"adapter"=>
     {"dnsDomain"=>"beheer.lan", "dnsServerList"=>["8.8.8.8"], "gateway"=>["1.2.3.4"], "ip"=>"1.2.3.5", "subnetMask"=>"255.255.255.0"}}],
 "options"=>{"changeSID"=>true, "deleteAccounts"=>"false`"}}

Any idea what's going on?

@jrgarcia
Copy link
Contributor

jrgarcia commented Aug 3, 2016

So we meet again. 😄 I'm going to do a quick glance at all the PRs and issues and handle all the simple stuff now. I assure you I'll come back to this as soon as I've done a first pass.

@jrgarcia
Copy link
Contributor

jrgarcia commented Mar 1, 2017

@finkelamein Sorry it took so long to get back to you. Is this still an issue? If so, I can take a look again. Just let me know whether I should close this or investigate. Thanks!

@finkelamein
Copy link
Author

finkelamein commented Mar 2, 2017 via email

@MaartenMol
Copy link

MaartenMol commented Feb 12, 2020

@finkelamein Sorry it took so long to get back to you. Is this still an issue? If so, I can take a look again. Just let me know whether I should close this or investigate. Thanks!

This is still an issue. I have just setup a fresh vCenter and Foreman. Trying to accomplish automatic provisioning of Windows VMs with Puppet agent. However, the commands are not ran anytime.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants