joefitzgerald / packer-windows

Windows Packer Templates
MIT License
1.64k stars 1.12k forks source link

windows_2012_r2_core.json Produces Vagrant hang on "Waiting for the VM to finish booting" #89

Closed thekevinbrown closed 8 years ago

thekevinbrown commented 10 years ago

Hi there,

I'm trying to build a Windows Server 2012 R2 Core image using packer. Packer completes successfully, and I get two .box files at the end which successfully boot, however vagrant up yields:

$ vagrant up
Bringing machine 'vagrant-windows-2012-r2-core' up with 'vmware_fusion' provider...
==> vagrant-windows-2012-r2-core: Cloning VMware VM: 'windows-2012-r2-core'. This can take some time...
==> vagrant-windows-2012-r2-core: Verifying vmnet devices are healthy...
==> vagrant-windows-2012-r2-core: Preparing network adapters...
==> vagrant-windows-2012-r2-core: Starting the VMware VM...
==> vagrant-windows-2012-r2-core: Waiting for the VM to finish booting...

It then just hangs forever. If I uncomment the v.gui = true line in the Vagrantfile I can see that it successfully boots and logs in as the vagrant user, it's just that vagrant doesn't seem to notice that this completed.

For the moment I'm going to go ahead and use the Windows 2012 R2 image (not Core) so I can keep moving, but does anyone have any experience as to why this wouldn't work?

I used the Vagrantfile template from the repo for 2012 R2 to spin it up with no modifications (other than renaming it from whatever.template and toggling the comment on v.gui as I mentioned above).

I'm on VMWare Fusion 5.0.5 and OS X 10.8.5 if that helps.

kensykora commented 10 years ago

I used to run into this with Virtualbox as well, but it was fixed after a vagrant/virtualbox update. Are you running the latest version of vagrant?

kensykora commented 10 years ago

I'll try to confirm it's working on my side with the latest, but I would suggest you ensure that both Vagrant, VMWare Fusion, and the fusion plugin for vagrant are latest (VMWare is now in v6)

kensykora commented 10 years ago

I was able to confirm this issue earlier this week. Unfortunately it'll take me a bit to try and find a solution to it.

sneal commented 8 years ago

@blargity @kensykora Is this still an issue?

kensykora commented 8 years ago

It might be, I have not tested it since Sept. 2014 nor have I looked into it further. I would imagine enough has changed since then that we should try to reproduce the issue and confirm if it's still an issue or not.

sneal commented 8 years ago

I can't reproduce this issue using VBox, but its possible it could still be happening in VMWare. If that's the case its probably a Vagrant bug. I'm going to close this as I don't believe its an issue with packer-windows.

[~/vagranttest]$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'windows2012r2core'...
==> default: Matching MAC address for NAT networking...
==> default: Setting the name of the VM: vagranttest_default_1454982592899_22637
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
==> default: Forwarding ports...
    default: 3389 (guest) => 3389 (host) (adapter 1)
    default: 22 (guest) => 2222 (host) (adapter 1)
    default: 5985 (guest) => 55985 (host) (adapter 1)
    default: 5986 (guest) => 55986 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
    default: WinRM address: 127.0.0.1:55985
    default: WinRM username: vagrant
    default: WinRM execution_time_limit: PT2H
    default: WinRM transport: plaintext
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
==> default: Mounting shared folders...
    default: /vagrant => /Users/sneal/vagranttest
==> default: Running provisioner: shell...
    default: Running: inline PowerShell script
==> default: Hello, World