Skip to content

benjaminmicucci/test-kitchen-hyperv-poc

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Test Kitchen With Hyper-V Proof of Concept

Pre-Requisites

Hyper-V Set Up

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.

Running Test Kitchen

  1. Run PowerShell as Administrator (this is required for interacting with Hyper-V)
  2. cd to the checked out directory
  3. Run chef exec kitchen test

An Ubuntu VM should now spin up in Hyper-V and run the stock tests.

About

Test Kitchen With Hyper-V Proof of Concept

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published