Commit Graph

14 Commits

Author SHA1 Message Date
Chris Roberts 9452e7cc38 Update conditional check to use equality check
Fixes #8444
2017-05-05 14:07:52 -07:00
Arjan Weurding 399789467a Fix crash when using HyperV
Fix the error 
```homestead-7: Creating and registering the VM...
An error occurred while executing a PowerShell script. This error
is shown below. Please read the error message and see if this is
a configuration error with your system. If it is not, then please
report a bug.

Script: import_vm_vmcx.ps1
Error:

At C:\Program Files
(x86)\HashiCorp\Vagrant\embedded\gems\gems\vagrant-1.9.4\plugins\providers\hyper                    v\scripts\import_vm_vmcx.ps1:18 char:37
+     [string]$differencing_disk=$null
+                                     ~
Missing ')' in function parameter list.
At C:\Program Files
(x86)\HashiCorp\Vagrant\embedded\gems\gems\vagrant-1.9.4\plugins\providers\hyper                    v\scripts\import_vm_vmcx.ps1:20 char:1
+ )
+ ~
Unexpected token ')' in expression or statement.
    + CategoryInfo          : ParserError: (:) [], ParseException
    + FullyQualifiedErrorId : MissingEndParenthesisInFunctionParameterList
```
2017-04-26 08:15:06 -07:00
Bjorn Brala 2f7e0d3a1f Virtualization extensions wern't enabled for vmcx file format, so it didn't work for Windows 10 and up. Fixes #8402 2017-03-23 07:54:41 +01:00
Bjorn Brala 10181f7c8a When you set the memory of a HyperV machine to something lower than the original range it fails. 2016-11-23 08:39:49 +01:00
Bjorn Brala 37a525fbbc Little bit of cleanup. 2016-10-20 22:43:00 +02:00
Bjorn Brala e6093dd709 The virtual machine doesnt need 'Virtual Machines' in its path, this is created when importing. 2016-10-19 21:03:48 +02:00
Bjorn Brala c075c026be Keyboard language setting made my comment bad 2016-10-19 20:56:52 +02:00
Bjorn Brala 055bed5918 removed an extra echo and added proper error message when there is incompatibilities. Appearantly importing into a compressed folder wont work and will result in an error. 2016-10-19 20:55:56 +02:00
Brian Retford 418064519d Move dynamic memory settings into conditional block 2016-10-14 18:53:44 -07:00
Jake Ballard 803fff7f03 Fix issue with missing slash in paths
It was failing to create files below the machines\default\hyperv folder, rather it was creating folders named 'hypervSnapshots', 'hypervVirtual Hard Disks', and 'hypervVirtual Machines'. This was causing the files to not be removed when destroying the vm, and an error when subsequently bringing it up again.
2016-10-11 15:31:28 -05:00
Bjorn Brala debe50957b Refactor the import script to fully use Compare-VM for creating the new VM.
Implemented the differencing disk for vmcx.
This means the disk is now copied by Hyper-V (Powershell) instead of Ruby for new machines.
This does mean EFI Firmware now does work for machines since it is quite a feep copy. Compare-VM will report incompatibilities should they be found.
2016-10-08 16:38:42 +02:00
Bjorn Brala 133e2a7b0f Broke Path argument in mini refactor. 2016-10-04 20:06:10 +02:00
Bjorn Brala 2fc93277fd change argument to vm_config_file so it isn't the same as variable in powershell script. 2016-10-02 18:45:51 +02:00
Bjorn Brala b041c1955c Add support for vmcx files, new binary format for Hyper-V configurations. 2016-10-02 16:10:16 +02:00