Matchbox2093
Matchbox2093

Reputation: 986

Vagrant - Creating a windows machine and running an exe

I find myself creating and destroying Windows VM virtualboxes quite alot, which is time consuming doing it the traditional way (GUI). So i came across ruby + vagrant in my pursuit to get rid of this repetitive task.

However during my googling i find that vagrant uses are for linux machines and a "sudo apt-get install " situation. Has anyone come across or point me in the right direction for creating a Windows 7/8 machine (Update: found base boxes here:http://www.vagrantbox.es/) but most importantly, ADDING and RUNNING certain .exe files specified in my vagrant files?

Upvotes: 1

Views: 666

Answers (1)

Frederic Henri
Frederic Henri

Reputation: 53793

There are 2 parts in your question

Creating a windows machine

  1. Microsoft ships their own boxes (know as modern.ie, name of the old site) at https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/mac/, you can find vm as vagrant box too there, they are shipped with a demo version of windows valid for 90 days.

There are some limitations with those boxes and the team at microsoft is updating it. You can read some of the limitation and how to workaround them at https://gist.github.com/andreptb/57e388df5e881937e62a

  1. You can build your box yourself. packer is a tool to create vagrant box and you can find some github project with packer template for windows.

Running an exe

You can just use shell provisioner to call a bat file or a powershell script which will run your exe.

Upvotes: 1

Related Questions