packer-cn/common
Jake Champlin eda84cb2d3 Prevalidate Hardware Specs on Linux
Prevalidates hardware resources on Linux platforms for Virtualbox and
VMware builders. This is currently only available on Linux, as enabling
for both Darwin and Windows platforms, relies on cgo bindings that would
prevent effective cross-compilation.

Packer will now fail to build and validate templates if the template is
requesting that the VM to be created would allocate more system
resources than the host system has available.

This _however_ doesn't catch parallel builds that overflow the hosts
resources, will probably still need a better error message for VM's
failing to boot in that case.

Example Outputs:

```
$ $GOPATH/bin/packer build -debug ./vmware-iso.json
Debug mode enabled. Builds will not be parallelized.
vmware-iso output will be in this color.

2 error(s) occurred:

* Unavailable Resources: RAM - Requested - 204800000MB - Available 21721MB
* Unavailable Resources: Disk - Requested - 4000000000MB - Available 76701MB
```

```
$ $GOPATH/bin/packer build -debug ./vbox-iso.json
Debug mode enabled. Builds will not be parallelized.
virtualbox-iso output will be in this color.

2 error(s) occurred:

* Unavailable Resources: RAM - Requested - 10240000MB - Available 21721MB
* Unavailable Resources: Disk - Requested - 1000000000MB - Available 76701MB
```
2016-01-21 18:19:11 -05:00
..
json common/json: add Unmarshal with method with syntax errors 2013-08-09 16:50:24 -07:00
ssh code.google.com/p/go.crypto/ssh -> golang.org/x/crypto/ssh 2015-05-28 08:17:49 -07:00
test-fixtures Added cake fixture for testing file:/// downloads 2015-08-14 17:34:04 -07:00
uuid Simplifies the implementation of common/uuid 2013-10-23 23:05:02 +01:00
config.go common: revert some changes from #2121 for Windows 2015-06-13 10:21:09 -04:00
config_test.go common: remove unused config methods 2015-05-27 14:58:09 -07:00
download.go Added [DEBUG] prefix to log messages 2015-08-19 13:15:23 -07:00
download_test.go Implement fix, add comments so it's more apparent why we're doing special logic 2015-08-14 17:49:08 -07:00
http_config.go Refactor http server config into common 2015-11-01 14:45:47 -08:00
http_config_test.go Refactor http server config into common 2015-11-01 14:45:47 -08:00
iso_config.go Refactor builder ISO options 2015-10-20 16:27:47 -07:00
iso_config_test.go Refactor builder ISO options 2015-10-20 16:27:47 -07:00
multistep_debug.go common: clarify debug mode [GH-907] 2014-03-12 21:40:27 -07:00
packer_config.go common: PackerConfig understands user vars 2013-08-09 15:57:08 -07:00
resources_linux.go Prevalidate Hardware Specs on Linux 2016-01-21 18:19:11 -05:00
resources_universal.go Prevalidate Hardware Specs on Linux 2016-01-21 18:19:11 -05:00
step_create_floppy.go Allow wildcards and directories for floppy_files parameter 2014-04-29 12:27:34 -07:00
step_create_floppy_test.go common: fix formatting directives in tests 2015-02-25 05:43:18 +01:00
step_download.go common: StepDownload can force an extension 2015-06-08 20:41:39 -07:00
step_download_test.go common: Add new StepDownload to DRY up downloads 2013-08-15 17:46:40 -07:00
step_http_server.go Refactor http server config into common 2015-11-01 14:45:47 -08:00
step_provision.go packer: HookProvision errors if no communicator 2015-06-15 10:26:46 -07:00
step_provision_test.go rename builder/common to common since it is generally useful 2013-08-01 12:11:54 -07:00