Skip to content

Commit

Permalink
Added Hyper-V Provider section
Browse files Browse the repository at this point in the history
- To allow usage of Hyper-V box which has been pushed to here: https://app.vagrantup.com/ferventcoder/boxes/win2012r2-x64-nocm
  • Loading branch information
gep13 committed Sep 1, 2017
1 parent 9560c71 commit ba95e7d
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,27 @@ Vagrant.configure("2") do |config|
v.linked_clone = true if Vagrant::VERSION >= '1.8.0'
end

# https://www.vagrantup.com/docs/hyperv/configuration.html
# https://technet.microsoft.com/en-us/library/dn798297(v=ws.11).aspx
config.vm.provider :hyperv do |v, override|
# 4GB RAM
v.memory = 4096
# 2 CPUs
v.cpus = 2
# The time in seconds to wait for the virtual machine to report an IP address
v.ip_address_timeout = 130
# Use differencing disk instead of cloning whole VHD
v.differencing_disk = true
v.vm_integration_services = {
guest_service_interface: true,
heartbeat: true,
key_value_pair_exchange: true,
shutdown: true,
time_synchronization: true,
vss: true
}
end

# timeout of waiting for image to stop running - may be a deprecated setting
config.windows.halt_timeout = 20
# username/password for accessing the image
Expand Down Expand Up @@ -68,7 +89,7 @@ Vagrant.configure("2") do |config|
#config.vm.synced_folder "chocolatey", "/ProgramData/chocolatey"

# Port forward WinRM / RDP
# Vagrant 1.9.3 - if you run into Errno::EADDRNOTAVAIL (https://github.com/mitchellh/vagrant/issues/8395),
# Vagrant 1.9.3 - if you run into Errno::EADDRNOTAVAIL (https://github.com/mitchellh/vagrant/issues/8395),
# add host_ip: "127.0.0.1" for it to work
config.vm.network :forwarded_port, guest: 5985, host: 5985, id: "winrm", auto_correct: true #, host_ip: "127.0.0.1"
config.vm.network :forwarded_port, guest: 3389, host: 3389, id: "rdp", auto_correct: true #, host_ip: "127.0.0.1"
Expand Down

0 comments on commit ba95e7d

Please sign in to comment.