Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Instructions not working #34

Open
teknowledgist opened this issue Feb 19, 2019 · 4 comments · Fixed by #44
Open

Instructions not working #34

teknowledgist opened this issue Feb 19, 2019 · 4 comments · Fixed by #44

Comments

@teknowledgist
Copy link

I really have no idea how Vagrant works, but walking through the instructions apparently isn't enough:

PS C:\chocolatey-test-environment> vagrant sandbox on
[default] Starting sandbox mode...
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
PS C:\chocolatey-test-environment> vagrant provision
==> default: Running provisioner: shell...
Guest-specific operations were attempted on a machine that is not
ready for guest communication. This should not happen and a bug
should be reported.
PS C:\chocolatey-test-environment> vagrant sandbox rollback
[default] Rolling back the virtual machine...
VBoxManage.exe: error: Machine '0a9cbe89-3445-43eb-a029-bb0e81a53035' is not currently running
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
PS C:\chocolatey-test-environment> vagrant provision
==> default: Running provisioner: shell...
Guest-specific operations were attempted on a machine that is not
ready for guest communication. This should not happen and a bug
should be reported.
PS C:\chocolatey-test-environment> vagrant halt
==> default: Attempting graceful shutdown of VM...
    default: Guest communication could not be established! This is usually because
    default: SSH is not running, the authentication information was changed,
    default: or some other networking issue. Vagrant will force halt, if
    default: capable.
==> default: Forcing shutdown of VM...
PS C:\chocolatey-test-environment> vagrant destroy
    default: Are you sure you want to destroy the 'default' VM? [y/N] y
==> default: Destroying VM and associated drives...
PS C:\chocolatey-test-environment> vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Cloning VM...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'ferventcoder/win2012r2-x64-nocm' version '1.0.0' is up to date...
==> default: Setting the name of the VM: chocolatey-test-environment_default_1550549316175_62876
==> default: Fixed port collision for 5985 => 5985. Now on port 2250.
Vagrant found a port collision for the specified port and virtual machine.
While this port was marked to be auto-corrected, the ports in the
auto-correction range are all also used.

VM: default
Forwarded port: 3389 => 3389
PS C:\chocolatey-test-environment> vagrant sandbox on
[default] Starting sandbox mode...
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
PS C:\chocolatey-test-environment> vagrant provision
==> default: VM is not currently running. Please, first bring it up with `vagrant up` then run this command.

vagrant destroy didn't appear to actually destroy anything. How can I back out entirely and start again? (and will that make any difference, or do I need to be fixing something else?)

@teknowledgist
Copy link
Author

Started anew and get:

PS C:\chocolatey-test-environment> vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Preparing master VM for linked clones...
    default: This is a one time operation. Once the master VM is prepared,
    default: it will be used as a base for linked clones, making the creation
    default: of new VMs take milliseconds on a modern system.
==> default: Importing base box 'ferventcoder/win2012r2-x64-nocm'...
==> default: Cloning VM...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'ferventcoder/win2012r2-x64-nocm' version '1.0.0' is up to date...
==> default: Setting the name of the VM: chocolatey-test-environment_default_1569467613694_21019
==> default: Fixed port collision for 5985 => 5985. Now on port 2250.
Vagrant found a port collision for the specified port and virtual machine.
While this port was marked to be auto-corrected, the ports in the
auto-correction range are all also used.

VM: default
Forwarded port: 3389 => 3389
PS C:\chocolatey-test-environment> vagrant sandbox on
[default] Starting sandbox mode...
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
PS C:\chocolatey-test-environment> vagrant provision
==> default: VM is not currently running. Please, first bring it up with `vagrant up` then run this command.
PS C:\chocolatey-test-environment> vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'ferventcoder/win2012r2-x64-nocm' version '1.0.0' is up to date...
==> default: Fixed port collision for 5985 => 5985. Now on port 2250.
Vagrant found a port collision for the specified port and virtual machine.
While this port was marked to be auto-corrected, the ports in the
auto-correction range are all also used.

VM: default
Forwarded port: 3389 => 3389
PS C:\chocolatey-test-environment> vagrant provision
==> default: VM is not currently running. Please, first bring it up with `vagrant up` then run this command.

Clearly, there was something missing from the instructions. Not knowing why vagrant up wasn't being recognized as having been done, I started the vm in the virtual box GUI.

PS C:\chocolatey-test-environment> vagrant provision
==> default: Running provisioner: shell...
Guest-specific operations were attempted on a machine that is not
ready for guest communication. This should not happen and a bug
should be reported.

I have a Test environment VM that I can start up, but C:\Packages isn't there, and Chocolaty isn't installed for me to manually test.

@mkevenaar
Copy link
Member

@teknowledgist I had the same thing. You need to do the following:

It is basically this message that causes problems:

Vagrant found a port collision for the specified port and virtual machine.

  • Add the following after this line
    config.winrm.port = 55985
  • Edit this line, change host: 5985 to host: 55985

You probably have winrm configured on your machine (e.g. forced from a domain)

Hope this helps!

Maurice

mkevenaar added a commit to mkevenaar/chocolatey-test-environment that referenced this issue Oct 1, 2019
Changing the port prevents collisions on system that have
WinRM configured. This makes it even easyer for everybody
to use the test-environment
mkevenaar added a commit to mkevenaar/chocolatey-test-environment that referenced this issue Oct 1, 2019
Changing the port prevents collisions on system that have
WinRM configured. This makes it even easier for everybody
to use the test-environment
@teknowledgist
Copy link
Author

@mkevenaar Thank you for the suggestion. Clearly this isn't an urgent issue for me since I'm only now again needing the test environment.

However, I'm still encountering the same/similar problem:

PS C:\chocolatey-test-environment> vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'ferventcoder/win2012r2-x64-nocm' version '1.0.0' is up to date...
==> default: Fixed port collision for 55985 => 55985. Now on port 2250.
Vagrant found a port collision for the specified port and virtual machine.
While this port was marked to be auto-corrected, the ports in the
auto-correction range are all also used.

VM: default
Forwarded port: 3389 => 3389
PS C:\chocolatey-test-environment> vagrant sandbox on
[default] Starting sandbox mode...
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
PS C:\chocolatey-test-environment> vagrant provision
==> default: VM is not currently running. Please, first bring it up with `vagrant up` then run this command.
PS C:\chocolatey-test-environment> vagrant sandbox rollback
[default] Rolling back the virtual machine...
VBoxManage.exe: error: Machine '52055597-8f45-4450-a19d-ca15f5ce11a7' is not currently running
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
PS C:\chocolatey-test-environment> vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'ferventcoder/win2012r2-x64-nocm' version '1.0.0' is up to date...
==> default: Running provisioner: shell...
Guest-specific operations were attempted on a machine that is not
ready for guest communication. This should not happen and a bug
should be reported.

ferventcoder added a commit that referenced this issue Jun 2, 2020
@ferventcoder
Copy link
Contributor

It appears there may be more going on here. I think it's likely due to a very older Vbox extensions on the box that need upgraded. Perhaps we should look into adding vb-guest to the mix here to upgrade that on the vagrant box? It does add quite a bit of time, but things tend to work much smoother after that.

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

Successfully merging a pull request may close this issue.

3 participants