Compare commits
No commits in common. "4cc2c52a6e3b9bb3d81d7a2969fffc5d52012a8c" and "ada85d9126df975848c037554d8abf3d0ceb4cb3" have entirely different histories.
4cc2c52a6e
...
ada85d9126
2 changed files with 5 additions and 12 deletions
|
@ -84,15 +84,11 @@ bhyve_guests:
|
|||
- DISKS
|
||||
disks:
|
||||
- name: system
|
||||
virtio: true
|
||||
virtio_slot: 8
|
||||
properties:
|
||||
volsize: 32g
|
||||
volblocksize: 4k
|
||||
primarycache: metadata
|
||||
- name: data
|
||||
virtio: true
|
||||
virtio_slot: 9
|
||||
properties:
|
||||
volsize: 128g
|
||||
volblocksize: 64k
|
||||
|
|
|
@ -29,8 +29,7 @@ foreground { fdmove -c 1 2 echo "bhyve-${NAME}: Starting VM ${NAME} with ${CPUS}
|
|||
s6-notifyoncheck -d -w 100 -n 70
|
||||
|
||||
fdmove -c 2 1
|
||||
{% macro bhyve_run(extra_args="") -%}
|
||||
bhyve -c "${CPUS}" -m "${RAM}" -w -A -P -H
|
||||
bhyve -c "{{ item.0.cpus }}" -m "{{ item.0.ram }}" -w -A -P -H
|
||||
-s "0,amd_hostbridge"
|
||||
-s "2:0,ahci${AHCI}"
|
||||
-s "3,virtio-net,${NIC}"
|
||||
|
@ -38,12 +37,10 @@ bhyve -c "${CPUS}" -m "${RAM}" -w -A -P -H
|
|||
{% 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 }}"
|
||||
{% endfor -%}
|
||||
{% if item.0.password is defined -%}
|
||||
-s "29,fbuf,tcp=[::1]:${PORT},w=800,h=600,password=${PASS}"
|
||||
{% endif -%}
|
||||
-s "31,lpc"
|
||||
-l "com1,/dev/${COM}"
|
||||
-l "bootrom,${ROM}"
|
||||
{{ extra_args }} "${NAME}"
|
||||
{%- endmacro %}
|
||||
ifelse { test -n "$PASS" } {
|
||||
{{ bhyve_run('-s "29,fbuf,tcp=[::1]:${PORT},w=800,h=600,password=${PASS}"') }}
|
||||
}
|
||||
{{ bhyve_run() }}
|
||||
"${NAME}"
|
||||
|
|
Loading…
Reference in a new issue