Commit Graph

56 Commits

Author SHA1 Message Date
Matthew Hooker 2655cf7493 fix tests 2017-10-11 22:05:53 +05:30
Matthew Hooker d8c6e6d4a4 remove duplicate line 2017-10-11 22:05:52 +05:30
Taliesin Sisson 5f2c71f7d7 Floppy directories are provided by default with common.floppydrives 2017-10-11 22:05:52 +05:30
Taliesin Sisson 2fbe0b4a7f Don't try to mount vhd and vhdx files as dvd drive. Hard drives are mounted in the create vm step 2017-10-11 22:05:52 +05:30
Taliesin Sisson 8232759397 If vhd or vhdx extension is specified for ISOUrls, we want to use an existing hard drive which means that we don't need to specify hard drive size
Filepath.ext includes the dot
2017-10-11 22:05:51 +05:30
Taliesin Sisson 3d0ac529e0 use common floppy_config instead of builder specific one
Add tests for floppy files and comm
2017-10-11 22:05:51 +05:30
Taliesin Sisson efa62e1550 Can specify an iso, vhd or vhdx for download. If it is a vhd or vhdx it is used as the hard drive for spinning up a new machine, importing an exported virtual machine or cloning a virtual machine.
Can import a virtual machine from a folder
Can clone an existing virtual machine
2017-10-11 22:05:45 +05:30
Sander Saares 028c941b77 Enable use of separate temp path for Hyper-V VHD 2017-09-02 14:55:00 +03:00
Vijaya Bhaskar Reddy Kondreddi e45223a867 Fix -on-error issue not working.
When we supply -on-error flag for Packer with Hyper-v builder, it does not do anything.
2017-09-01 00:14:28 +05:30
Tobias ada8902721 fix formatting 2017-08-08 13:21:53 +00:00
Tobias eafaaa881f builder/hyperv/iso: missing InterpolateContext 2017-07-27 16:57:02 +02:00
Taliesin Sisson 2325c1ee58 Merge pull request #5085 from Lee303/builder-hyperv-temppath
Hyper-V Builder - Add support for temp_path directive to override system %temp%
2017-07-01 06:58:01 +01:00
Lee 0680cb08e5 Add support for temp_path directive to override systemp %temp% 2017-07-01 00:19:27 +01:00
Lee Spottiswood 4d394033d2 add tests 2017-06-20 12:21:07 +01:00
Lee Spottiswood f95093ef63 Add support for floppy_dirs with hyperv-iso builder 2017-06-15 13:12:39 +01:00
Matthew Hooker 81522dced0
move packer to hashicorp 2017-04-04 13:39:01 -07:00
Mikhail Zholobov 57d07f227a
Add "iso_target_extension" option for all local *-iso builders
This option allows to set the extension of the ISO file after download.
Defaults to "iso". It makes sense for building Mac OS X guests, where the
bootable image is actually a DMG, not an ISO.
In particular, it is important for "parallels-iso" builder to set the right extension.
2016-12-17 12:50:30 +02:00
Matthew Hooker 45d4cf8b36
move powershell module to common 2016-12-12 18:34:15 -08:00
Taliesin Sisson e50fe9fd54 Porting over paulmey changes to license and copyright headers. Good guy Microsoft have changed the licensing to MPL2 and removed the copyright headers so that we can include it in the official Packer release.
1ce6ba91f7?diff=unified#diff-5d60887f0940c9f8d6724e59843ac1fb
2016-12-12 22:45:24 +00:00
Taliesin Sisson e357c56186 Builders don't need to set this up anymore 2016-12-12 22:45:23 +00:00
Taliesin Sisson 74255c553b Be smarter about loading guest additions iso. Windows 10 and Windows Server 2016 no longer come with iso. So default to not loading guest additions when the iso is missing 2016-12-12 22:45:22 +00:00
Taliesin Sisson 44f73fa75f Changed ram_size_mb to ram_size 2016-12-12 22:45:18 +00:00
Taliesin Sisson fb192ce6d6 Remove unused import 2016-12-12 22:45:17 +00:00
Taliesin Sisson 3f0835aab2 Remove headless option as it is not used. 2016-12-12 22:45:16 +00:00
Taliesin Sisson 3c1df5a791 Remove inconsistent "_mb" from ram size 2016-12-12 22:45:14 +00:00
Taliesin Sisson 0515487062 Configuration settings are no longer used 2016-12-12 22:45:13 +00:00
Taliesin Sisson 20643e35a8 Do not specify a default username or password 2016-12-12 22:45:13 +00:00
Taliesin Sisson c2d1f6b617 Added the ability to independently configure switch vlan. This will people to leave the switch in trunk mode and set a vlan for the vm. 2016-12-12 22:45:06 +00:00
James Johnson 48b6cc0650 Enable VlanID 2016-12-12 22:45:05 +00:00
Taliesin Sisson 9fbd1e472a Add support for mac spoofing and dynamic memory.
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.
2016-12-12 22:45:04 +00:00
Patrick Lang 6d391fc34a Adding support for nested Hyper-V 2016-12-12 22:45:02 +00:00
Patrick Lang f94c2cd2f7 Adding nested virtualization support 2016-12-12 22:45:01 +00:00
Patrick Lang 6342e1525d s/EnabeSecureBoot/EnableSecureBoot/g 2016-12-12 22:45:01 +00:00
Taliesin Sisson c1538c59c9 Builds in AppVeyor are failing as they do not have enough free memory. Drop the thresh hold a little more. 2016-12-12 22:44:57 +00:00
Taliesin Sisson 52c6cd5fc1 Test should run and pass even when run on an environment that does not have Powershel. 2016-12-12 22:44:53 +00:00
Taliesin Sisson 7c754bf791 Try to match style of other builders 2016-12-12 22:44:48 +00:00
Taliesin Sisson fb098fcbf0 http server has moved to common step 2016-12-12 22:44:47 +00:00
Taliesin Sisson 4b6ce3da60 Build agents might not have guest additions 2016-12-12 22:44:29 +00:00
Taliesin Sisson aaf9007249 Include cache in the state bag. 2016-12-12 22:44:28 +00:00
Taliesin Sisson 010d171bec GuestAdditionsMode and GuestAdditionsPath can be set in config. If GuestAdditionsMode == "attach" it will mount the HyperV Integration Services ISO. If GuestAdditionsPath is set, then it will be used as an alternative to where the HyperV Integration Service ISO is.
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
2016-12-12 22:44:27 +00:00
Taliesin Sisson 730c6217ad Fix disk size test
Default minimum and maximum sizes were geared towards spinning up windows server instances. Linux instances are far more efficient and make do with lower requirements. Set the minimum sizes to match this.
2016-12-12 22:44:21 +00:00
Taliesin Sisson c24c882b84 Use simple naming convention for now 2016-12-12 22:44:16 +00:00
Taliesin Sisson 5f2c12324c No need to remove floppy controller for 2nd generation vms
Don't want to be prompted for confirmation from powershell commandlets
2016-12-12 22:44:14 +00:00
Taliesin Sisson 837f9addd0 Check the floppy files and not the dvd files attached 2016-12-12 22:44:13 +00:00
Taliesin Sisson 4e8074d7e5 Need to expose generation as a public property 2016-12-12 22:44:13 +00:00
Taliesin Sisson e18594f404 Hyperv generation 2 machines use scsi for dvd drives. Allow gen 1 machines to have at least 1 iso image attached 2016-12-12 22:44:12 +00:00
Taliesin Sisson ef507c7bd7 Pass in any iso images to add as dvd drives during boot 2016-12-12 22:44:11 +00:00
Taliesin Sisson 3051ea6633 Quote powershell so that it does not try to interpret command to be run
Get VName out of state. This allows template replacement to be run on vmname
2016-12-12 22:44:10 +00:00
Taliesin Sisson 02db768018 With generation 2 machine by default a dvd drive is not created. So create a dvd drive for os if it does not exist.
Allow secure boot mode to be configured from config.
2016-12-12 22:44:07 +00:00
Taliesin Sisson aa1f1da1ff Support for boot_command
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
2016-12-12 22:44:07 +00:00