aboutsummaryrefslogtreecommitdiffstats
path: root/vm/vmimpl/vmimpl.go
diff options
context:
space:
mode:
Diffstat (limited to 'vm/vmimpl/vmimpl.go')
-rw-r--r--vm/vmimpl/vmimpl.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/vm/vmimpl/vmimpl.go b/vm/vmimpl/vmimpl.go
index 617f9bc0f..81f798d26 100644
--- a/vm/vmimpl/vmimpl.go
+++ b/vm/vmimpl/vmimpl.go
@@ -56,6 +56,16 @@ type Env struct {
Config []byte // json-serialized VM-type-specific config
}
+// BootError is returned by Pool.Create when VM does not boot.
+type BootError struct {
+ Title string
+ Output []byte
+}
+
+func (err BootError) Error() string {
+ return fmt.Sprintf("%v\n%s", err.Title, err.Output)
+}
+
// Create creates a VM type that can be used to create individual VMs.
func Create(typ string, env *Env) (Pool, error) {
ctor := ctors[typ]