libvirt.img is in-use, cannot mount


PR.

Recommended Posts

Hi,

 

Bit of an issue, I was having a problem with one core on my CPU being maxed out so I was stopping dockers trying to trace it (eventually found it was the directory caching plugin).

 

During that I set 'Enable VM's' to off, but now I can't turn it back on, the error "root: /mnt/user/system/libvirt/libvirt.img is in-use, cannot mount" is showing up in the logs.

 

I'm sure a reboot would fix the issue but wondering if there's another way?

 

Thanks

 

 

Link to comment
  • 7 months later...
  • 6 months later...
59 minutes ago, barf said:

fuser -c /mnt/user/system/libvirt/libvirt.img

ps -ef | grep pid that's using it

 

Mine was docker.  I had to stop all dockers and was able to restart kvm.

 

Did you have any docker container running that related to running VMs?  Cannot think of any other reason that libvirt.img would be in use by a docker container.

Link to comment
  • 2 weeks later...
  • 1 month later...

I also see many of my docker containers using libvirt.img when using fuser. I'm concerned whether it might be causing some of my Win10 hibernation issues. Can anyone confirm whether "fuser -c /mnt/user/system/libvirt/libvirt.img" should normally show docker pids?

Link to comment
  • 1 year later...

Did this ever get fixed?   I've got an issue with KVM not starting and doing the above fuser -c /mnt/user/system/libvirt/libvirt.img replies with a large number of processes.  Without killing them all and restarting the array/docker/server is there any other options? 

image.png

Link to comment
  • 1 month later...
On 10/25/2020 at 11:30 PM, isaw said:

Did this ever get fixed?   I've got an issue with KVM not starting and doing the above fuser -c /mnt/user/system/libvirt/libvirt.img replies with a large number of processes.  Without killing them all and restarting the array/docker/server is there any other options? 

Hi,

Same here. When I try to restart the Libvirt service I get the following error:

Dec 21 23:45:51 MOZART root: /mnt/user/system/libvirt/libvirt.img is in-use, cannot mount

... which seems to be caused by many processes:

root@MOZART:~# fuser -c /mnt/user/system/libvirt/libvirt.img
/mnt/user/system/libvirt/libvirt.img:   328   329   374cm   406   512   542m   611m   667m   726m  3948  5304c 10517c 10555c 12015 12857 12916c 13025c 13929 14060 16265 16802c 17139 17540c 17582 18255 18271c 18278c 18312 18522c 18523c 18524c 18525c 18526c 18686 18822 19091 19232c 20250 20251 20252 20253 21427c 21678 21706 21707 22021c 22564c 22580c 22581c 22805 22812m 22870m 22871m 23030m 23501 23505 23509 23526 23527 23528 23529 23530 23546m 23557e 23559e 24224 24225 24226 24246 24247 24248 24249 25821 26019c 26908 27102 27344c 27861 28083c 29489m 29531c 29601 30878 30918 30919 30978cm 31046m 32746

I have the virt-manager Docker container installed but the issue occurred while it was stopped.

I confirm that stopping the array and starting it again fixes the issue.

Best,

OP

Link to comment
  • 8 months later...

Going to bump this as I think it needs to be upgraded to a bug.

When disabling VmManager via settings it will stop, but reenabling required the docker service to stop also (the .img file is being accessed by all Dockers).  Once docker is stopped VM can be restarted, then Docker restarted.

Link to comment
On 8/31/2021 at 12:36 AM, isaw said:

When disabling VmManager via settings it will stop, but reenabling required the docker service to stop also (the .img file is being accessed by all Dockers).  Once docker is stopped VM can be restarted, then Docker restarted.

 

No reason I can think of that the libvirt.img file should ever be accessed by docker containers (in fact it should not even be visible to them I would have thought!). 

 

I have just checked on my own live system  running 6.9.2 and see similar behaviour.  My guess is they disappear when stopping the VM service as libvirt.iimg then gets unmounted.  Feels like feedback is needed from someone closer to @limetech as to whether this is a bug or expected behaviour and if it is expected behaviour the rationale so we understand what is happening.

 

EDIT:  Just checked on my development system running 6.10.0 rc2d and am not seeing this behaviour.  Not sure if that means this is a fixed bug or the development system is not running whatever triggers the behaviour. Might need  temporarily put the live system on that release to see if the behaviour disappears.

 

EDIT2:  Just brought my live system online with 6.10.0 rc2d and still see this behaviour.

 

Link to comment
  • 1 month later...

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.