# for linked clones
#Vagrant.require_version ">= 1.8

vmname = 'clone1'
boxname = 'w2k12base-sysprep-ready'

Vagrant.configure(2) do |config|
  config.vm.hostname = "#{vmname}"
  config.vm.box = "#{boxname}"

  # must have for Windows to specify OS type
  config.vm.guest = :windows

  # if using host only network
  #config.vm.network 'private_network', type: 'dhcp'

  # winrm | ssh
  config.vm.communicator = "winrm"
  config.winrm.username = "vagrant"
  config.winrm.password = "vagrant"
  config.ssh.insert_key = false

  # virtualbox provider
  config.vm.provider "virtualbox" do |v|
    v.name = "#{vmname}"
    v.gui = true
    # use linked clone for faster spinup
    v.linked_clone = true
    v.customize ["modifyvm", :id, "--memory","1024" ]
    v.customize ["modifyvm", :id, "--cpus","1" ]
    # dynamically set properties that can be fetched inside guestOS
    v.customize ["guestproperty", "set", :id, "myid", :id ]
    v.customize ["guestproperty", "set", :id, "myname", "#{vmname}" ]
  end

end