summaryrefslogtreecommitdiff
path: root/pkg/machine/qemu/machine.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/machine/qemu/machine.go')
-rw-r--r--pkg/machine/qemu/machine.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/pkg/machine/qemu/machine.go b/pkg/machine/qemu/machine.go
index b9f23662e..071da94a6 100644
--- a/pkg/machine/qemu/machine.go
+++ b/pkg/machine/qemu/machine.go
@@ -480,6 +480,10 @@ func (v *MachineVM) Start(name string, _ machine.StartOptions) error {
wait = time.Millisecond * 500
)
+ if v.Starting {
+ return fmt.Errorf("machine %q is already in the process of being started", v.Name)
+ }
+
v.Starting = true
if err := v.writeConfig(); err != nil {
return fmt.Errorf("writing JSON file: %w", err)