packer-cn/builder/hyperv/common
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
..
artifact.go move packer to hashicorp 2017-04-04 13:39:01 -07:00
artifact_test.go move packer to hashicorp 2017-04-04 13:39:01 -07:00
config_test.go move packer to hashicorp 2017-04-04 13:39:01 -07:00
driver.go Ensure the export directory structure matches that of previous versions 2018-07-20 02:09:57 +01:00
driver_mock.go Ensure the export directory structure matches that of previous versions 2018-07-20 02:09:57 +01:00
driver_ps_4.go Ensure the export directory structure matches that of previous versions 2018-07-20 02:09:57 +01:00
output_config.go move packer to hashicorp 2017-04-04 13:39:01 -07:00
output_config_test.go move packer to hashicorp 2017-04-04 13:39:01 -07:00
shutdown_config.go move packer to hashicorp 2017-04-04 13:39:01 -07:00
shutdown_config_test.go Use the same configuration style as existing builders 2016-12-12 22:44:02 +00:00
ssh.go move multistep imports to helper. 2018-01-24 17:09:15 -08:00
ssh_config.go move packer to hashicorp 2017-04-04 13:39:01 -07:00
step_clone_vm.go Adds config option to specify hyper-v secure boot template 2018-05-10 19:00:35 +02:00
step_configure_ip.go fix imports 2018-01-24 17:09:17 -08:00
step_configure_vlan.go fix imports 2018-01-24 17:09:17 -08:00
step_create_external_switch.go spelling: creating 2018-03-13 07:22:37 +00:00
step_create_switch.go fix imports 2018-01-24 17:09:17 -08:00
step_create_tempdir.go spelling: directories 2018-03-13 07:37:32 +00:00
step_create_vm.go Merge pull request #6101 from adarobin/azurecompatible 2018-05-10 17:02:44 -07:00
step_disable_vlan.go fix imports 2018-01-24 17:09:17 -08:00
step_enable_integration_service.go fix imports 2018-01-24 17:09:17 -08:00
step_export_vm.go Ensure the export directory structure matches that of previous versions 2018-07-20 02:09:57 +01:00
step_mount_dvddrive.go fix imports 2018-01-24 17:09:17 -08:00
step_mount_floppydrive.go fix imports 2018-01-24 17:09:17 -08:00
step_mount_guest_additions.go fix imports 2018-01-24 17:09:17 -08:00
step_mount_secondary_dvd_images.go fix imports 2018-01-24 17:09:17 -08:00
step_output_dir.go fix imports 2018-01-24 17:09:17 -08:00
step_polling_installation.go spelling: installation 2018-03-13 08:04:40 +00:00
step_reboot_vm.go fix imports 2018-01-24 17:09:17 -08:00
step_run.go Making log output clearer for hyper-v gui connection 2018-05-14 20:53:51 +10:00
step_shutdown.go fix imports 2018-01-24 17:09:17 -08:00
step_sleep.go fix imports 2018-01-24 17:09:17 -08:00
step_type_boot_command.go implement boot config struct for hyperv 2018-04-19 14:26:31 -07:00
step_unmount_dvddrive.go fix imports 2018-01-24 17:09:17 -08:00
step_unmount_floppydrive.go fix imports 2018-01-24 17:09:17 -08:00
step_unmount_guest_additions.go fix imports 2018-01-24 17:09:17 -08:00
step_unmount_secondary_dvd_images.go fix imports 2018-01-24 17:09:17 -08:00
step_wait_for_install_to_complete.go fix imports 2018-01-24 17:09:17 -08:00