rbvmomi icon indicating copy to clipboard operation
rbvmomi copied to clipboard

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

Open finkelamein opened this issue 8 years ago • 4 comments

Coming from a problem noticed in foreman vpshere integration, through fog-vsphere, ending over here. See: https://github.com/fog/fog-vsphere/issues/37#issuecomment-224605166 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?

finkelamein avatar Jun 14 '16 08:06 finkelamein

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 avatar Aug 03 '16 15:08 jrgarcia

@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!

jrgarcia avatar Mar 01 '17 23:03 jrgarcia

Hi, I'd guess it's still an issue, but I switched jobs since then, and I can't test this anymore for lack of both foreman and VMware farm.

Feel free to do with this as you want

On Mar 2, 2017 00:10, "J.R. Garcia" [email protected] wrote:

@finkelamein https://github.com/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!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/vmware/rbvmomi/issues/79#issuecomment-283501783, or mute the thread https://github.com/notifications/unsubscribe-auth/AFsWkGApJ-W_vy0XmDVAWmaq3nDjV_8Hks5rhfrKgaJpZM4I1E8w .

finkelamein avatar Mar 02 '17 10:03 finkelamein

@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.

MaartenMol avatar Feb 12 '20 09:02 MaartenMol