2014-02-28 17:53:20 +00:00
|
|
|
---
|
2016-01-19 18:08:53 +00:00
|
|
|
layout: "docs"
|
2014-02-28 17:53:20 +00:00
|
|
|
page_title: "Configuration- Hyper-V Provider"
|
2016-01-19 18:08:53 +00:00
|
|
|
sidebar_current: "providers-hyperv-configuration"
|
|
|
|
description: |-
|
|
|
|
The Vagrant Hyper-V provider has some provider-specific configuration options
|
|
|
|
you may set.
|
2014-02-28 17:53:20 +00:00
|
|
|
---
|
|
|
|
|
|
|
|
# Configuration
|
|
|
|
|
2016-01-19 18:08:53 +00:00
|
|
|
The Vagrant Hyper-V provider has some provider-specific configuration options
|
2014-02-28 17:53:20 +00:00
|
|
|
you may set. A complete reference is shown below:
|
|
|
|
|
2016-04-07 08:37:20 +00:00
|
|
|
* `vmname` (string) - Name of virtual machine as shown in Hyper-V manager.
|
2015-01-14 14:59:01 +00:00
|
|
|
Defaults is taken from box image XML.
|
2016-04-07 08:37:20 +00:00
|
|
|
* `cpus` (integer) - Number of virtual CPU given to machine.
|
2015-01-14 14:59:01 +00:00
|
|
|
Defaults is taken from box image XML.
|
|
|
|
* `memory` (integer) - Number of MegaBytes allocated to VM at startup.
|
|
|
|
Defaults is taken from box image XML.
|
|
|
|
* `maxmemory` (integer) - Number of MegaBytes maximal allowed to allocate for VM
|
2016-01-19 19:54:13 +00:00
|
|
|
This parameter is switch on Dynamic Allocation of memory.
|
|
|
|
Defaults is taken from box image XML.
|
2015-03-30 16:29:06 +00:00
|
|
|
* `vlan_id` (integer) - Number of Vlan ID for your guest network interface
|
|
|
|
Defaults is not defined, vlan configuration will be untouched if not set.
|
2015-09-22 10:35:55 +00:00
|
|
|
* `mac` (string) - MAC address for your guest network interface
|
|
|
|
Default is not defined, MAC address will be dynamically assigned by Hyper-V if not set.
|
2014-02-28 17:53:20 +00:00
|
|
|
* `ip_address_timeout` (integer) - The time in seconds to wait for the
|
|
|
|
virtual machine to report an IP address. This defaults to 120 seconds.
|
|
|
|
This may have to be increased if your VM takes longer to boot.
|
2016-03-01 15:23:38 +00:00
|
|
|
* `differencing_disk` (boolean) - Switch to use differencing disk intead of cloning whole VHD.
|
2016-08-19 16:32:16 +00:00
|
|
|
* `enable_virtualization_extensions` (boolean) - Enable virtualization extensions for the virtual CPUs.
|
|
|
|
This allows Hyper-V to be nested and run inside another Hyper-VM VM. It requires Windows 10 - 1511 (build 10586) or newer.
|
2017-03-23 06:49:57 +00:00
|
|
|
Default is not defined. This will be disabled if not set.
|
2017-10-04 08:09:15 +00:00
|
|
|
* `auto_start_action` (Nothing, StartIfRunning, Start) - Action on automatic start of VM when booting OS
|
|
|
|
* `auto_stop_action` (ShutDown, TurnOff, Save) - Action on automatic stop of VM when shutting down OS.
|
2017-03-15 21:12:19 +00:00
|
|
|
* `vm_integration_services` (Hash) - Hash to set the state of integration services.
|
|
|
|
|
|
|
|
Example:
|
|
|
|
|
|
|
|
```ruby
|
|
|
|
config.vm.provider "hyperv" do |h|
|
|
|
|
h.vm_integration_services = {
|
|
|
|
guest_service_interface: true,
|
|
|
|
heartbeat: true,
|
2017-05-05 15:10:09 +00:00
|
|
|
key_value_pair_exchange: true,
|
2017-03-15 21:12:19 +00:00
|
|
|
shutdown: true,
|
|
|
|
time_synchronization: true,
|
|
|
|
vss: true
|
|
|
|
}
|
|
|
|
end
|
2017-10-04 08:09:15 +00:00
|
|
|
```
|