Starting Vagrant Machine on Windows 7 [32 bit] is stucked - windows-7

I have just studied Vagrant. My computer is Window 7 [32bit]. I have installed the latest version "vagrant_1.7.2" then I run commands to start visual machine but it has never completed. See picture below:
I try to search to resolve this problem, some one say that Vagrant using "default config" because my computer contain "Cygwin" program but when try to run Vagrant from new computer this bug still occur.
Here is content in my "Viagrantfile"
Vagrant.configure("2") do |config| config.vm.box =
"hashicorp/precise32" end
Please tell me how to solve this issue.
Thanks a lot!

Related

Vagrant VMware Utility driver

First of all I'm sorry if someone already did this question, in this case please paste the link here because I didn't find anything.
I'm learning vagrant, using virtualbox i don't have problem in running VM, but if I would like to use VMware as provider. I encounter this message and I can't find a way to get out of this.
I think everything is well configured but obviously something is wrong.
When I launch vagrant up --provider=vmware_desktop, I have this error message:
Vagrant encountered an unexpected communications error with the
Vagrant VMware Utility driver. Please try to run the command
again. If this error persists, please contact support#hashicorp.com
I'm currently using Fedora 35
Operating System: Fedora Linux 35 (Workstation Edition)
Kernel: Linux 5.17.5-200.fc35.x86_64
Architecture: x86-64
I have followed this thread:
https://github.com/hashicorp/vagrant-vmware-desktop/issues/22
and someone had prepared a nice gist -- which I copied below just in case the gist link wasn't anymore.
My issue was mainly the Vagrant 2.2.19 which somehow was not ok with VMWare. 2.2.18 worked fine. Just make sure you follow the above gist step by step.
https://gist.github.com/sbailliez/f22db6434ac84eccb6d3c8833c85ad92
My issue was mainly the Vagrant 2.2.19 which somehow was not ok with VMWare. 2.2.18 worked fine. Just make sure you follow the above gist step by step.
Vagrant and VMWare Tech Preview on Apple M1 Pro
This document summarizes notes taken while to make the VMWare Tech preview work on Apple M1 Pro, it originated
from discussions in https://github.com/hashicorp/vagrant-vmware-desktop/issues/22
Installing Rosetta
First install Rosetta if not already done, this is needed to run x86 code:
/usr/sbin/softwareupdate --install-rosetta --agree-to-license
Installing Vagrant
Install Vagrant via brew or install it manually. Note that I use 2.2.18 as 2.2.19 did not work for me. (YMMV)
brew install vagrant#2.2.18
Installing VMWare Fusion Tech Preview
You will need to create an account on vmware as it needs user and key information that are user specific.
The registration process is kinda convoluted. Be careful about passwords as the password needs to be less than 20 characters and there are no error messages for this.
You can download the tech preview via the download page.
Once this is installed you will NEED to create a symlink as the vagrant vmware utility etc.. assumes that vmware is installed in a specific directory and the tech preview is installed in a different one.
ln -s /Applications/VMWare\ Fusion\ Tech\ Preview.app /Applications/VMWare\ Fusion.app
Installing Vagrant VMWare provider
It requires two steps. This is detailed in the documentation but follow the steps below:
First go to Vagrant vmware Utility and download the binary and install it. It says x86_64 but it is fine.
The direct link is:
https://releases.hashicorp.com/vagrant-vmware-utility/1.0.21/vagrant-vmware-utility_1.0.21_x86_64.dmg
It needs to be version 1.0.21
Next install the provider:
vagrant plugin install vagrant-vmware-desktop
Create a Vagrant file
Create a file Vagrantfile
Vagrant.configure("2") do |config|
config.vm.box = "spox/ubuntu-arm"
config.vm.box_version = "1.0.0"
end
Run vagrant
vagrant up
and then
vagrant ssh
Hopefully this should work and you should find yourself with mostly everything working.
Troubleshooting
I have observed various issues that makes the whole experience unstable or creating conflicts.
vagrant 2.2.19 is broken
I have had issues trying to run vagrant 2.2.19. Use 2.2.18
vagrant-vmware provider forwarded ports bound
If you declare forwarding port on your box, for some reasons the provider persists them and keeps it bound in LISTEN state even after you do a vagrant halt.
You can check this using something like:
sudo lsof -i -P | grep LISTEN | grep 'vagrant-v'
You can see the ports are stored in:
cat /opt/vagrant-vmware-desktop/settings/portforwarding.json
To stop the provider use:
sudo launchctl unload -w /Library/LaunchDaemons/com.vagrant.vagrant-vmware-utility.plist
To start it again, use load instead of unload.
nfs exports conflicts
If your vagrant box uses nfs, it seems to pollute the /etc/exports file with duplicate or stale entries over time which will cause vagrant to get angry at you at some point. You may need to prune the entries. It seems related to vagrant#11418
I encountered this same issue you had with the architecture compatibility while trying to set up VM on my Mac M1. Found my solution in this GitHub thread
I just added this lines to the Vagrantfile
config.vm.provider :vmware_desktop do |v|
v.vmx["ethernet0.pcislotnumber"] = "160"
end

Updated Mac to MacOS Monterey and now vagrant up isn't working

I updated my mac to Monterey. Then I tried to vagrant up in a project after I updated the virtual box and allowed permission in my System Preferences > Security & Privacy.
I get this error:
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.
Command: ["startvm", "2f108a05-a574-4e42-b03d-36b2abfa8d26", "--type", "headless"]
Stderr: VBoxManage: error: The virtual machine 'projectwebsite.test' has terminated unexpectedly during startup because of signal 10
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component MachineWrap, interface IMachine
What should I do to fix it? I looked at solutions and it said something about GUI and Headless. I came across this article saying that VBoxHeadline doesn't run in macOS Monterey. (https://www.virtualbox.org/ticket/20636). So I have to configure vagrant to run in gui
So the options I have:
roll back to previous MacOS version
Configure vagrant
What else?
Question: How do I configure vagrant? This article is confusing: https://www.vagrantup.com/docs/providers/virtualbox/configuration#gui-vs-headless. Where do I go to add this code?
config.vm.provider "virtualbox" do |v|
v.gui = true
end
So confused about all those things.
This is definitely a fix — https://github.com/hashicorp/vagrant/issues/12557#issuecomment-958183899
Two more clues:
I may add that if your local website still does not open as if not loading at all, then you should modify macos /etc/hosts and change ip address to 192.168.56.* (* — put any number, but it should be under 192.168.56., as per new network configuration changes).
If the php still not working, you might need to restart an fpm:
sudo service php7.4-fpm restart
The new build of VirtualBox from this tickets works for me.
https://www.virtualbox.org/ticket/20636
https://www.virtualbox.org/ticket/20637
Where do I go to add this code?
You need to put it into your Vagrantfile
Example:
Vagrant.configure("2") do |config|
config.vm.box = "hashicorp/bionic64"
config.vm.provider "virtualbox" do |vb|
v.gui = true
end
end
Reinstall the virtualbox with homebrew in a terminal
brew install virtualbox

Vagrant synced folder type NFS with windows 10 error

I upgraded from Windows 8 to Windows 10, and I've solved many problems with this github issue:
https://laracasts.com/discuss/channels/general-discussion/windows-10-vagrant-virtualbox-homestead
But when I call vagrant up, vagrant says:
vagrant requested NFS version or transport protocol is not supported
My vagrantfile:
config.vm.synced_folder "data", "/vagrant", type:"nfs"
When I remove type: "nfs" it's work but I need that to speed up my vm....
Any ideas?
I had the same trouble - and have gone back to Windows 8.1 until I know this is resolved.
However, have you checked that your Vagrant installation under W10 has the winnfsd plugin installed?
Try:
vagrant plugin list
to see if it is installed.
If not,
vagrant plugin install vagrant-winnfsd
will install it.
Can't guarantee anything, but it's a useful first step.

Vagrant VMWare Plugin - Show VM in VMWare Workstation

I'm using Vagrant with the VMWare plugin. I've noticed that VMs upped using Vagrant are not displayed automatically in the VMWare Workstation GUI.
I can (manually) open them using File->Open... and selecting the .vagrant\machines\puppet\vmware_workstation\some-unique-id...vmx file. But that's a bit annoying. Using VirtualBox, vagrant VMs are automatically added and removed from the Virtualbox GUI.
Am I missing something or is that just not supported for VMWare boxes?
Reaons why I'm not just sticking with vagrant commands:
To quickly see which machines are running (I have multiple machine setups and yes, I know vagrant status does the same...)
To create and restore snapshots (I have a time consuming provisioning and sometimes it's nice to just restore to a snapshot while testing)
I didn't get #mmey's exact solution to work, but putting this in the Vagrantfile worked for me:
config.vm.provider "vmware_fusion" do |v|
v.gui = true
end
Documentation
I don't think there's much to do about #1, it looks like VMWare limitation.
However you can use this Vagrant plugin to add snapshot ability from the command line.
I found the (not so surprising) answer to my question: Just disable headless mode by setting config.vm.provider.gui=true in the Vagrantfile (as described at https://docs.vagrantup.com/v2/vmware/configuration.html).

Running Vagrant 1.2.2 on VirtualBox in the Terminal would get the machine stuck in debian-login

I am currently setting up Vagrant 1.2.2 on my Mac OS X 10.9.2 using VirtualBox.
Using the command vagrant up under my dev/official directory, I would get this issue: VirtualBox would boot vagrant up, but it would be stuck on this screen:
Debian GNU/Linux 7 vagrant-debian tty1
vagrant-debian login:
When it times out, it will give me a SSH error.
This only happens when I boot the machine up via the Terminal, since with the GUI, I can put in the login credentials vagrant and vagrant for username and password respectively. I do not want to use the GUI; I want to use the Terminal to automatically log me into the machine.
What I tried is, I point vagrant to my private key using this within Vagrantfile:
Vagrant.configure("2") do |config|
config.ssh.private_key_path = "~/.ssh/github_rsa"
config.ssh.forward_agent = true
end
~/.ssh/github_rsa is the extension to my private key. When I check vagrant ssh-config, I noticed the IdentityFile points to IdentityFile "/Users/my_name/.vagrant.d/insecure_private_key", which is not the right private key. What I did to try to solve this issue was manually copy my github_rsa private key to that directory (and naming the old one to insecure_private_key_old). That did not solve an issue, and instead, actually gave me another issue:
/Applications/Vagrant/embedded/gems/gems/net-ssh-2.6.7/lib/net/ssh/key_factory.rb:77:inread': Could not parse PKey: no start line (ArgumentError)`
This is one of the many errors that popped up. Seems to be a gems issue.
I am not quite sure what the issue is, and if anyone of you have encountered this issue before, please let me know.
EDIT: I have tried to uninstall net-ssh and installing an older version of net-ssh as suggested by a thread I found online by the name "ArgumentError: Could not parse PKey: no start line", but that did not seem to help the issue either.

Resources