[virt-tools-list] virt-manager and user ID

Cole Robinson crobinso at redhat.com
Sun Jan 6 15:22:56 UTC 2013


On 01/03/2013 06:36 PM, bibop554 wrote:
> Hello,
> 
> I use debian testing and virt-manager 0.9.1.
> I don't understand why virtual machines that i try to create cannot read files
> that i own, such as .iso files
> I see that kvm is started with user=libvirt-qemu, but i really don't
> understand why. Why isn't kvm started with the user that started virtual-manager ?

Because you are talking to the system libvirtd instance over RPC which is
launching the VMs.

> Is there a way to tell virt-manager to start kvm with the same user he has
> been started with, so that kvm could read my .iso file ?
> 
> another, related question:
> How could 2 users start their own VMs and be sure that VM of user #1 cannot
> write on disks of user #2, if both VMs are started in user=libvirt-qemu ?

That's what svirt handles, but your host needs to have selinux or apparmor
enabled.

It sounds like you are expecting the behavior provided by the qemu:///session
libvirt URI, which auto-launches a libvirtd instance as your current user. You
can use that with virt-manager like

virt-manager --connect qemu:///session

However functionality is not entirely equivalent, particularly the networking
mode is less featureful (getting good networking basically requires root,
hence the system libvirtd instance)

- Cole




More information about the virt-tools-list mailing list