mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-30 23:37:45 +00:00
Revert: "sandbox: remove network before stopping vm"
This reverts commit 794e08e243
.
It breaks vfio device passthru as we need to bind the device
back to host when removing the endpoint. And that is not possible
when qemu is still running (thus holding reference to the device).
Signed-off-by: Peng Tao <bergwolf@hyper.sh>
This commit is contained in:
@@ -1473,11 +1473,6 @@ func (s *Sandbox) Stop(force bool) error {
|
||||
}
|
||||
}
|
||||
|
||||
// Remove the network.
|
||||
if err := s.removeNetwork(); err != nil && !force {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := s.stopVM(); err != nil && !force {
|
||||
return err
|
||||
}
|
||||
@@ -1486,6 +1481,11 @@ func (s *Sandbox) Stop(force bool) error {
|
||||
return err
|
||||
}
|
||||
|
||||
// Remove the network.
|
||||
if err := s.removeNetwork(); err != nil && !force {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := s.storeSandbox(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
Reference in New Issue
Block a user