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`.
* 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.
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.
* 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.
- 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
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.
To enable nested virtualization, mac spoofing, no dynamic memory and at least 4gb of ram should be set for the vm. Set warning if this has not been done.
Detected Virtualization Extensions are supported by the machine your are running on, as it only works for Windows 10 and Windows Server 2016 onwards.
Included the build step to download ISO, so iso_urls works properly now.
Online activation should be done via provisioner
Installation of integration services should be done via provisioner
Cleaned up the way dvd drives are mounted and unmounted (still need to implement feature to find unused drives before adding a new one)
Cleaned up the way floppies are mounted and unmounted
Setup local http server
Add compaction of hard drive
GetHostAdapterIpAddress function added for hyperv
renamed step step_start_vm to step_run to fall in ine with naming conventions of other builders