Virt-manager cannot start image

Hi altogether, :wave:

after a fresh install of Lubuntu 20.04.1 and installation of kvm, qemu and virt-manager I encountered the following problem:

My VM image (which I still have on my third data partition) - it´s BodhiLinux BTW - can be found by virt-manager but it cannot be accessed due to permission problems.

When trying to access it I get the following messages (translated roughly from German):

  • The emulator doesn´t have search authorization for the path “[…].img”
  • virt-manager asks if that should be changed; afterwards: changing of the permissions caused some errors: Errno 1 process not allowed
  • Installation cannot be completed (no authorization)

Here (virt-manager › Wiki › ubuntuusers.de ) it says:

“During the installation, libvirt-bin creates its own group, this is called libvirtd. All users who are to use VMM must be added to this group.”
(translated from German)

But this is not the case. The group libvirtd doesn´t exist at all :frowning:, just libvirt, libvirt-dnsmasq and libvirt-qemu.

I myself am a member of the following groups:

groups rosika
rosika : rosika adm cdrom sudo dip plugdev kvm lpadmin sambashare libvirt

I´m stuck at that point. :slightly_frowning_face:
I so hope there´s someone out there who may be able to help.

Thanks so much in advance.
Many greetings.
Rosika :slightly_smiling_face:

1 Like

Hi all,

I have some new info regarding this very topic:

As this problem seems to be based on permissions granted (or not granted) I tried the following:

As a test I copied the img-file from the third partition to /home/rosika. Now virt-manager works as desired. :grinning:
It can access the file without any difficulties, i.e. my VM runs perfectly.

As a second step I looked at permissions:
The img-file has got the same permissions on the third partition and on the home partition.:

-rw-rw-rw-  1 root   root    18G Jan 20 23:10 testing-image.img # dritte Partition
-rw-rw-rw- 1 rosika rosika 18G Jan 22 18:55 testing-image.img # /home-Partition

But there´s a difference to be observed when looking at owner and group.

Yet I don´t want to run virt-manager as root and still run my img-file from the third partition.
So it seems I have to apply some changes.

I´m not sure whether my train of reasoning is correct though. :roll_eyes: :question:

Perhaps one of you folks can help me with my problem…

Thanks so much in advance.
Greetings.
Rosika :slightly_smiling_face:

1 Like

And if you change ownership of testing-image.img?
Say, with sudo chown rosika.rosika testing-image.img.

EDIT: sudo chown rosika:rosika testing-image.img

1 Like

Hello Mina,

how nice to hear from you again. :smiley:

Thanks for the suggestion. I was thinking along those lines too but still wanted to know what others might think of the matter.
So I´ll try it out and let you know what I will have achieved.

Thanks again.
Many greetings.
Rosika :slightly_smiling_face:

P.S.:

I got a bit confused as far as the syntax is concerned. Shouldn´t the command be

sudo chown rosika:rosika testing-image.img

with a colon between user and group?

Of course, you’re right! I didn’t hit the shift key long enough. My mistake.

1 Like

Thanks Mina for the confirmation. :slightly_smiling_face:

1 Like

@Mina:

Hi again.

You wouldn´t believe it, Mina, but it seems changing ownership didn´t solve the problem at all.
Now it´s:
-rw-rw-rw- 1 rosika rosika 18G Jan 20 23:10 testing-image.img

But I still get those permission problems:

It´s really weird, espescially in view of the fact that I haven´t changed anything (except what I did just now). And in Lubuntu bionic virt-manager had no problem running the VM. :roll_eyes:

But thanks for your suggestion anyway. :kissing:

Many greetings from Rosika :slightly_smiling_face:

1 Like

Hi again,

there´s still a slight difference of permissions in the folder in which the img-file resides:

drwxrwxr-x 2 rosika rosika 4,0K Jan 22 18:18 kgw_prov # folder on the home partition
drwxrwxrwx  4 rosika rosika     4,0K Jun 20  2020 für_qemu2 # folder on the 3rd partition

No idea whether that would have any effect on the outcome :roll_eyes: :question:

So sorry, it didn’t help. I’m a bit lost here as I have never used virt-manager (always virtualbox) but there are a couple of reasons, I could imagine.

  1. The version, you installed, just is buggy. No remedy, just wait for an update.
  2. The disk, you mounted, is dynamically mounted in /media/user. Perhaps it would be better to mount the medium permanently through /etc/fstab.
  3. Perhaps virt-manager needs setuid permissions. chmod u+s path-to-bin/virt-manager

Just guessing…

1 Like

Hi @Mina ,

thanks a lot for your help anyway.

Hmm, you may very well be right here. The thing is: it used to work (bionic) perfectly despite the fact that there´s no fstab-entry for the third partition. :roll_eyes:

I have the suspicion your point regarding setuid may worth be investigating as the error-text (see my screenshot) refers to something connected to uid as well.

Thanks so much for the link. I´ll look into it.

I´ll keep you posted. :kissing_smiling_eyes:
Many greetings.
Rosika :slightly_smiling_face:

Hi @Mina,

just want to let you know that I could get my problem solved. :wink:

I posted this very issue on github: virt-manager cannot start image · Issue #217 · virt-manager/virt-manager · GitHub .
Pavel Hrdina came upt with the correct hint:

[…] Usually it means that you need to set X (execute) permission on each directory for the whole path to the image.

The path to my img-file is:

/media/rosika/f14a27c2-0b49-4607-94ea-2e56bbf76fe1/für_qemu2/testing-image.img .

It turned out that the folder /media/rosika/ lacked execute permissions. Those I granted:

drwxr-x--x+ 6 root root 4,0K Jan 26 13:37 rosika/

And now it works as desired. :+1:
Virt-manager can access the img-file on the data partition and the VM can run. :wink:

Thanks a lot for your help and advice, MIna.

Many greetings.
Rosika :slightly_smiling_face:

Great!!! :smiley:

In the end, I didn’t help you, I just made you lose time in things that didn’t work. :frowning_face: Sorry for that.

Das Gegenteil von “gut” ist nicht “böse”, sondern “gut gemeint”.

K. Tucholski

1 Like

Hi Mina,

no need to apologize at all.

It´s always good and indeed advisable to talk to knowledgeable people like you before taking action of any kind.
Plus: this way I can learn more about the matter in question. :+1:

In fact it´s not time I lost but it´s me who has to thank you for taking time out of your day and putting up with my problems. :blush:

So at any rate: be thanked once more. :kissing_closed_eyes: :hearts:

Have a nice day and keep safe.
Many greetings.
Rosika :slightly_smiling_face:

2 Likes