How do you dismount an iso from dom0?

Tried about fifteen searches on this one.

I have a windows 7 iso, on a drive mounted on one of my qubes.

The problem is, when I use it to install windows 7, it gets mounted in dom0 for the install, and it cannot be unmounted. Which means I cannot unmount, over in the qube it resides, the drive that it is on, because that drive is “busy.”

I had to kill the qube. Why cant we “eject” or “unmount” things from dom0? (If we can it should be added to the device dropdown menu) (I couldn’t figure out where the mount point actually was or even if there is one.)

(Even now I have a dozen mounts of qubes windows tools iso, each one made as I tried to get the thing to install properly on my windows qube…how do I get rid of them?)

If you source the iso from a different domU (not dom0) then when you restart the source domU the mapping should be removed.

I have a VM called isos for this use.

B

1 Like

Not a bad notion, having that ISO VM.

Of course, in the situation that I was in, that was putting the cart before the horse. I couldn’t shut down the Qube (without killing it) because the iso was on a mounted drive; I couldn’t unmount the drive because it was “busy”, it was busy because dom0 had mounted the iso and I couldn’t figure out how to get it to unmount it. All I had to do was shut down the VM!!

I’m gathering there’s no way to just tell dom0 to unmount the dang thing gracefully.

However, I can take what you said as suggesting a procedural change, and I’ll do that: Move isos to a different virtual machine. (In fact I already have one similar enough in purpose that that makes sense.) That one, of course, won’t suffer from what I am calling “mount lock” as it mounts nothing.

I think you need to detach the iso with:
sudo losetup -d /dev/loopX
In your VM that has this iso.

It was dom0 itself that had mounted the ISO.

OtherQube had mounted the drive that the ISO lived on. I couldn’t dismount that drive in OtherQube, because I couldn’t get dom0 to dismount the ISO, so the drive mount (in OtherQube) was “busy” and couldn’t be dismounted.

What you said is worth trying as an experiment in dom0.

When you start qube with cdrom in dom0:
qvm-start yourqube --cdrom=isoqube:/home/user/ISO/someiso.iso
Then it’ll create new loop device in isoqube qube and associate it with this ISO file and then dom0 will use this loop device in isoqube qube for yourqube qube.
So you need to detach this loop device in isoqube qube and then you can unmount your drive in isoqube qube.

OK will investigate. Thanks!

I do know from when this happens that there is (additionally?) a loop in dom0.

It’s not the loop in dom0, but in isoqube.
Check for loops in dom0:
sudo losetup -a
And then in isoqube and see that this loop is in isoqube.