runtime: only call stopVirtiofsd when shared_fs is virtio-fs
If shared_fs is set to virtio-9p, the virtiofsd is not started,
so there is no need to stop it.
Fixes:
@@ -984,9 +984,11 @@ func (q *qemu) StopVM(ctx context.Context, waitOnly bool) error {
}
}
+ if q.config.SharedFS == config.VirtioFS {
if err := q.stopVirtiofsd(ctx); err != nil {
return err
}
+ }
return nil
}
