Skip to content

Commit

Permalink
Merge pull request #44 from mtb-xt/archlinuxify
Browse files Browse the repository at this point in the history
Archlinux support, libvirt zfs pool support.
  • Loading branch information
markgoddard authored Jan 23, 2020
2 parents 6f4ab93 + 2c803f1 commit c39cf58
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ Role Variables
- `device`: `disk` or `cdrom`
- `capacity`: volume capacity (can be suffixed with M,G,T or MB,GB,TB, etc) (required when type is `disk`)
- `format`: options include `raw`, `qcow2`, `vmdk`. See `man virsh` for the
full range. Default is `qcow2`
full range. Default is `qcow2`.
- `image`: (optional) a URL to an image with which the volume is initalised (full copy).
- `backing_image`: (optional) name of the backing volume which is assumed to already be the same pool (copy-on-write).
- `image` and `backing_image` are mutually exclusive options.
Expand Down
3 changes: 3 additions & 0 deletions meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ galaxy_info:
- name: Debian
versions:
- all
- name: ArchLinux
versions:
- all
galaxy_tags:
- cloud
- kvm
Expand Down
4 changes: 2 additions & 2 deletions templates/vm.xml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@
<source pool='{{ volume.pool }}' volume='{{ volume.name }}'/>
{% endif %}
{% if volume.target is undefined %}
<target dev='vd{{ 'abcdefghijklmnopqrstuvwxyz'[loop.index - 1] }}'/>
<target dev='vd{{ 'abcdefghijklmnopqrstuvwxyz'[loop.index - 1] }}' {% if volume.device | default(libvirt_volume_default_device) == 'cdrom' %}bus='sata'{% endif %}/>
{% else %}
<target dev='{{ volume.target }}' />
<target dev='{{ volume.target }}' {% if volume.device | default(libvirt_volume_default_device) == 'cdrom' %}bus='sata'{% endif %}/>
{% endif %}
</disk>
{% endfor %}
Expand Down
12 changes: 12 additions & 0 deletions vars/Archlinux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
# Who owns the serial console logs in console_log_path
libvirt_vm_log_owner: root

# The environment passed to virt_volume.sh
libvirt_vm_script_env_arch: {}

libvirt_vm_script_env: >-
{{ libvirt_vm_script_env_arch | combine(libvirt_vm_virsh_default_env) }}
# Archlinux qemu comes with kvm support compiled in
libvirt_vm_emulator: /usr/bin/qemu-system-x86_64

0 comments on commit c39cf58

Please sign in to comment.