Jump to content
rorton

[SOLVED] VM will not start when a docker image is running -

11 posts in this topic Last Reply

Recommended Posts

Been messing about with VM's all day, and at the moment I have a problem starting KVM. 

 

If I reboot the machine, all is fine, kvm starts. If I stop KVM, and then restart it, the VMs tab appears, but clicking on it gives me a Libvirt Service failed to start error. 

 

in the system log I get the error /mnt/cache/vms/system/libvirt/libvirt.img is in-use, cannot mount

 

If I disable docker, then start KVM, that works ok.

If I enable docker, but don't enable any containers - that's also OK,

but if I start a container, then I get this problem. 

 

Any idea why this happens?

 

 

nas-diagnostics-20191110-0031.zip

Edited by rorton
uploaded diag files

Share this post


Link to post

sorry, forgot - uploaded now - at the time, KVM was running along with docker, so I stopped KVM, started it again, and got the error message

Share this post


Link to post

What if you start only 1 container then try to enable VMs?

Share this post


Link to post

Same prob. I started at the top of my list of containers, and enabled the first one and the problem happened. 
 

disabled that again, and then tried the second container and so on. I’ve not done them all, but it seems like any one container 

Share this post


Link to post

I'll assume that you've rebooted already to no avail.

 

Try uninstalling SNMP (and reboot) and see if that makes a difference

 

After that, uninstall NerdPack (and reboot)

 

If still no difference, restart in safe mode

Share this post


Link to post

Docker containers also seem to not want to stop when kvm is stopped, if I start kvm, even though it complains about libvirt, I can at least stop a docker container. 

Share this post


Link to post

Reboot is fine, I was assuming that kvm starts before docker?
once I reboot, and kvm is running, if I then stop kvm, it won’t start

 

Reboot again will work which is what got me thinking kvm starts before docker hence works on reboot

Share this post


Link to post

Docker technically starts first, but in the very small delay before the containers start, kvm will get started.

 

I'd still try safe mode to see if it happens there.

Share this post


Link to post

I uninstalled snmp plugin as suggested and that seems to have resolved it

 

i uninstalled it, then started one docker container at a time, started kvm to check, proved good, so stopped kvm, started the next docker (keeping the first going) and went through that with all of the containers and they are running, and i can stop kvm and the start again with no error. 
 

thanks for the advice on that, would never have put it down to a plug in, I’ve had snmp running for a long time, although there are problems with it, as the system won’t start it on boot, I have to reinstall it every time I boot

 

Share this post


Link to post
11 minutes ago, rorton said:

system won’t start it on boot, I have to reinstall it every time I boot

because @kubed_zero has the plugin attempting to download the png and an auxillary script for it every time it installs (and at boot time the network is nowhere near running yet) instead of including those downloads within the ,plg itself

Share this post


Link to post
On 11/9/2019 at 6:06 PM, rorton said:

I have to reinstall it every time I boot

Weird, that doesn't happen for me! I also don't run any VMs or Docker though, so perhaps I'm missing some edge case there. What do plugins' installations have to do with KVM and Docker startup? 

 

On 11/9/2019 at 6:21 PM, Squid said:

because @kubed_zero has the plugin attempting to download the png and an auxillary script for it every time it installs (and at boot time the network is nowhere near running yet) instead of including those downloads within the ,plg itself

I'd be happy to push an update to include the images in the .plg file if I can find a way to do that! Or add a delay to the installation before trying to make a network call. Do you have any documentation or sample plugins that have this behavior that I could follow? I'm not sure how it would make a difference though, doesn't the plugin also need to download the SNMP package every time it installs, which also needs the network to be established? I took a quick look through the logs of @rorton  and saw the image network failure but didn't see how that failure related to the libvirt.img in use error.

 

Thanks!

Share this post


Link to post

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.