Last active
January 10, 2018 08:26
-
-
Save sandersaares/c2946dbd47732c7e09bf1ef4d117a30d to your computer and use it in GitHub Desktop.
CH vagrantfile redacted
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
vm_name = "asdf" | |
vswitch_name = "xxx" | |
data_disk_path = "" | |
new_password = "xxx" | |
mac_address = "" | |
cpu_cores = 2 | |
ram_mb = 1536 | |
Vagrant.configure("2") do |config| | |
config.vm.provision "Copy setup files to guest", | |
type: "file", source: "../Content", destination: "C:/Users/xxx/Vagrant" | |
# Standard initialization, nothing to see here. Do not modify this file. | |
config.vm.provision "Initialize the VM", type: "shell", | |
inline: "powershell -File C:/Users/xxx/Vagrant/Internal/Initialize-VM.ps1 -vmName \"#{vm_name}\"" | |
config.vm.box = "xxx" | |
config.vm.box_url = "xxx" | |
config.vm.guest = :windows | |
config.vm.provider "hyperv" do |hyperv| | |
hyperv.vmname = vm_name | |
hyperv.cpus = cpu_cores | |
hyperv.memory = ram_mb | |
if mac_address != "" | |
hyperv.mac = mac_address | |
end | |
# First boot can take a while, as it does the post-sysprep initialization. Just chill for a bit. | |
hyperv.ip_address_timeout = 600 | |
end | |
config.vm.communicator = "winrm" | |
# The transport we use provides encryption but not server authentication. No MITM protection, in other words. | |
config.winrm.transport = :ssl | |
config.winrm.ssl_peer_verification = false | |
config.winrm.basic_auth_only = true | |
config.vm.network "public_network", bridge: vswitch_name | |
# Synced folders are not necessary and in fact, can be quite problematic. | |
# The images may or may not support them but disable them just to be safe. | |
config.vm.synced_folder ".", "/vagrant", disabled: true | |
config.winrm.username = "xxx" | |
config.winrm.password = "xxx" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment