aboutsummaryrefslogtreecommitdiffstats
path: root/vm/vmm
diff options
context:
space:
mode:
authorGreg Steuck <blackgnezdo@gmail.com>2018-12-02 05:22:10 -0800
committerDmitry Vyukov <dvyukov@google.com>2018-12-02 13:22:10 +0000
commit7a0edfbe7c3703a0bf48f01dd818173a68a8f747 (patch)
tree90c0faa35925f3a0cfcdd376315265a6936e396f /vm/vmm
parent048d09b2054f0baeea83fe2595e496c0630e845f (diff)
vm/gce: use openbsd console diagnostic code for both vmm and gce
* openbsd: use console diagnostic code for both vmm and gce. * gometalinter wants less indentation and more stuff in scope * Comment no longer applies
Diffstat (limited to 'vm/vmm')
-rw-r--r--vm/vmm/vmm.go18
1 files changed, 1 insertions, 17 deletions
diff --git a/vm/vmm/vmm.go b/vm/vmm/vmm.go
index 72f47489c..4ba7d9a2f 100644
--- a/vm/vmm/vmm.go
+++ b/vm/vmm/vmm.go
@@ -311,23 +311,7 @@ func (inst *instance) Run(timeout time.Duration, stop <-chan bool, command strin
}
func (inst *instance) Diagnose() bool {
- // Note: this only works if kernel actually paniced and kernel shows panic console.
- // If kernel just hanged, we've lost connection or detected some non-panic error,
- // console still shows normal login prompt.
- commands := []string{
- "",
- "set $lines = 0", // disable pagination
- "show panic",
- "trace",
- "show registers",
- "show proc",
- "ps",
- }
- for _, c := range commands {
- inst.consolew.Write([]byte(c + "\n"))
- time.Sleep(1 * time.Second)
- }
- return true
+ return vmimpl.DiagnoseOpenBSD(inst.consolew)
}
// Run the given vmctl(8) command and wait for it to finish.