Does "Vagrant package" command work in vmware fusion? - vagrant

I have VMWARE fusion on my macbook pro. In that I have a VM ,which was generated using vagrant. This VM has some changes and I want to create a .box file of out this VM.
I did see the post for the same in this forum. But did not find correct one.
I tried vagrant package but it is not working. I got the following error
The "package" command is not supported with VMware. We recommend
taking a look at Packer (www.packer.io) as an option for creating
VMware images
Can anyone throw some light on the same?

vagrant package currently works only for virtualbox VM as said from doc
This packages a currently running VirtualBox environment into a re-usable box. This command can only be used with other providers based on the provider implementation and if the provider supports it. A future version of Vagrant will address packaging boxes for other providers. Until then, they must be made by hand.

Related

"No usable default provider could be found for your system" with VirtualBox

When trying to init a Vagrant box with VirtualBox, I keep getting this error:
No usable default provider could be found for your system.
Vagrant relies on interactions with 3rd party systems, known as
"providers", to provide Vagrant with resources to run development
environments. Examples are VirtualBox, VMware, Hyper-V.
The easiest solution to this message is to install VirtualBox, which
is available for free on all major platforms.
If you believe you already have a provider available, make sure it is
properly installed and configured. You can see more details about why
a particular provider isn't working by forcing usage with vagrant up
--provider=PROVIDER, which should give you a more specific error message for that particular provider.
After some searching it seems that Vagrant has compability issues with particular versions of VirtualBox. I'm running Vagrant 2.0 together with VirtualBox 5.2 on MacOS High Sierra. Is this simply not possible, or is there a workaround?
Update: It is a compatibility issue between Vagrant and VirtualBox – tried installing VirtualBox 5.1.14 instead and it works with Vagrant 2.0.
You can also use it with VirtualBox 5.2 with this patch:
https://gist.github.com/roktas/ec34960d2e5d74c3cc4f35bc78bc676d

What we install in Virtualbox using Vagrant?

I just started learning Vagrant and succeeded in using it. I went through this vagrantbox.es where we "download" the "templates".
I have some doubts and would be great if anyone can explain me:
1) Vagrant --> My understanding is t hat it helps in automating installing the Virtual machines in Virtualization software like Virtualbox. Is this correct?
2) Now, as per the instructions that I followed in one of the video tutorials, we need to 'download' the VM, from this link.
My doubt is what are we downloading from the link in point #2? Using Vagrant, are we downloading a VM (and which gets installed into Virtualbox, for example?). Can't we use any .iso image and let vagrant install it? I am bit confused here.
Can anyone who has used vagrant explain what exactly are we downloading?
2) Now, as per the instructions that I followed in one of the video tutorials, we need to 'download' the VM, from this link.
Must be a bit dated tutorials, even though it is still a good reference, nowadays people will download boxes from https://atlas.hashicorp.com/boxes/search. The platform is officially supported by hashicorp but everyone can upload boxes into the platform, and you can directly reference boxes from atlas such as ubuntu/trusty64 in your vagrantfile and vagrant will know how to download the box and install it for you so it saves you some steps.
My doubt is what are we downloading from the link in point #2? Using Vagrant, are we downloading a VM (and which gets installed into Virtualbox, for example?). Can't we use any .iso image and let vagrant install it? I am bit confused here.
There are some 'official' box supported by hashicorp. Some organization like laravel pushes their own official boxes (like laravel/homestead and they support virtual box and vmware provider). It will be up to you to review the box you reference and make sure about its source.
you can create your own box from the OS iso using tool such as packer you will find plenty of available packer templates on github to create boxes for different OS flavors
And finally, are these images "full" OS plus the tools (e.g. tomcat, php as you described)
This will depend - in the case of Laravel they would provide a box with OS + the stack but generally the boxes are minimal (and you want to keep it this way). You will provision this using a tool of your choice (shell, ansible, puppet ...)

Vagrant on Windows and access to shared folders

I'm working with Vagrant to leverage development environments for my developer teams. Their host OS is Windows, the Vagrant development box is Ubuntu. But most important, our boxes will be stored on our NAS, in folder shared with samba.
My own PC runs Fedora, and my Vagrant file contains this code:
config.vm.box_url = "smb://<nas>/boxes/ubuntu-1404-64.box"
From Fedora, this works. From Windows, this doesn't with the following error:
protocol smb not supported or disabled in libcurl
I've tried on Windows with file://, but this logically doesn't work. So, here I am, looking for a good solution. I know a possible workaround is to mount the network share on each Windows PC, but I don't like this solution.
Any idea? Thanks.
I'm not sure what's the status now, but in the past you could've done it by using file:////server/path/file, not sure if its still possible.
P.S #1
box_url setting can be an array of possible URLs. So try just putting all possible combination for every OS there to create multiplatform Vagrantfile.
P.S #2
We solved this by hosting the box over local httpd and not using NFS/SMB.

VirtualBox: "Warning: Connection timeout" when trying to run Laravel Homestead VM or x64 VMs

Trying to solve my problem I did the next:
Added 'Ubuntu_64' to config file.
Switched my WiFi off (saw this solution at Laravel forums) before 'vagrant up' execution.
Enabled GUI.
Rolled the VirtualBox and its extension back (also from Laravel forums).
The VMs which were successfully run with Vagrant are the Debian Wheezy 7.5 x32 built with puphpet and precise32.
As we can see, only x32 VMs could be run on my machine. I don't know why.
Here is my machine info:
OS: Ubuntu 12.04 64
Processor: AMD A8-4500M, 2 cores
Virtualization is enabled in BIOS. See screenshot similar to my BIOS view: screenshot
The latest Vagrant, VirtualBox and VirtualBox Extensions pack are installed
my user is added to virtualbox group
Thanks in advance.
Dude, your question helped me to fix my problem!
I was getting this connection timeout, turned my wifi off and bam! All working fine!
Double check if your ubuntu is really 64 bit.
I got some problems with some linux architectures for AMD in the pest!
There are a few and sometimes they can be a headache.. I think I got this problem with centos, it was i686 instead of simple x64. I don't really know the difference but what you can try doing is:
Instead of adding the homestead box (vagrant box add laravel/homestead)
Why dont you try adding a simple ubuntu-32 machine and then you run vagrant up.
I dont really know if it's going to work, but it's worth trying!
Thanks again for your answer, it really helped me

Vagrant Errors after Windows 8.1 update

After a recent update of my OS from Windows 8 to Windows 8.1 my vagrant setup has stopped working.
I try running vagrant up on boxes and I get the following:
$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
[default] Booting VM...
[default] Waiting for machine to boot. This may take a few minutes...
The guest machine entered an invalid state while waiting for it to boot Valid states are 'starting, running'. The machine is in the 'poweroff' state. Please verify everything is configured properly and try again.
I've tried updating vagrant. I've updated VirtualBox to 4.3. I've tried specifically setting VirtualBox to run as Administrator and in compatibility mode for Windows 8. That didn't work. Also tried compatibility mode for Windows 7. No dice.
Anyone else having these problems? Windows 8.1 is to new to find reports of this through Google searching. hopefully someone here can help out.
So, here is how I actually managed to fix it.
The newest versions of Vagrant (1.3.5) and VirtualBox (4.3.4) do not play together at all on Windows. So, I kept Vagrant 1.3.5 and went down to VirtualBox 4.2.2.
Once you have that, you have to get rid of a couple folders so that everything resets itself correctly:
Users\<<USERNAME>>\.VirtualBox
Users\<<USERNAME>>\.vagrant.d
Delete those before trying to run
vagrant up
With that, I was able to get everything running again. However, I have noticed that running vagrant up does go a tad slower than it had been previously. I can live with that though.
Thank you for all of your help and suggestions.
Ran into this problem and figured out the problem. Turns out I did not have the proper virtualization settings enabled in my bios.
Vagrant emitted a helpful error:
If the provider you're using has a GUI that comes with it, it is often
helpful to open that and watch the machine, since the GUI often has
more helpful error messages than Vagrant can retrieve.
For example, if you're using VirtualBox, run vagrant up while the
VirtualBox GUI is open.
Followed the instructions and tried to power on the vm via the GUI and was greeted with this error:
Was able to vagrant up after turning on the proper settings in my bios.
OS: Windows 8.1, Vagrant version: 1.3.5, Virtual Box version: 4.3.4
opening VirtualBox GUI may give you a better idea of what's going on. 4.3 has been recently released, so if you've updated, your issue may be related to that
Running Vagrant on Windows 8.1 has caused Windows 8.1 to reboot shortly after a vagrant up for me. I am able to recreate this every time.

Resources