Use test-kitchen with Vagrant and Parallels? - vagrant

Is it possible to use test-kitchen with Vagrant and Parallels?
I have a working kitchen using Virtualbox, but I wanted to try with Parallels. I've installed the Vagrant Parallels plugin and confirmed that is working. But when I run kitchen converge, it is still using Virtualbox. My .kitchen.yml has:
driver:
name: vagrant
This documentation seems to imply that Parallels is not supported by kitchen-vagrant?
"The kitchen-vagrant driver for Kitchen generates a single Vagrantfile for each instance of Kitchen in a sandboxed directory. The kitchen-vagrant driver supports VirtualBox and VMware Fusion, requires Vagrant 1.1.0 (or higher), and is the default driver for Kitchen."
https://docs.chef.io/config_yml_kitchen.html

I was able to create a VM on Parallels with these options in .kitchen.yml:
platforms:
- name: debian8
driver:
box: parallels/debian-8.3
provider: parallels

Related

Installing Laravel homestead on a virtual machine in windows 10 - after I created a VM box do I need to install virtualbox again within this box?

Trying to install laravel homestead in windows but inside a virtualbox. So first I installed VirtualBox which then allows me to install a VM which I called LaravelBox (so this is an empty machine) - which means I need to install ubuntu 16.04, then vagrant (as the documents on the laravel homestead site (https://laravel.com/docs/5.5/homestead#installation-and-setup) - which instruct me to install the homestead vagrant box, then configure, etc. When I get to he final step to run vagrant up, I get the error:
**Vagrant could not detect VirtualBox! Make sure VirtualBox is properly installed.
Vagrant uses the VBoxManage binary that ships with VirtualBox, and requires
this to be available on the PATH. If VirtualBox is installed, please find the
VBoxManage binary and add it to the PATH environmental variable.**
Does this mean then I now need to install virtualbox inside the VM I just created called LaravelBox? - so it's the case of a VM that contains the laravel homestead vagrant box is inside a a VM? Any help is appreciated, thanks.
The first question why you try to install homestead in a VM instead of installing it in Windows directly?
Yes, the problem is that your VM can't find any Virtualbox installation, then you have to install it there and it will be working.
Homestead was meant to provide a Unix like dev environment so that it would be easier to work with symlinks and permissions, it uses Ubuntu vagrant box by default.
So you can either install homestead directly on your host machine i.e windows or as you already have a Ubuntu VM you can setup a basic dev server manually.
It does not make sense to run a VM inside a VM

Vagrant VM is running but not showing up in Virtualbox Manager (MacOS)

I've recently installed VirtualBox, Vagrant and Chef DK and when I run kitchen converge my VM comes up properly provisioned with my cookbook using vagrant and the Virtualbox provider however I am unable to view or manage the vm from the VirtualBox Manager
I can however view see the vm running via kitchen list or vagrant global-status
Upon reviewing where the .vbox is being loaded I can see that its going in the ~/my_cookbook/.kitchen/nameofvm/ folder
When I review the default Machine location set in Virtual box i can see it's located in the /Users//VirtualBox VMs/ folder however it does not appear to be following this attribute
So far i've reinstalled vagrant, VirtualBox and Chef DK
I'm running MacOS Sierra 10.12.6 and only have started having this issue since upgrading to MacOS Sierra.
Anyone have any recommendations or some extra steps that I could take to potentially resolve this issue?
Chef Development Kit Version: 2.1.11
chef-client version: 13.2.20
delivery version: master (73ebb72a6c42b3d2ff5370c476be800fee7e5427)
berks version: 6.3.0
kitchen version: 1.17.0
inspec version: 1.33.1
vboxmanage -v
5.1.26r117224
Vagrant 1.9.8
This was an inadvertent mis-feature of a change in kitchen-vagrant, which has since been reverted. ChefDK 2.2 includes this fixed version of kitchen-vagrant and should be released either later today or tomorrow morning. You can also roll back to ChefDK 2.0. Sorry for the trouble.

Using Vagrant to set up a VM with KVM/qemu without VirtualBox

I'm getting started Vagrant and want to use it with KVM/qemu (and the Virtual Machine Manager GUI), instead of installing VirtualBox. So I first installed Vagrant:
$ vagrant --version
Vagrant 1.9.1
$ vagrant box list
There are no installed boxes! Use `vagrant box add` to add some
As per these posts, I require vagrant-libvirt for it to work with KVM, so I installed that next:
$ vagrant plugin list
vagrant-libvirt (0.0.37)
vagrant-share (1.1.6, system)
Next, I to add a CentOS(7) box using vagrant box add "centos/7" and selected libvirt, when prompted. After which, I ran vagrant init and didn't encounter any errors:
$ vagrant init centos/7
A `Vagrantfile` has been placed in this directory. You are now
ready to `vagrant up` your first virtual environment! Please read
the comments in the Vagrantfile as well as documentation on
`vagrantup.com` for more information on using Vagrant.
However, vagrant up seems to be erroring out, like so:
$ vagrant up
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.
Here's the provider section in the Vagrantfile
config.vm.provider :libvirt do |domain|
domain.driver = "qemu"
domain.memory = 512
domain.cpus = 1
end
I tried modifying it to:
config.vm.provider :libvirt do |domain|
domain.driver = "kvm"
domain.host = 'localhost'
domain.uri = 'qemu:///system'
domain.memory = 512
domain.cpus = 1
end
I also tried vagrant up --provider=kvm, vagrant up --provider=qemu, and vagrant up --provider=libvirt too, to no avail.
Is there any step that I've missed? Or another package/dependency that needs to be installed?
Edit: After the adding centos/7 using vagrant, it shows up when running vagrant box list.
$ vagrant box list
centos/7 (libvirt, 1611.01)
Start vagrant box with command
vagrant up --provider=kvm
Although it has been said in https://seven.centos.org/2017/08/updated-centos-vagrant-images-available-v1707-01/ that
The vagrant-libvirt plugin is only compatible with Vagrant 1.5 to 1.8
You can use either the command line option --provider=kvm or you can set the VAGRANT_DEFAULT_PROVIDER environment variable:
export VAGRANT_DEFAULT_PROVIDER=kvm # <-- may be in ~/.profile, /etc/profile, or elsewhere
vagrant up
vagrant-libvirt(0.0.40) is compatible with Vagrant 2.0.2 if you are running Ruby 2.3, at least on Linux Mint 18.3 (Ubuntu 16.04). I used vagrant from the Debian download on the vagrantUp website and installed the plugin using it without any problem.

Vagrant undoes changes when provisioning a custom base box

Problem: After packaging a base OS with some customizations into a .box file I add the box (vagrant box add ...). I then vagrant init mybox and vagrant up. When vagrant up runs, it undoes the customizations I made to the base Virtualbox VM. Specifically, it removes repositories that I've added and reinstalls VBoxGuestAdditions. How do I stop vagrant from removing the changes I've made in the source VM?
Additional Info
Host OS: Ubuntu 16.04
Guest OS: SLES 12
Vagrant Version: 1.8.7
VirtualBox Version: 5.1.14r112924
Plugins:
vagrant-hostmanager (1.8.5)
vagrant-proxyconf (1.5.2)
vagrant-share (1.1.6, system)
vagrant-vbguest (0.13.0)
vagrant-vbox-snapshot (0.0.10)
Solution: Re-register the OS with the SLES update server. It turned out that the problem was the OS and not the plugins. Once I re-regsitered the server, the repos stopped getting removed.

Vagrant, Virtualbox: Provider 'virtualbox' not found. We'll automatically install it now

I am running vagrant up command on Windows 7 box (Vagrantfile exists in work dir) and getting the message:
Provider 'virtualbox' not found. We'll automatically install it now...
Virtual box has been installed and vbox_install_path env variable is correctly set.
Working in intranet, there is no way to automatically install VB from the internet.
Vagrant 1.8.4 and older are not compatible with the VirtualBox 5.1.x.
Vagrant 1.8.5 has been released already and it supports the VirtualBox 5.1.x.
Sorted out. Vagrant 1.8.4 does not work with VirtualBox 5.1.0 (on Win7 at least). Fixed after VB version was changed to 5.0.20

Resources