Commit Graph

31 Commits

Author SHA1 Message Date
Rui Lopes 86ac132056
hyperv: add support for setting the boot order (#9046) 2020-04-30 13:31:41 +02:00
William Brooks 723a9eba9a really, really, really fix driver_mock 2020-02-21 01:53:13 -06:00
William Brooks 11fae17308 again, really fix driver_mock 2020-02-21 01:44:49 -06:00
William Brooks 2de731453f really fix driver_mock this time 2020-02-21 01:43:03 -06:00
William Brooks 0a0fbfc33b fmt 2020-02-21 01:31:18 -06:00
William Brooks dd8f4370c6 initial support for gen2 and fix driver_mock 2020-02-21 01:30:59 -06:00
William Brooks 9891e75f75 update hyper-v driver_mock.go 2020-02-09 15:39:35 -06:00
Megan Marsh 2e821da84b check to make sure a vm-name isn't already in use before trying to launch a vm with said name. 2019-06-13 14:09:45 -07:00
Megan Marsh 006682a09c add version option and also refactor powershell script to use golang templates for ease of testing and variable passing. 2018-12-19 16:30:57 -08:00
Ladar Levison bdcbf61ade Fixed replace variable name. 2018-12-18 06:18:51 -06:00
Ladar Levison fa154f5298 Fixed driver mock up formatting. 2018-12-18 06:14:38 -06:00
Ladar Levison 31d03fb48e Added legacy network adapter driver mock up. 2018-12-18 06:12:05 -06:00
Megan Marsh b95123f457 add new copy_in_compare flag so users can set the copy var to whatever they need in order to get the compatibility report to work. 2018-12-13 09:12:23 -08:00
DanHam da21c25791
Convert incorrect 'vmxc' -> 'vmcx' in codebase, docs and template opts
grep -rli --exclude-dir={vendor,bin\*,\*vmware\*,\*pkg\*} vmxc . | \
xargs sed -i 's/\(vm\)\(x\)\(c\)/\1\3\2/ig'
2018-07-20 02:12:47 +01:00
DanHam 674bad0ab4
Break very long lines for readability 2018-07-20 02:12:47 +01:00
DanHam 0a4ec13323
Tests for func to move VHDs to output dir when skip_export: true 2018-07-20 02:12:44 +01:00
DanHam c2437ba592
Remove the option to place the VHD files in a separate directory
The export process now exports the VM directly from the build directory
into the output directory. There are no intermediate steps or copying of
files involved. This means that there is no longer any benefit in having
a separate directory to house the VHD files - see #5206 for the
reasoning behind the introduction of this feature.

If a user wishes to house the build files on a separate disk from the
output directory (perhaps for performance reasons or due to disk space
limitations) they can still do so through the use of `temp_path`.
2018-07-20 02:12:43 +01:00
DanHam c6b9d9ce90
Add checks/error reporting to compaction process
* Report compaction results
* Failure to find any disks under the supplied path is treated as a
  'soft' error and a warning message will be printed in place of the
  compaction result. Any other failure will cause the build to fail.
2018-07-20 02:12:42 +01:00
DanHam 534fc4a473
Ensure the export directory structure matches that of previous versions
Commit 3fc2defb6 altered the directory structure associated with an
exported VM. The changes mean that the export process now stores the
exported machine files and folders under a folder with name 'vm_name' in
the output directory.
This commit restores the previous behaviour whereby the exported machine
files and folders were stored directly in the output directory. This
allows us to keep the efficiency improvements introduced with 3fc2defb6
while maintaining backward compatibility.

By default the Export-VM command creates three folders in the specified
export directory - 'Virtual Hard Disks', 'Virtual Machines' and
'Snapshots'. When a machine with no associated snapshots is exported the
'Snapshots' directory is empty.
Prior to 3fc2defb6 the Snapshots folder was not copied/incorporated into
the output directory at all. This was a bug.
This commit preserves the legacy behaviour by not including an empty
Snapshots directory in the export. However, if there *are* Snapshots
associated with the VM, they are now moved into the output directory
along with the usual directories containing disks and VM metadata. This
prevents warnings/errors on import due to missing snapshots.
2018-07-20 02:09:57 +01:00
DanHam dc46848f89
Remove now redundant function to copy exported VM files 2018-07-20 02:09:57 +01:00
DanHam 3fc2defb6d
Refactor the export step for Hyper-V ISO and VMCX builders
* Fixes a bug that caused the build to error if users did not
  explicitly set `skip_compaction:true` when setting `skip_export:
  true`. See #6392.
* Improves the efficiency of the compaction and export process by
  reordering the compaction and export steps.
* Further improves the efficiency of the compacting step through
  compacting the vmd* file directly rather than creating and then
  operating on a copy.
* The changes mean the export process now stores the exported machine
  files and folders under a folder with name 'vm_name' in the output
  directory. Previously the exported machine files and folders were
  stored directly in the output directory.
2018-07-20 02:09:54 +01:00
Unknown 29c4b4436d Changes requested in PR #6243
- Logging error if vmconnect.exe fails.
- Using StepRun struct rather than StateBag for command Cancel function
- Better handling in Disconnect when headless is true or vmconnect failed in Start
2018-05-14 20:52:10 +10:00
Unknown fc734b6bd9 Using vmconnect to display gui for hyper-v
vmconnect.exe comes as part of Hyper-V and is the tool used by Hyper-V Manager to connect with a virtual machine. This commits sets behaviour the same as virtualbox and vmware to display the virtual machine connection unless headless is set in the template.
2018-05-14 20:52:10 +10:00
M. Marsh 5871b8242b
Merge pull request #6101 from adarobin/azurecompatible
Add use_fixed_vhd_format Hyper-V ISO option
2018-05-10 17:02:44 -07:00
Stefan Henseler 6f00596053 Adds config option to specify hyper-v secure boot template 2018-05-10 19:00:35 +02:00
Adam Robinson 3aebd5f462 Add use_fixed_vhd_format Hyper-V ISO option 2018-04-26 13:35:19 -04:00
Stefan Henseler 103186af86 Adds Support to configure hyper-v disk block size 2018-02-23 20:19:26 +01:00
Ben Phegan c338cb79d0 Initial commit of feature to allow MAC address specification for HyperV builders 2017-12-15 13:24:15 +11:00
Vijaya Bhaskar Reddy Kondreddi 3d5303c60d Fix tests 2017-11-24 13:24:44 +05:30
Erlend Graff 27fc72c137 fix formatting errors 2017-11-05 15:16:47 +01:00
Erlend Graff d890051940 hyper-v: implement driver mock 2017-11-05 14:51:18 +01:00