2f6dce9738
This patch adds a libvirt hook that saves the VM console log everytime it shutdown. This is great for troubleshooting because it allow us to see what happened with the VM on every boot instead of only the last one. Closes-Bug: #1506829 Related-Bug: #1393099 Change-Id: I4881dfc816a05c0fd2610b0b977e41c44a7e9517
14 lines
256 B
Bash
Executable File
14 lines
256 B
Bash
Executable File
#!/bin/bash
|
|
|
|
VM_LOG=%LOG_DIR%/$1
|
|
VM_ACTION=$2
|
|
|
|
if [ $VM_ACTION = "release" ]; then
|
|
if [ ! -f "${VM_LOG}_console.log" ]; then
|
|
return 0
|
|
fi
|
|
|
|
NOW=$(date +"%d-%m-%Y-%H:%M:%S")
|
|
mv "${VM_LOG}_console.log" "${VM_LOG}_console_${NOW}.log"
|
|
fi
|