Fix permission checking in `vm.{restart,stop}()`.