| Commit message (Collapse) | Author | Age |
| |
|
| |
|
|
|
|
|
|
| |
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
|
|
|
|
| |
We have to `free()` the stream once they are no longer used.
|
|
|
|
| |
Signed-off-by: Thomas Hipp <thipp@suse.de>
|
|
|
|
|
|
|
| |
Network addresses when trying to format the prefix as an int,
while it is a string
Fixes: #160
|
|
|
|
|
|
|
| |
Use `<host/>` instead of `<NetworkDHCPHost/>` as libvirt complains
about the latter.
Signed-off-by: Thomas Hipp <thipp@suse.de>
|
|
|
|
|
|
| |
This fixes #135.
Signed-off-by: Thomas Hipp <thipp@suse.de>
|
|
|
|
|
|
|
|
| |
Use the correct cloudinit ID if things have changed.
This fixes #145.
Signed-off-by: Thomas Hipp <thipp@suse.de>
|
|
|
|
| |
Signed-off-by: Thomas Hipp <thipp@suse.de>
|
|
|
|
| |
Signed-off-by: Thomas Hipp <thipp@suse.de>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
Make sure to only then free volumes if there are no errors.
This fixes #151.
Signed-off-by: Thomas Hipp <thipp@suse.de>
|
| |
|
|
|
|
|
|
|
| |
When specifying a console port, it won't panic because of an invalid
interface conversion.
Signed-off-by: Thomas Hipp <thipp@suse.de>
|
|
|
|
|
|
|
|
| |
Replace the custom XML structs with libvirt's offcial ones.
This resolves #143.
Signed-off-by: Thomas Hipp <thipp@suse.de>
|
| |
|
|
|
|
| |
separated method.
|
|
|
|
| |
configuration.
|
| |
|
| |
|
|\
| |
| | |
Add support of filesystem device to domain
|
| |
| |
| |
| |
| | |
Allow sharing of directories of the host with the guest by using the
filesystem device.
|
| |
| |
| |
| | |
Ensure encoding errors are propagated to the user.
|
|\ \
| |/
|/| |
Seed RNG with current time.
|
| | |
|
| |
| |
| |
| | |
The test got merged after we moved to the official libvirt go bindings.
|
|\ \
| | |
| | | |
Add support for setting CPU mode.
|
| | |
| | |
| | |
| | | |
This is the default mode according to libvirt docs.
|
| |/ |
|
|/
|
|
| |
Signed-off-by: Thomas Hipp <thipp@suse.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Signed-off-by: Thomas Hipp <thipp@suse.de>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
Some of the code being used by CoreOS ignition was accidentally
broken by a recent merge.
Signed-off-by: Flavio Castelli <fcastelli@suse.com>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|\
| |
| | |
Write Ignition file as a volume in a libvirt storage pool
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|\
| |
| | |
create domain without graphics device
|
| |
| |
| |
| | |
Signed-off-by: Thomas Hipp <thipp@suse.de>
|
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
|
| | |
|