summaryrefslogtreecommitdiff
path: root/libvirt
Commit message (Collapse)AuthorAge
* domain: Add support for BootDevice.Sam Batschelet2017-09-06
|
* Adding tests for machine and arch domain attributes from #166Dean Smith2017-08-30
|
* Adding support for arch and machine typeDean Smith2017-08-29
| | | | | | This adds support for setting the architecture and machine type of the created virtual machine by adding two new attributes machine and arch to the domain definition
* Ensure libvirt stream are cleaned up properlyFlavio Castelli2017-08-11
| | | | We have to `free()` the stream once they are no longer used.
* use libvirt-go-xml for volumesThomas Hipp2017-08-11
| | | | Signed-off-by: Thomas Hipp <thipp@suse.de>
* Fix string format of network addressesGraham Hayes2017-08-10
| | | | | | | Network addresses when trying to format the prefix as an int, while it is a string Fixes: #160
* fix XML name of DHCP host elementThomas Hipp2017-08-08
| | | | | | | Use `<host/>` instead of `<NetworkDHCPHost/>` as libvirt complains about the latter. Signed-off-by: Thomas Hipp <thipp@suse.de>
* cloudinit: show user_data in .tfstate fileThomas Hipp2017-08-08
| | | | | | This fixes #135. Signed-off-by: Thomas Hipp <thipp@suse.de>
* cloudinit: handle changes correctlyThomas Hipp2017-08-08
| | | | | | | | Use the correct cloudinit ID if things have changed. This fixes #145. Signed-off-by: Thomas Hipp <thipp@suse.de>
* fix importThomas Hipp2017-08-08
| | | | Signed-off-by: Thomas Hipp <thipp@suse.de>
* vendor: depend on terraform v0.10.0Thomas Hipp2017-08-08
| | | | Signed-off-by: Thomas Hipp <thipp@suse.de>
* network: ensure networks are recreatedThomas Hipp2017-08-08
| | | | | | | | | | Ensure that networks are only free'd if there are no errors. Furthermore, make sure that networks are recreated if they cannot be found on the remote. This fixes #74. Signed-off-by: Thomas Hipp <thipp@suse.de>
* ensure volumes are free'd if there are no errorsThomas Hipp2017-08-08
| | | | | | | | Make sure to only then free volumes if there are no errors. This fixes #151. Signed-off-by: Thomas Hipp <thipp@suse.de>
* Added support for specifying NVRAM templates when using UEFI images.J. Eduardo2017-08-01
|
* fix failing console port conversionThomas Hipp2017-07-31
| | | | | | | When specifying a console port, it won't panic because of an invalid interface conversion. Signed-off-by: Thomas Hipp <thipp@suse.de>
* use github.com/libvirt-go-xmlThomas Hipp2017-07-27
| | | | | | | | Replace the custom XML structs with libvirt's offcial ones. This resolves #143. Signed-off-by: Thomas Hipp <thipp@suse.de>
* Fix crash occuring when domain is in state file but doesn't exist in libvirt.Zbigniew Kostrzewa2017-07-15
|
* Exported logic used to create a new backingStore representation onto a ↵J. Eduardo2017-07-02
| | | | separated method.
* Added autodetection of base volume format, eliminating the need for explicit ↵J. Eduardo2017-07-02
| | | | configuration.
* Added support for using raw volumes and an example using the functionality.J. Eduardo2017-07-02
|
* Add autostart option for domain resource.localghost2017-06-26
|
* Merge pull request #136 from dmacvicar/domain-filesystemFlavio Castelli2017-06-26
|\ | | | | Add support of filesystem device to domain
| * Add support of filesystem device to domainFlavio Castelli2017-06-19
| | | | | | | | | | Allow sharing of directories of the host with the guest by using the filesystem device.
| * Fix: don't hide errorsFlavio Castelli2017-06-19
| | | | | | | | Ensure encoding errors are propagated to the user.
* | Merge pull request #132 from localghost/seed_rngFlavio Castelli2017-06-16
|\ \ | |/ |/| Seed RNG with current time.
| * Seed RNG with current time.Zbigniew Kostrzewa2017-06-15
| |
* | Fix broken testFlavio Castelli2017-06-16
| | | | | | | | The test got merged after we moved to the official libvirt go bindings.
* | Merge pull request #133 from localghost/cpu_modeFlavio Castelli2017-06-16
|\ \ | | | | | | Add support for setting CPU mode.
| * | Set "custom" CPU mode in CPU acceptance test.localghost2017-06-15
| | | | | | | | | | | | This is the default mode according to libvirt docs.
| * | Add support for setting CPU mode.Zbigniew Kostrzewa2017-06-15
| |/
* / use official libvirt-go bindingsThomas Hipp2017-06-16
|/ | | | Signed-off-by: Thomas Hipp <thipp@suse.de>
* Use file type definition for disksDarragh Bailey2017-06-09
| | | | | | | | | | | | | Using file type definition for disks allows virt-aa-helper to identify the backing file correctly from the generated XML and add the necessary permissions to permit qemu to be able to access the storage disk provided it is located within a storage pool. Ensure that reading of existing tfstate using pool/volume definition remains working for upgrade compatibility by checking first if `File` is a non-zero string. Fixes #126
* Add default case for libvirt statesThomas Hipp2017-06-07
| | | | Signed-off-by: Thomas Hipp <thipp@suse.de>
* domain: add configurable timeoutsThomas Hipp2017-06-07
| | | | | | | | | | Terraform supports configurable timeouts since v0.9.0. With time commit, it's possible to configure the timeout for the creation of a libvirt domain. It defaults to 5 minutes, but can be as short as 10 seconds. Signed-off-by: Thomas Hipp <thipp@suse.de>
* DRY codeFlavio Castelli2017-05-27
| | | | | | | Provide a generic function to return a copier to be used with `img.Import`. This reduces code duplication. Signed-off-by: Flavio Castelli <fcastelli@suse.com>
* Fix code broken accidentally by merge of PR 116Flavio Castelli2017-05-26
| | | | | | | Some of the code being used by CoreOS ignition was accidentally broken by a recent merge. Signed-off-by: Flavio Castelli <fcastelli@suse.com>
* Replace cryptic error with better oneFlavio Castelli2017-05-26
| | | | | | | | | | When the remote source was not found the check for its size failed because the size was empty, causing the to integer conversion to fail. The new code ensures the remote file exists before trying to convert its size. Signed-off-by: Flavio Castelli <fcastelli@suse.com>
* Merge pull request #107 from eamonnotoole/remote-ignition-temp-file-upstreamFlavio Castelli2017-05-26
|\ | | | | Write Ignition file as a volume in a libvirt storage pool
| * Write Ignition file as a volume in a libvirt storage poolEamonn O'Toole2017-03-23
| | | | | | | | | | | | | | | | | | | | | | This avoids the problem where the Ignition file is remote to the host on which the libvirt domain is being created. We've added a "libvirt_ignition" resource which manages the Ignition file in the libvirt volume - creates it, and destroys it. The "coreos_ignition" field in the libvirt_domain definition must point to the Id of a "libvirt_ignition" resource. The code is modelled on that used for CloudInit.
* | Use If-Modified-Since for downloading imagesAlvaro Saurin2017-03-29
| |
* | Code refactoring: rename structFlavio Castelli2017-03-29
| |
* | cloud-init: rework user-data handlingFlavio Castelli2017-03-29
| | | | | | | | | | | | | | | | Merge the user data specified by explicit terraform directives into the raw data provided by the user. The raw data has priority over the values specified using older directives. Signed-off-by: Flavio Castelli <fcastelli@suse.com>
* | user_data argument for cloud-initAlvaro Saurin2017-03-29
|/
* Add scsi controller option and wwn to virtual disksEamonn O'Toole2017-03-22
| | | | | | | | | | | | | | | | | | | We've added the facility to define a disk bus type of scsi to the specification of a disk in the domain definition. If the disk is a scsi disk, a random wwn is generated unless a wwn is provided for that disk. The disk stanza now looks as follows: disk { volume_id = "${libvirt_volume.mydisk.id}" scsi = "yes" wwn = "05abcd123456789a" } Having "scsi" present with any value will specify a scsi bus for the disk. If "wwn" is present for a scsci disk then the value of "wwn" is used for the disk wwn, otherwise a random value is generated.
* Merge pull request #103 from monstermunchkin/graphics-deviceFlavio Castelli2017-03-15
|\ | | | | create domain without graphics device
| * Add test for graphicsThomas Hipp2017-03-15
| | | | | | | | Signed-off-by: Thomas Hipp <thipp@suse.de>
| * Exclude `graphics` block on s390x and ppc64Thomas Hipp2017-03-15
| | | | | | | | | | | | | | Since the `graphics` and `video` devices cause problems on s390x and ppc64, they are ignored when creating a domain. Signed-off-by: Thomas Hipp <thipp@suse.de>
* | Increase code coverage by running TF acceptance testsEamonn O'Toole2017-03-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This has required a number of changes, first of all to .travis.yml to allow the TF acceptance tests to run: 1. To avoid the need to build libvirt, we've added the Ubuntu "cloud-archive:mitaka" repo which contains more recent versions of libvirt than those that ship with 14.04. This also cuts a couple of minutes off the travis run-time. 2. We need to define and start a default storage pool, since one doesn't exist by default on 14.04. 3. We need to add the travis user to the libvirtd group, and then run both tests with "sg" to set the libvirtd group without requiring a log-out/log-in 4. We need to set a couple of global environment variables for the travis run: - TF_ACC to true to ensure that TF acceptance tests are run - LIBVIRT_DEFAULT_URI needs to be set, we set it to qemu://system. - We've added a new environment variable that can be used to set the domain type for test purposes. We need to set the domain type to "qemu" for travis CI. "test" doesn't implement all of the libvirt functions that are used, and "kvm" isn't yet available in travis. 5. We have to add "-v" to the test and goveralls command to ensure that TF acceptance tests are run. In addition, we had to make the following change to resource_libvirt_domain_test.go - The "br0" bridge doesn't exist by default, so instead we use the default network in resource_libvirt_domain_test.go With these changes the test coverage goes up to 44% as measured by goveralls. Because we're using qemu emulation, the tests take about 2 mins to run on travis. We might not need to run both the tests and goveralls; one might do.
* | Some code coverage for utils.goFlavio Castelli2017-03-14
| |
* | Test coverage for network_defFlavio Castelli2017-03-14
| |