vagrant-vsphere icon indicating copy to clipboard operation
vagrant-vsphere copied to clipboard

Tell plugin to wait for Windows sysprep

Open javadevmtl opened this issue 9 years ago • 4 comments

Hi, I ran into a minor issue as I described here: https://groups.google.com/forum/#!topic/vagrant-up/zX1g-HL90JU

The vm creation works well...

But since sysprep takes a bit of time to configure on the first boot, vagrant fails to authenticate with winrm. Vagrant tries to authenticate as soon as the machine is booted up.

So I was wondering if there is a way to wait for Windows to completely come up...

javadevmtl avatar Jul 20 '16 03:07 javadevmtl

I think I can get around this by using triggers, but I'm not quite sure how it all works together.

I'm using the vagrant-triggers plugin, but the boot trigger doesn't seem to fire is it because this provider doesn't implement boot?

javadevmtl avatar Jul 20 '16 17:07 javadevmtl

Never mind. Found an undocumented setting for winrm that lets you retry until it is up. This is important for sysprep windows which takes for ever...

https://github.com/mitchellh/vagrant/issues/7626

javadevmtl avatar Jul 26 '16 15:07 javadevmtl

I had the same problem. config.winrm.max_tries did not fix it for me. I got it working with the changes in #199. This does the same thing as the Chef knife vsphere plugin.

jcaugust avatar Aug 10 '16 15:08 jcaugust

In the main branch it will now wait for windows sysprep. Only problem is that it forces you to wait for customization now.

In #210 I have added support to optionally wait for customization to complete before continuing.

taliesins avatar Nov 17 '16 18:11 taliesins