Force stop VM via terminal


Go to solution Solved by shawnngtq,

Recommended Posts

Hi, sometimes when I do gpu passthrough and start the VM, it will cause the VM tab page to hang.

 

1. I am unable to force stop VM since page is empty

2. If I go to the terminal and execute any `virsh` command, the command will hang as well

 

Is there any way we can force kill the VM? Maybe `kill -9 <VM process>`?

 

It's kinda troublesome to restart the PC everytime because of this ... Thanks

  • Like 1
Link to comment
  • Solution

I noticed that the reason VM page hang is because my plex docker setting includes the gpu even though GPU is not in used that time. The moment I shut plex down, my VM page works => this is the root cause

 

As for the force stop VM via terminal, I still don't have a solution that doesn't include system reboot / shutdown.

 

Maybe as of 6.9.2, it's not possible. But I do hope this can be a future feature. Afterall slackware OS is still Linux-based, terminal should be able to do everything, considering that the default terminal user is already root user.

  • Upvote 2
Link to comment
  • 1 year later...

One solution is to simply stop the conflicting container. It requires you to know that the reason it is hanging is a GPU access conflict and to know which container but it works for me.

 

You can do that with:

docker container stop <name-of-container>

 

Edited by voyager12
Add docker command
  • Upvote 1
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.