Support using Vagrant with hyper-v on Windows



Tree Management
Treeherder: Docs & Development
2 years ago
2 years ago


(Reporter: gps, Assigned: gps)




(1 attachment)



2 years ago
PR coming.
Created attachment 8804078 [details] [review]
Link to PR 1949

Comment 2

2 years ago
Commit pushed to master at
Bug 1312544 - Support for Hyper-V

Vagrant wants to use Virtualbox by default on Windows. Unfortunately,
Virtualbox doesn't work when Hyper-V - the VM provider built into
Windows itself - is running.

This commit modifies the Vagrantfile to support Hyper-V.

The obvious change is the addition of a new provider block for
Hyper-V. It overrides the default box to use one that is compatible
with Hyper-V.

The non-obvious change is the refactor of the provisioner logic.

The Hyper-V box doesn't have Puppet installed. So we need to install
Puppet in a provisioner before the Puppet provisioner runs. But due
to the way Vagrantfiles are evaluated, we can't just insert the
provisioner in the hyperv provider block. So, this commit relies on
the fact that Vagrantfiles are really Ruby scripts that return a data
structure. The code for configuring the Puppet provisioner is factored
into a function. The provisioners are then moved to a provider override
block so we can guarantee the order they are registered in. It is a bit
ugly, but it gets the job done.
Last Resolved: 2 years ago
Component: Treeherder → Treeherder: Docs & Development
Resolution: --- → FIXED
Summary: Support hyper-v → Support using Vagrant with hyper-v on Windows
You need to log in before you can comment on or make changes to this bug.