Skip to content

Commit

Permalink
Debug appliance virt install failure (#664)
Browse files Browse the repository at this point in the history
* roles: hosted_engine_setup: Log the Local VM console

Signed-off-by: Yedidyah Bar David <didi@redhat.com>

* WIP: Help debug bootstrap VM boot issues

- --graphics none: Will prevent creating a vnc console. I think that's
ok, at this stage. This should not affect the eventual engine VM conf.
So, use the serial console as the main one.

- --autoconsole text: Causes virt-install to automatically connect to
the VM's console and show it. This should make the console output be
included in the ansible log.

- --boot hd,bootmenu.enable=on,bios.useserial=on: Allow getting the boot
menu, useful for debugging/investigation. Also adds a few seconds to the
boot process.

Signed-off-by: Yedidyah Bar David <didi@redhat.com>

Signed-off-by: Yedidyah Bar David <didi@redhat.com>
  • Loading branch information
didib authored Jan 18, 2023
1 parent 9f9edc1 commit 320fcb5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
3 changes: 3 additions & 0 deletions changelogs/fragments/664-debug-virt-install.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
bugfixes:
- he-setup - Run virt-install with options more suitable for debugging (https://github.com/oVirt/ovirt-ansible-collection/pull/664).
3 changes: 3 additions & 0 deletions changelogs/fragments/664-log-local-vm-console.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
bugfixes:
- he-setup - Log the output sent to the serial console of the HostedEngineLocal VM to a file on the host, to allow diagnosing failures in that stage (https://github.com/oVirt/ovirt-ansible-collection/pull/664).
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,9 @@
virt-install -n {{ he_vm_name }}Local --os-variant rhel8.0 --virt-type kvm --memory {{ he_mem_size_MB }}
--vcpus {{ he_vcpus }} --network network=default,mac={{ he_vm_mac_addr }},model=virtio
--disk {{ local_vm_disk_path }} --import --disk path={{ he_local_vm_dir }}/seed.iso,device=cdrom
--noautoconsole --rng /dev/random --graphics vnc --video vga --sound none --controller usb,model=none
--memballoon none --boot hd,menu=off --clock kvmclock_present=yes
--autoconsole text --rng /dev/random --graphics none --sound none --controller usb,model=none
--memballoon none --boot hd,bootmenu.enable=on,bios.useserial=on --clock kvmclock_present=yes
--serial=pty,log.file=/var/log/libvirt/qemu/HostedEngineLocal-console.log
environment: "{{ he_cmd_lang }}"
register: create_local_vm
changed_when: true
Expand Down

0 comments on commit 320fcb5

Please sign in to comment.