Skip to content

Commit

Permalink
Improve verbosity and log files
Browse files Browse the repository at this point in the history
  • Loading branch information
electrocucaracha committed Jan 7, 2025
1 parent 57e32e6 commit a04e355
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
7 changes: 5 additions & 2 deletions .github/actions/vagrant-up/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,15 @@ runs:
if: failure()
shell: bash
run: |
VBoxBugReport --text --output output/vbox_bug_report.log
VBoxManage list runningvms --long
- name: Upload VM logs
if: failure()
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # 4.5.0
with:
name: vm-logs-${{ inputs.os }}_${{ inputs.provider }}-${{ github.run_id }}
path: ~/.config/VirtualBox/VBoxSVC.log
compression-level: 0 # no compression
path: |
output/*.log
~/.config/VirtualBox/VBoxSVC.log
~/VirtualBox\ VMs/*/Logs/VBoxUI.log
retention-days: 7
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ OVMF.fd
*.dic
node_modules/
package*.json
output/
8 changes: 7 additions & 1 deletion Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ Vagrant.configure('2') do |config|

# Configure DNS resolver
config.vm.provision 'shell', privileged: false, inline: <<-SHELL
echo "Configure DNS resolver"
if command -v systemd-resolve && sudo systemd-resolve --status --interface eth0; then
sudo systemd-resolve --interface eth0 --set-dns 1.1.1.1 --flush-caches
sudo systemd-resolve --status --interface eth0
Expand All @@ -49,6 +50,7 @@ Vagrant.configure('2') do |config|

# Install requirements
config.vm.provision 'shell', privileged: false, inline: <<-SHELL
echo "Install requirements"
if ! command -v curl; then
source /etc/os-release || source /usr/lib/os-release
case ${ID,,} in
Expand All @@ -61,6 +63,7 @@ Vagrant.configure('2') do |config|
SHELL
# Upgrade Kernel version
config.vm.provision 'shell', privileged: false, inline: <<-SHELL
echo "Upgrade Kernel version"
source /etc/os-release || source /usr/lib/os-release
case ${ID,,} in
rhel|centos|fedora)
Expand All @@ -84,14 +87,17 @@ Vagrant.configure('2') do |config|
'CREATE_SRIOV_VFS': create_sriov_vfs.to_s
}
sh.inline = <<-SHELL
echo "Provision server"
set -o errexit
mkdir /vagrant/output
cd /vagrant/
PROVIDER=#{vagrant_provider} ./setup.sh | tee ~/setup.log
PROVIDER=#{vagrant_provider} ./setup.sh | tee /vagrant/output/setup.log
SHELL
end
config.vm.provision :reload
config.vm.provision 'shell', privileged: false do |sh|
sh.inline = <<-SHELL
echo "Validate installation"
set -o errexit
cd /vagrant
./validate.sh
Expand Down

0 comments on commit a04e355

Please sign in to comment.