Enable Hyper-V:
PS > Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-All
Note: Once you enable Hyper-V, you will no longer be able to use VirtualBox. See this post for a workaround.
Then create the virtual switch:
PS > Import-Module Hyper-V
PS > Get-NetAdapter | where { $_.Status -eq "Up" } # to list adapter names
PS > New-VMSwitch -Name vagrant -NetAdapterName <ADAPTER_NAME> -AllowManagementOS $true
Where ADAPTER_NAME
is the name of the adapter you use to connect to the internet.
- Run PowerShell as Administrator (this is required for interacting with Hyper-V)
cd
to the checked out directory- Run
chef exec kitchen test
An Ubuntu VM should now spin up in Hyper-V and run the stock tests.