m-bers / docker-virt-manager

Docker virt-manager
GNU General Public License v3.0
124 stars 27 forks source link

Permission denied during VM installation #18

Closed RodBelaFarin closed 7 months ago

RodBelaFarin commented 1 year ago

I am trying to install a VM, but I am always ending up in a permission denied error for the .iso image, which I just before chose from the file browser.

Unfortunately I also can't copy the error message to the clipboard, but I took some screenshots. I guess (and hope) the error speaks for itself.

Screenshot from 2023-03-28 11-27-14 Screenshot from 2023-03-28 11-27-29

igorkulman commented 1 year ago

Same problem, tried fixing permissions etc but it did not help.

owenthewizard commented 1 year ago

I also have this issue, is this project still maintained @m-bers?

Edit: I think I know the issue. The path in docker has to match the path on the host. It makes sense since libvirtd is running on the host and thus looking for the files there, even if they are/aren't visible to virt-manager in docker.

m-bers commented 8 months ago

sorry everyone, I haven't maintained this image in a while but I am going to look into this soon.

RodBelaFarin commented 7 months ago

any news about this issue?

m-bers commented 7 months ago

I think @owenthewizard articulated what's going on here. This is not a bug--you need to make sure the image already exists on the libvirt host you're connecting to. In my example where libvirt and docker are on the same host, I do the mount /var/lib/libvirt/images:/var/lib/libvirt/images, and qcow2 and iso images would then go into that path. You could mount a different path like /iso_images:/var/lib/libvirt/images (or even /iso_images:/iso_images, but then you'd need to explicitly add this directory in the virt-manager UI after spinning up the container).

If libvirt and docker are on different hosts, then you'll need to get the image file to the libvirt host via some other method (e.g. scp).

owenthewizard commented 7 months ago

Perhaps this should be added to the documentation or a pinned issue?