Store console output to logfile on kvm guests
This commit is contained in:
parent
40963ea620
commit
6bf4815503
1 changed files with 3 additions and 1 deletions
|
@ -5,6 +5,7 @@
|
|||
|
||||
vars:
|
||||
letters: "{{ 'bcdefghijklmnopqrstuvwxyz'|list }}"
|
||||
console_log: "/var/log/libvirt/qemu/{{ inventory_hostname }}.console.log"
|
||||
vmhost_uri: "qemu+ssh://root@{{ vmhost }}/system"
|
||||
root_pubkey: "{{ lookup('file', '/srv/ansible-private/ssh/id_rsa.pub') }}"
|
||||
extra_disks: >-
|
||||
|
@ -62,7 +63,8 @@
|
|||
command: >
|
||||
virt-install --connect {{ vmhost_uri }} \
|
||||
--name {{ inventory_hostname }} \
|
||||
--graphics none --boot useserial=on --serial pty --noautoconsole \
|
||||
--graphics none --boot useserial=on --noautoconsole \
|
||||
--serial pty,log.file={{ console_log }} \
|
||||
--controller usb,model=none --sound none --memory {{ mem_size }} \
|
||||
--vcpus {{ num_cpus }} --cpu host-passthrough \
|
||||
--disk /srv/libvirt/ssd/{{ inventory_hostname }}.a.img,cache=none,format=raw,bus=virtio,size={{ dsk_size }} \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue