Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port #4041 to hyperv-iso builder #10

Closed
wants to merge 110 commits into from

Commits on Nov 23, 2016

  1. Port of https://github.com/pbolduc/packer-hyperv/

    Remove steps that are windows specific
    taliesins committed Nov 23, 2016
    Configuration menu
    Copy the full SHA
    5390251 View commit details
    Browse the repository at this point in the history
  2. Use the same configuration style as existing builders

    Move builder into correctly named folder
    taliesins committed Nov 23, 2016
    Configuration menu
    Copy the full SHA
    2f08e60 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    36840b7 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    f4b8af5 View commit details
    Browse the repository at this point in the history
  5. Use the convention for default vmname

    Use the convention for default hdd size
    Tests added for builder
    taliesins committed Nov 23, 2016
    Configuration menu
    Copy the full SHA
    c8c3bf7 View commit details
    Browse the repository at this point in the history
  6. Wait until WinRM is available, before continuing with install. This i…

    …s how other system like VeeWee do it.
    
    Add support for number of cpus to use for vm
    Add support for vm generation
    taliesins committed Nov 23, 2016
    Configuration menu
    Copy the full SHA
    36cc54a View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    fe32de5 View commit details
    Browse the repository at this point in the history
  8. Remove devices after it has been shut down

    Attempt to stop vm, before deleting it
    taliesins committed Nov 23, 2016
    Configuration menu
    Copy the full SHA
    ca30485 View commit details
    Browse the repository at this point in the history
  9. 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
    taliesins committed Nov 23, 2016
    Configuration menu
    Copy the full SHA
    4e1e06d View commit details
    Browse the repository at this point in the history
  10. With generation 2 machine by default a dvd drive is not created. So c…

    …reate a dvd drive for os if it does not exist.
    
    Allow secure boot mode to be configured from config.
    taliesins committed Nov 23, 2016
    Configuration menu
    Copy the full SHA
    c65f831 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    d28df30 View commit details
    Browse the repository at this point in the history
  12. When redirecting local ports to hyper visor ports we need to configur…

    …e WinRM ports as well as SSH ports.
    Taliesin Sisson authored and taliesins committed Nov 23, 2016
    Configuration menu
    Copy the full SHA
    e5a4c9f View commit details
    Browse the repository at this point in the history
  13. Add a little safety around variables that are passed into provisioner.

    Taliesin Sisson authored and taliesins committed Nov 23, 2016
    Configuration menu
    Copy the full SHA
    291cb2a View commit details
    Browse the repository at this point in the history
  14. 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
    Taliesin Sisson authored and taliesins committed Nov 23, 2016
    Configuration menu
    Copy the full SHA
    b09ca49 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    fbb56b2 View commit details
    Browse the repository at this point in the history
  16. Hyperv generation 2 machines use scsi for dvd drives. Allow gen 1 mac…

    …hines to have at least 1 iso image attached
    taliesins committed Nov 23, 2016
    Configuration menu
    Copy the full SHA
    408bae3 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    095e76c View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    72ab029 View commit details
    Browse the repository at this point in the history
  19. No need to remove floppy controller for 2nd generation vms

    Don't want to be prompted for confirmation from powershell commandlets
    taliesins committed Nov 23, 2016
    Configuration menu
    Copy the full SHA
    fe3c140 View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    5940f79 View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    9d38d8f View commit details
    Browse the repository at this point in the history
  22. Use plain text password

    taliesins committed Nov 23, 2016
    Configuration menu
    Copy the full SHA
    86b4698 View commit details
    Browse the repository at this point in the history
  23. fix vagrant box structure

    vvchik authored and taliesins committed Nov 23, 2016
    Configuration menu
    Copy the full SHA
    83cd0ba View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    d986d74 View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    4893a2b View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    720f7ff View commit details
    Browse the repository at this point in the history
  27. Configuration menu
    Copy the full SHA
    a1caff6 View commit details
    Browse the repository at this point in the history
  28. 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.
    taliesins committed Nov 23, 2016
    Configuration menu
    Copy the full SHA
    f5eeede View commit details
    Browse the repository at this point in the history
  29. If there is only one ip address on a card we need to force it to be a…

    …n array. Otherwise powershell may treat it as a property.
    
    Stop-Vm with force parameter to ensure that powershell prompts will not appear
    taliesins committed Nov 23, 2016
    Configuration menu
    Copy the full SHA
    a31ac35 View commit details
    Browse the repository at this point in the history
  30. Configuration menu
    Copy the full SHA
    43f7b4b View commit details
    Browse the repository at this point in the history
  31. Configuration menu
    Copy the full SHA
    b83fd6b View commit details
    Browse the repository at this point in the history
  32. Always force turn off vm

    taliesins committed Nov 23, 2016
    Configuration menu
    Copy the full SHA
    1e652d3 View commit details
    Browse the repository at this point in the history
  33. Configuration menu
    Copy the full SHA
    0727d9e View commit details
    Browse the repository at this point in the history
  34. Make use of driver instead of directly referencing hyper

    Move inline powershell to hyperv
    taliesins committed Nov 23, 2016
    Configuration menu
    Copy the full SHA
    d424556 View commit details
    Browse the repository at this point in the history
  35. GuestAdditionsMode and GuestAdditionsPath can be set in config. If Gu…

    …estAdditionsMode == "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
    Taliesin Sisson authored and taliesins committed Nov 23, 2016
    Configuration menu
    Copy the full SHA
    0bdfb27 View commit details
    Browse the repository at this point in the history
  36. Forgot to check in these files.

    Taliesin Sisson authored and taliesins committed Nov 23, 2016
    Configuration menu
    Copy the full SHA
    bd1cb01 View commit details
    Browse the repository at this point in the history
  37. Configuration menu
    Copy the full SHA
    bc92ace View commit details
    Browse the repository at this point in the history
  38. Configuration menu
    Copy the full SHA
    6b9a78f View commit details
    Browse the repository at this point in the history
  39. Setting boot drive message

    taliesins committed Nov 23, 2016
    Configuration menu
    Copy the full SHA
    bcd65a0 View commit details
    Browse the repository at this point in the history
  40. Get rid of mount and unmount that does not specify controller locatio…

    …n exactly
    
    Handle cleanup if unmount step has not already done so
    taliesins committed Nov 23, 2016
    Configuration menu
    Copy the full SHA
    a59e0bf View commit details
    Browse the repository at this point in the history
  41. If we are not getting the exit code assigned then default to it being…

    … successful
    
    Useful to know what the exit code is if there is an error
    taliesins committed Nov 23, 2016
    Configuration menu
    Copy the full SHA
    33aea80 View commit details
    Browse the repository at this point in the history
  42. Using Write-Output instead of Write-Host since PS v5 now leaks the ho…

    …st stream to stderr
    Taliesin Sisson authored and taliesins committed Nov 23, 2016
    Configuration menu
    Copy the full SHA
    a6207af View commit details
    Browse the repository at this point in the history
  43. Write output will put ouput from function, so we don't want to be get…

    …ting line from output of function
    
    Fix unit tests for not showing progress stream when using powershell
    Ensure that progress stream does not get leaked into stdout
    Using Write-Output instead of Write-Host since PS v5 now leaks the host stream to stderr
    Taliesin Sisson authored and taliesins committed Nov 23, 2016
    Configuration menu
    Copy the full SHA
    b0564cd View commit details
    Browse the repository at this point in the history
  44. Configuration menu
    Copy the full SHA
    8344ed7 View commit details
    Browse the repository at this point in the history
  45. If exit code = 1 and the length of the stderr is 0, then we can assum…

    …e that the exit code was not set, so assume success
    taliesins committed Nov 23, 2016
    Configuration menu
    Copy the full SHA
    8170775 View commit details
    Browse the repository at this point in the history
  46. Configuration menu
    Copy the full SHA
    3539e28 View commit details
    Browse the repository at this point in the history
  47. Configuration menu
    Copy the full SHA
    b1dea34 View commit details
    Browse the repository at this point in the history
  48. Fix gen 1 creation of dvd

    taliesins committed Nov 23, 2016
    Configuration menu
    Copy the full SHA
    1d13e29 View commit details
    Browse the repository at this point in the history
  49. Configuration menu
    Copy the full SHA
    77fd89f View commit details
    Browse the repository at this point in the history
  50. By default a gen 1 vm get a dvd drive. Remove it on creation so that …

    …it behaves the same as gen 2.
    taliesins committed Nov 23, 2016
    Configuration menu
    Copy the full SHA
    578e3ba View commit details
    Browse the repository at this point in the history
  51. Echo output when its used

    taliesins committed Nov 23, 2016
    Configuration menu
    Copy the full SHA
    c7a952c View commit details
    Browse the repository at this point in the history
  52. removed unused reference

    taliesins committed Nov 23, 2016
    Configuration menu
    Copy the full SHA
    d0cee32 View commit details
    Browse the repository at this point in the history
  53. Configuration menu
    Copy the full SHA
    241dda7 View commit details
    Browse the repository at this point in the history
  54. Remove all Dvd Drives on Generation 1

    Gildas Cherruel authored and taliesins committed Nov 23, 2016
    Configuration menu
    Copy the full SHA
    e836cda View commit details
    Browse the repository at this point in the history
  55. Do not try to type scancodes if there are none. We haven't figured ou…

    …t how to do this on Windows 10 or Windows 7 and below. This will at least allow other types of VMs to be built.
    taliesins committed Nov 23, 2016
    Configuration menu
    Copy the full SHA
    434bee3 View commit details
    Browse the repository at this point in the history
  56. try to get the virtual keyboard a number of different ways. This shou…

    …ld hopefully work for Windows 7, Window 10 and Windows Server 2016
    taliesins committed Nov 23, 2016
    Configuration menu
    Copy the full SHA
    0b36a70 View commit details
    Browse the repository at this point in the history
  57. A workaround for bug in Windows 10 and Windows 2016 where you have to…

    … specify a path when creating a dvd drive
    taliesins committed Nov 23, 2016
    Configuration menu
    Copy the full SHA
    6aea6b1 View commit details
    Browse the repository at this point in the history
  58. Export of Hyper-V/VMCX machines

    Gildas Cherruel authored and taliesins committed Nov 23, 2016
    Configuration menu
    Copy the full SHA
    34ed9a9 View commit details
    Browse the repository at this point in the history
  59. Configuration menu
    Copy the full SHA
    6d4e5dd View commit details
    Browse the repository at this point in the history
  60. Configuration menu
    Copy the full SHA
    c297fdb View commit details
    Browse the repository at this point in the history
  61. Configuration menu
    Copy the full SHA
    61e37b9 View commit details
    Browse the repository at this point in the history
  62. Configuration menu
    Copy the full SHA
    9069772 View commit details
    Browse the repository at this point in the history
  63. Configuration menu
    Copy the full SHA
    04e26d8 View commit details
    Browse the repository at this point in the history
  64. Configuration menu
    Copy the full SHA
    41c738c View commit details
    Browse the repository at this point in the history
  65. On windows a lot of git clients will convert LF to CRLF. This would b…

    …e a problem where file contents are compared exactly
    taliesins committed Nov 23, 2016
    Configuration menu
    Copy the full SHA
    b9277e7 View commit details
    Browse the repository at this point in the history
  66. Added file with correct line endings

    When dealing with windows the file url format is file:///c:/
    On windows a lot of git clients will convert LF to CRLF. This would be a problem where file contents are compared exactly
    taliesins committed Nov 23, 2016
    Configuration menu
    Copy the full SHA
    f78aca6 View commit details
    Browse the repository at this point in the history
  67. Fix duplicate imports

    taliesins committed Nov 23, 2016
    Configuration menu
    Copy the full SHA
    9ad5565 View commit details
    Browse the repository at this point in the history
  68. Configuration menu
    Copy the full SHA
    baa748c View commit details
    Browse the repository at this point in the history
  69. Configuration menu
    Copy the full SHA
    da69ac8 View commit details
    Browse the repository at this point in the history
  70. Configuration menu
    Copy the full SHA
    1526524 View commit details
    Browse the repository at this point in the history
  71. Encode powershell using utf8

    Fix a bug in the size of string that was returned when decoding a base64 string
    Added tests around encoding and decoding powershell scripts. Used [System.Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes('powershell commands')) | clip to generate what base 64 strings should look like
    taliesins committed Nov 23, 2016
    Configuration menu
    Copy the full SHA
    9e2f922 View commit details
    Browse the repository at this point in the history
  72. Pattern for infrastructure changed to quote filename and execute file…

    … with ampersand as everything is run in powershell now
    
    Handle powershell commands by specifying any extra infrastructure around running scripts inside of ExecuteCommand and ElevatedExecuteCommand
    taliesins committed Nov 23, 2016
    Configuration menu
    Copy the full SHA
    4ec9997 View commit details
    Browse the repository at this point in the history
  73. Configuration menu
    Copy the full SHA
    3894865 View commit details
    Browse the repository at this point in the history
  74. Builds in AppVeyor are failing as they do not have enough free memory…

    …. Drop the thresh hold a little more.
    taliesins committed Nov 23, 2016
    Configuration menu
    Copy the full SHA
    38f157d View commit details
    Browse the repository at this point in the history
  75. Add type scan support for ctrl, shift, alt.

    <leftAlt>
    <leftCtrl>
    <leftShift>
    <rightAlt>
    <rightCtrl>
    <rightShift>
    
    Add type support for combinations of ctr, alt, shift with (only use lower case characters with this):
    <leftAltOn>
    <leftCtrlOn>
    <leftShiftOn>
    <leftAltOff>
    <leftCtrlOff>
    <leftShiftOff>
    <rightAltOn>
    <rightCtrlOn>
    <rightShiftOn>
    <rightAltOff>
    <rightCtrlOff>
    <rightShiftOff>
    taliesins committed Nov 23, 2016
    Configuration menu
    Copy the full SHA
    3f868d1 View commit details
    Browse the repository at this point in the history
  76. Dvd drive creation will auto select the controller number and control…

    …ler location. This fixes the bug of first generation machines not being able to add more then 1 dvd drive.
    taliesins committed Nov 23, 2016
    Configuration menu
    Copy the full SHA
    2a95c43 View commit details
    Browse the repository at this point in the history
  77. Add special key modifiers to log output when used.

    Update documentation to include new key modifiers.
    taliesins committed Nov 23, 2016
    Configuration menu
    Copy the full SHA
    581a6e0 View commit details
    Browse the repository at this point in the history
  78. Enable-VMIntegrationService cmdlet has a language dependent value for…

    … -Name option. So avoid using it, as it will break on machines with different languages.
    taliesins committed Nov 23, 2016
    Configuration menu
    Copy the full SHA
    99a0a9e View commit details
    Browse the repository at this point in the history
  79. Configuration menu
    Copy the full SHA
    791564c View commit details
    Browse the repository at this point in the history
  80. Configuration menu
    Copy the full SHA
    f72a2b0 View commit details
    Browse the repository at this point in the history
  81. Adding support for nested Hyper-V

    PatrickLang authored and taliesins committed Nov 23, 2016
    Configuration menu
    Copy the full SHA
    a2f314a View commit details
    Browse the repository at this point in the history
  82. Fix type casting

    PatrickLang authored and taliesins committed Nov 23, 2016
    Configuration menu
    Copy the full SHA
    1b67753 View commit details
    Browse the repository at this point in the history
  83. 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.
    taliesins committed Nov 23, 2016
    Configuration menu
    Copy the full SHA
    ec7d470 View commit details
    Browse the repository at this point in the history
  84. Add documentation for: enable_mac_spoofing, enable_dynamic_memory and…

    … enable_virtualization_extensions
    taliesins committed Nov 23, 2016
    Configuration menu
    Copy the full SHA
    b876f01 View commit details
    Browse the repository at this point in the history
  85. Enable VlanID

    efx-jjohnson authored and taliesins committed Nov 23, 2016
    Configuration menu
    Copy the full SHA
    766f913 View commit details
    Browse the repository at this point in the history
  86. Added the ability to independently configure switch vlan. This will p…

    …eople to leave the switch in trunk mode and set a vlan for the vm.
    taliesins committed Nov 23, 2016
    Configuration menu
    Copy the full SHA
    7ca6476 View commit details
    Browse the repository at this point in the history
  87. Add vendoring for unicode:

    govendor fetch golang.org/x/text/encoding/unicode
    taliesins committed Nov 23, 2016
    Configuration menu
    Copy the full SHA
    a8f2832 View commit details
    Browse the repository at this point in the history
  88. Configuration menu
    Copy the full SHA
    eaeb335 View commit details
    Browse the repository at this point in the history
  89. Fix spelling mistake

    Fix code type for formatting
    Remove empty space
    taliesins committed Nov 23, 2016
    Configuration menu
    Copy the full SHA
    1c501df View commit details
    Browse the repository at this point in the history
  90. Remove trailing tabs

    taliesins committed Nov 23, 2016
    Configuration menu
    Copy the full SHA
    ad581c8 View commit details
    Browse the repository at this point in the history
  91. Configuration menu
    Copy the full SHA
    b41fd06 View commit details
    Browse the repository at this point in the history
  92. Configuration menu
    Copy the full SHA
    0769fe4 View commit details
    Browse the repository at this point in the history
  93. Configuration menu
    Copy the full SHA
    8d2ecd6 View commit details
    Browse the repository at this point in the history
  94. Configuration menu
    Copy the full SHA
    b103690 View commit details
    Browse the repository at this point in the history
  95. Configuration menu
    Copy the full SHA
    8c15056 View commit details
    Browse the repository at this point in the history
  96. Configuration menu
    Copy the full SHA
    0c2b4de View commit details
    Browse the repository at this point in the history
  97. Add missing configuration elements.

    Remove configuration elements that are no longer used.
    taliesins committed Nov 23, 2016
    Configuration menu
    Copy the full SHA
    e7054ef View commit details
    Browse the repository at this point in the history
  98. Configuration menu
    Copy the full SHA
    c6fb0f3 View commit details
    Browse the repository at this point in the history
  99. Remove unused import

    taliesins committed Nov 23, 2016
    Configuration menu
    Copy the full SHA
    151d2ae View commit details
    Browse the repository at this point in the history
  100. Remove unused import

    taliesins committed Nov 23, 2016
    Configuration menu
    Copy the full SHA
    d73e725 View commit details
    Browse the repository at this point in the history
  101. Configuration menu
    Copy the full SHA
    0c38dec View commit details
    Browse the repository at this point in the history
  102. Run go fmt on files

    taliesins committed Nov 23, 2016
    Configuration menu
    Copy the full SHA
    19824bb View commit details
    Browse the repository at this point in the history
  103. Configuration menu
    Copy the full SHA
    f05fdc5 View commit details
    Browse the repository at this point in the history
  104. Configuration menu
    Copy the full SHA
    baa380b View commit details
    Browse the repository at this point in the history
  105. headless is no longer used

    taliesins committed Nov 23, 2016
    Configuration menu
    Copy the full SHA
    1b4030f View commit details
    Browse the repository at this point in the history
  106. 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
    taliesins committed Nov 23, 2016
    Configuration menu
    Copy the full SHA
    a7b3106 View commit details
    Browse the repository at this point in the history
  107. Configuration menu
    Copy the full SHA
    66f00b6 View commit details
    Browse the repository at this point in the history
  108. Porting over paulmey changes to license and copyright headers. Good g…

    …uy Microsoft have changed the licensing to MPL2 and removed the copyright headers so that we can include it in the official Packer release.
    
    microsoft/packer-hyperv@1ce6ba9?diff=unified#diff-5d60887f0940c9f8d6724e59843ac1fb
    taliesins committed Nov 23, 2016
    Configuration menu
    Copy the full SHA
    bc8dff3 View commit details
    Browse the repository at this point in the history

Commits on Dec 12, 2016

  1. Configuration menu
    Copy the full SHA
    098abe9 View commit details
    Browse the repository at this point in the history

Commits on Dec 13, 2016

  1. Configuration menu
    Copy the full SHA
    f209763 View commit details
    Browse the repository at this point in the history