UNDER DEVELOPMENT
Vagrant is a tool for building and distributing development environments.
This provider will allow you to create VMs in the remote Virtual Machine Manager.
Install Vagrant 1.7.1
http://www.vagrantup.com/downloads.html
Install plugin:
vagrant plugin install vagrant-vmm
- You should have template in your VMM which has following things setup:
- WinRM and firewall configured, using:
winrm quickconfig
- Local user vagrant/vagrant with admin rights. Alternatively you can specify other creds using:
win64_config.winrm.username = "account_name" win64_config.winrm.password = "password"
- Once VM created in VMM it should automatically get IP assigned, as well as it should be directly accessible from your machine.
- Run vagrant under Administrator(in admin shell).
Set guest to :windows
win64_config.vm.guest = :windows
Set communicator to :winrm
win64_config.vm.communicator = "winrm"
Set you provider to :vmm and specify at least vmm_server_address, vm_host_group_name and vm_template_name parameters.
win64_config.vm.provider :vmm do |conf|
conf.vm_template_name = 'vagrant-template-w8.1-64'
conf.vm_host_group_name = 'Host-Group-Name'
conf.vmm_server_address = 'my-vmm-server'
conf.proxy_server_address = '192.126.18.126' # optional
end
VMM template name that will be used for VM creation.
conf.vm_template_name = 'vagrant-template-w8.1-64'
VMM host group where VM will be placed. NOTE: Your template should match it as well.
conf.vm_host_group_name = 'Host-Group-Name'
IP/Hostname of the VMM server where VMs are going to be created.
conf.vmm_server_address = '192.124.125.10'
If your local machine do not have direct access to the machine that hosts VMM, but you have proxy server(jump box) you can specify its IP in proxy_server_address property.
conf.proxy_server_address = 'my-proxy-to-vmm'
Check that winrm is configured properly in the VM, if default username is used (vagrant/vagrant) then ensure that winrm accepts unencrypted connection and Basic auth.
Enable basic auth (in VM)
winrm set winrm/config/service/auth @{Basic="true"}
Allow unencrypted connection (in VM)
winrm set winrm/config/service @{AllowUnencrypted="true"}
- Fork it ( https://github.com/jarig/vagrant-vmm/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request