mirror of https://dev.ccchb.de/ccchb/ansible.git
bhyve: Restore old behavior wrt PASS
This commit is contained in:
parent
ada85d9126
commit
c15ca7e8a7
|
@ -29,7 +29,8 @@ foreground { fdmove -c 1 2 echo "bhyve-${NAME}: Starting VM ${NAME} with ${CPUS}
|
||||||
s6-notifyoncheck -d -w 100 -n 70
|
s6-notifyoncheck -d -w 100 -n 70
|
||||||
|
|
||||||
fdmove -c 2 1
|
fdmove -c 2 1
|
||||||
bhyve -c "{{ item.0.cpus }}" -m "{{ item.0.ram }}" -w -A -P -H
|
{% macro bhyve_run(extra_args="") -%}
|
||||||
|
bhyve -c "${CPUS}" -m "${RAM}" -w -A -P -H
|
||||||
-s "0,amd_hostbridge"
|
-s "0,amd_hostbridge"
|
||||||
-s "2:0,ahci${AHCI}"
|
-s "2:0,ahci${AHCI}"
|
||||||
-s "3,virtio-net,${NIC}"
|
-s "3,virtio-net,${NIC}"
|
||||||
|
@ -37,10 +38,12 @@ bhyve -c "{{ item.0.cpus }}" -m "{{ item.0.ram }}" -w -A -P -H
|
||||||
{% for disk in item.0.disks if disk.virtio|default(False) -%}
|
{% for disk in item.0.disks if disk.virtio|default(False) -%}
|
||||||
-s "{{ disk.virtio_slot }},virtio-blk,/dev/zvol/{{ bhyve_pool }}/bhyve/guests/{{ item.0.name }}/{{ disk.name }}"
|
-s "{{ disk.virtio_slot }},virtio-blk,/dev/zvol/{{ bhyve_pool }}/bhyve/guests/{{ item.0.name }}/{{ disk.name }}"
|
||||||
{% endfor -%}
|
{% endfor -%}
|
||||||
{% if item.0.password is defined -%}
|
|
||||||
-s "29,fbuf,tcp=[::1]:${PORT},w=800,h=600,password=${PASS}"
|
|
||||||
{% endif -%}
|
|
||||||
-s "31,lpc"
|
-s "31,lpc"
|
||||||
-l "com1,/dev/${COM}"
|
-l "com1,/dev/${COM}"
|
||||||
-l "bootrom,${ROM}"
|
-l "bootrom,${ROM}"
|
||||||
"${NAME}"
|
{{ extra_args }} "${NAME}"
|
||||||
|
{%- endmacro %}
|
||||||
|
ifelse { test -n "$PASS" } {
|
||||||
|
{{ bhyve_run('-s "29,fbuf,tcp=[::1]:${PORT},w=800,h=600,password=${PASS}"') }}
|
||||||
|
}
|
||||||
|
{{ bhyve_run() }}
|
||||||
|
|
Loading…
Reference in New Issue