Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

libvirt.img is in-use, cannot mount

Featured Replies

19 hours ago, togbabe said:

Without needing to start the array, nor stop all the dockers, just go into your 'Libvirt storage location.'  Which - in my case is "/mnt/user/system/libvirt/libvirt.img" - and change the ownership of the libvirt.img file to root.

That doesn't work for me, you may be having a different issue, the problem is usually caused by the loop device not being detached, and changing the ownership of libvirt.img doesn't help with that, at least not for me.

  • 11 months later...
  • Replies 53
  • Views 15.2k
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • Yep, I've found later that the libvirt loopback image doesn't detach when you just stop VM manager but have containers running, not clear why that happens, since nothing is using it, but LT is aware o

  • A friend of mine had this problem and I tried many things to bypass this problem without rebooting, but I was not successful.   As the others posted, these commands don't return anything:

  • Just encountered the same problem, libvirt is located on my ZFS pool, this is my losetup output:   root@unRAID:~# losetup -l NAME SIZELIMIT OFFSET AUTOCLEAR RO BACK-FILE

Posted Images

I just came across this with a different error, although I had the same symptoms (libvirt img showing up in losetup -l and fuser -c showing all the docker containers). After stopping the VM service, starting it gave this error:

Apr 17 20:47:46 Media emhttpd: shcmd (2867675): /usr/local/sbin/mount_image '/mnt/user/system/libvirt/libvirt.img' /etc/libvirt 1
Apr 17 20:47:46 Media root: '/mnt/windows/system/libvirt/libvirt.img' attached to loop device, cannot mount
Apr 17 20:47:46 Media emhttpd: shcmd (2867675): exit status: 1

The workaround of stopping the docker service was successful, it released libvirt from the loop device immediately without any extra messages in the syslog.

  • 3 weeks later...

Ran into the same issue today, also on Unraid 7.3.0-rc.1.
I was unable to start up libvirt until I had shut down docker. Once docker was disabled, libvirt started up fine, and I re-enabled docker.

  • 5 weeks later...

I have the same issue. Need to stop docker before re-starting vm service. Pretty annoying...

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...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.