Skip to content

Commit

Permalink
[qemu] Refuse to start while stopping
Browse files Browse the repository at this point in the history
  • Loading branch information
ricab committed Apr 15, 2024
1 parent 6082e24 commit 1e8d0e9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/platform/backends/qemu/qemu_virtual_machine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,10 @@ void mp::QemuVirtualMachine::start()
is_starting_from_suspend = true;
network_deadline = std::chrono::steady_clock::now() + 5s;
}
else if (state == State::stopping)
{
throw std::runtime_error(fmt::format("Cannot start {} while it is stopping", vm_name));
}
else
{
// remove the mount arguments from the rest of the arguments, as they are stored separately for easier retrieval
Expand Down

0 comments on commit 1e8d0e9

Please sign in to comment.