Commit Graph

217 Commits

Author SHA1 Message Date
Lars Lehtonen b6eadb419a builder/qemu: Fix dropped error 2019-08-29 05:13:46 -07:00
Jayson Cofell 7f5fd4851e QEMU: Remove QMPEnable and depend upon VNC password usage for QMP enablement. 2019-07-16 08:56:22 -06:00
Jayson Cofell 4b0a7b0af7 Fix QEMU fmt miss 2019-07-10 13:12:31 -06:00
Jayson Cofell f1ad385669 Change QMP socket test to join with filepath 2019-07-10 12:55:44 -06:00
Jayson Cofell 5c5943b8ba Add VNC Password support to QEMU builder 2019-07-03 18:38:56 -06:00
Jayson Cofell afe9ba2869 QEMU: Initial QMP support 2019-07-03 18:33:59 -06:00
Megan Marsh eb8c74bf85 allow ssh_host config option to override host logic for all builders 2019-07-02 13:56:28 -07:00
Jayson Cofell e690cb90ce Go fmt AdditionalDiskSizes code 2019-06-24 18:36:01 -06:00
Jayson Cofell 37e15ec854 Add AdditionalDiskSizes test 2019-06-24 18:11:14 -06:00
Jayson Cofell c9b693080a Add additional disk support for QEMU builder. 2019-06-24 17:35:06 -06:00
Adrien Delorme a6bb06c04e
Merge pull request #7615 from hashicorp/fix_7607
fix copypasta mistake switching ssh port mix/max for vnc port min/max
2019-05-07 12:17:45 +02:00
Radek Simko b4d35eceff
builder/qemu: Fix typo in version comparison 2019-05-07 08:37:57 +01:00
Megan Marsh bf59f01ba2 fix copypasta mistake switching ssh port mix/max for vnc port min/max 2019-05-06 15:01:09 -07:00
Radek Simko c7cf39808d
builder/qemu: Replace dot-based parsing with hashicorp/go-version 2019-05-06 22:28:27 +01:00
Adrien Delorme d72040f4fa move retry code into the common/retry pkg and make retry context aware 2019-04-09 17:46:38 +02:00
Adrien Delorme f555e7a9f2 allow a provisioner to timeout
* I had to contextualise Communicator.Start and RemoteCmd.StartWithUi
NOTE: Communicator.Start starts a RemoteCmd but RemoteCmd.StartWithUi will run the cmd and wait for a return, so I renamed StartWithUi to RunWithUi so that the intent is clearer.
Ideally in the future RunWithUi will be named back to StartWithUi and the exit status or wait funcs of the command will allow to wait for a return. If you do so please read carrefully https://golang.org/pkg/os/exec/#Cmd.Stdout to avoid a deadlock
* cmd.ExitStatus to cmd.ExitStatus() is now blocking to avoid race conditions
* also had to simplify StartWithUi
2019-04-08 20:09:21 +02:00
Adrien Delorme c4f3dccc14 rename interpolation context from ctx to ictx and contexts to ctx to avoid conflicts 2019-04-03 15:56:15 +02:00
Adrien Delorme a4bf94dd3c change Builder to be passed a context for cancellation
we have to to give it to our hook
2019-04-03 15:55:55 +02:00
Adrien Delorme a3838ecfad error on negative ports 2019-03-19 15:21:09 +01:00
Adrien Delorme 5a6dffde9a use port as ints 2019-03-19 15:01:12 +01:00
Adrien Delorme c214f6735b make everything a uint 2019-03-19 12:54:15 +01:00
Adrien Delorme ae182a7c20 qemu stepForwardSSH: use common/net pkg to find open port 2019-03-19 12:54:15 +01:00
Adrien Delorme 446105e384 quemu stepConfigureVNC: use common/net pkg to find open port 2019-03-19 12:54:15 +01:00
Adrien Delorme 9f82b75e57 Use the hashicorp/go-getter to download files
* removed packer.Cache and references since packer.Cache is never used except in the download step. The download step now uses the new func packer.CachePath(targetPath) for this, the behavior is the same.
* removed download code from packer that was reimplemented into the go-getter library: progress bar, http download restart, checksuming from file, skip already downloaded files, symlinking, make a download cancellable by context.
* on windows if packer is running without symlinking rights and we are getting a local file, the file will be copied instead to avoid errors.
* added unit tests for step_download that are now CI tested on windows, mac & linux.
* files are now downloaded under cache dir `sha1(filename + "?checksum=" + checksum) + file_extension`
* since the output dir is based on the source url and the checksum, when the checksum fails, the file is auto deleted.
* a download file is protected and locked by a file lock,
* updated docs
* updated go modules and vendors
2019-03-13 12:11:58 +01:00
Megan Marsh c63b54a1e7 move http with proxy call into a helper function 2019-01-25 12:32:52 -08:00
Megan Marsh e4dca0016c
Merge pull request #7156 from vtolstov/qemu
qemu: Add configuration options to specify cpu count and memory size
2019-01-23 15:19:08 -08:00
Vasiliy Tolstov b6ebe00249 provide memory and cpus like other builders does
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2019-01-23 13:21:52 +03:00
Nelson Chen b39f398fda Add support for whpx accelerator to qemu builder
Windows Hypervisor Platform (WHPX) is the Windows counterpart to HVF and
KVM. It's an operating system provided component that provides
virtualization acceleration support.

This is kind of the missing counterpart to https://github.com/hashicorp/packer/pull/6193.
QEMU 2.12 also added support for WHPX.

There's no support for libvirt on Windows so nothing was added in those
areas.

The popular QEMU for Windows distribution does not have WHPX support
built-in for legal reasons as the maintainer does not wish to use or
obtain any part of Microsoft's SDK to compile the distribution.
2019-01-03 15:20:37 -08:00
Megan Marsh 65124985d1 don't set DetectZeroes if it's off, because some versions of QEMU don't support this option 2018-12-03 15:52:13 -08:00
PORTE Loïc bf97557abf Backport VNC log from vmware to qemu 2018-11-28 19:13:29 +01:00
Megan Marsh 3175dcdf81
Merge pull request #6807 from dev-rowbot/qemu-net-device-6804
Fix for #6804 - KVM/QEMU Network "has no peer"
2018-10-18 14:09:22 -07:00
Konstantin Shloma fe341e2bd0 fix go source formatting
add description to documentation page
2018-10-10 16:16:23 +03:00
Konstantin Shloma 1155347b55 add qemu disk detect-zeroes= option 2018-10-10 14:38:59 +03:00
Rowan Potgieter 65db6be6b9 Fix for #6804
The user QEMU args may overwrite the default -device.
This results in no network
2018-10-06 14:40:43 +02:00
Megan Marsh 38cc525ec7 new option allowing user to clean up the ephemeral ssh key from the authorized_keys file 2018-09-14 11:06:38 -07:00
Megan Marsh 340363a649
Merge pull request #6613 from hashicorp/merge_ssh_config_funcs
Merge ssh config funcs from builders
2018-08-23 16:03:36 -07:00
Megan Marsh 918db58604 added new template variables to replace PACKER_KEY_INTERVAL with tunable key and keygroup intervals depending on driver used 2018-08-22 11:37:56 -07:00
Adrien Delorme 41f6e0334d refactor all copy pasted sshConfig with into communicator.Config.SSHConfigFunc
* still need to append the auth methods into an array for gracefullness
2018-08-22 17:02:23 +02:00
rsclarke 887e694534 add ssh agent support for qemu builder 2018-07-27 20:24:06 +08:00
Megan Marsh d2823622e5
Merge pull request #6249 from iammattcoleman/add-use_backing_file
qemu builder: add the 'use_backing_file' setting for QCOW2 images
2018-07-23 13:40:04 -07:00
Michael Gibson 7e4fb9adb5
vnc_bind_address not getting passed through to qemu
This was mostly addressed in commit
hashicorp/packer@fa273f3

Just missing vncIP from step_type_boot_command.go
2018-07-09 14:05:39 -06:00
Megan Marsh 2b2c860df8 make the convert retryable in case it takes a bit to release a lock 2018-06-28 14:21:28 -07:00
Matt Coleman 3192f5e0da qemu builder: add the 'use_backing_file' setting for QCOW2 images 2018-05-16 10:22:50 -04:00
Matthew Hooker 4f1395e0f6
builder/qemu: properly prepare boot command. 2018-05-01 12:40:00 -07:00
Adam Robinson 29b89e63b8 add support for hvf accelerator to qemu builder 2018-04-27 10:11:20 -04:00
Matthew Hooker 024fac4b4f
Merge pull request #6129 from hashicorp/bc_replace
Replace boot command parser with PEG parser.
2018-04-20 12:21:20 -07:00
Evgeni Golov 5a10e5a038
fix invalid disc_discard setting error message 2018-04-20 13:17:40 +02:00
Matthew Hooker c8e76ce298
implement config struct for qemu 2018-04-19 14:26:31 -07:00
Matthew Hooker c6299972b9
s/boot_command/bootcommand/ 2018-04-19 14:26:31 -07:00
Matthew Hooker bf0a320125
Implement new parser for qemu boot command 2018-04-19 14:26:29 -07:00