<div dir="ltr"><div>Thanks for the hint with the security_driver option. <br></div><div>However, the error still appears after adding the following line to the configuration file <br></div><div><br></div><div>security_driver = "none"</div><div><br></div><div><br></div><div>and restarting the services</div><div><br></div><div>sudo service libvirtd restart</div><div>sudo service libvirt-guests restart<br></div><div><br></div><div><br></div><div><br></div><div>On a side note:<br></div><div><br></div><div>/etc/libvirt/qemu.conf states that "The default security driver is SELinux" <br></div><div><br></div><div>So could SELinux cause the blocking of the secret file? How would enable access to the file in SELinux?<br>
</div><div><br></div><div><br></div><div>the domain xml is attached...</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Am Di., 30. Juli 2019 um 11:06 Uhr schrieb Guido Günther <<a href="mailto:agx@sigxcpu.org">agx@sigxcpu.org</a>>:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
On Tue, Jul 30, 2019 at 10:43:25AM +0200, Dominik Reusser wrote:<br>
> Thanks for your reply<br>
> <br>
> On 30.07.19 09:00, Guido Günther wrote:> Hi,<br>
> > On Tue, Jul 30, 2019 at 07:36:18AM +0200, Dominik wrote:<br>
> >> Package: libvirt-daemon<br>
> >> Version: 5.0.0-4<br>
> >> Severity: normal<br>
> >><br>
> >> Dear Maintainer,<br>
> >><br>
> >> after upgrading to buster, the encrypted kvm-guests stop to work. An<br>
> error is thrown about missing rights to the file containing the encryption<br>
> secret, which I placed under /etc/libvirt/secret/.<br>
> >><br>
> >> I openend a question with more details on serverfault a while ago:<br>
> <a href="https://serverfault.com/questions/974689/encrypted-qemu-virtual-machines-do-not-start-after-upgrade-to-buster-permission" rel="noreferrer" target="_blank">https://serverfault.com/questions/974689/encrypted-qemu-virtual-machines-do-not-start-after-upgrade-to-buster-permission</a><br>
> > As a workaround you can disable apparmor<br>
> Do I need to disable apparmor completely through grub as described here:<br>
> <a href="https://wiki.debian.org/AppArmor/HowToUse" rel="noreferrer" target="_blank">https://wiki.debian.org/AppArmor/HowToUse</a> or would it be possible to<br>
> disable the profiles for libvirt with aa-disable?<br>
<br>
<br>
Try<br>
<br>
security_driver = "none"<br>
<br>
in /etc/libvirt/qemu.conf.<br>
<br>
instead of disabling apparmor overall.<br>
<br>
Attaching the domain xml might help reproducing the bug.<br>
Cheers,<br>
-- Guido<br>
<br>
> <br>
> <br>
> > but can you attach the dmesg<br>
> > output after trying to start a domain?<br>
> $ virsh --connect qemu:///system start Feigenbaum<br>
> error: Failed to start domain Feigenbaum<br>
> error: internal error: process exited while connecting to monitor:<br>
> 2019-07-30T08:15:39.975264Z qemu-system-x86_64: --object<br>
> secret,id=sec0,file=/etc/libvirt/secrets/Feigenbaum.secret: Unable to read<br>
> /etc/libvirt/secrets/Feigenbaum.secret: Failed to open file<br>
> “/etc/libvirt/secrets/Feigenbaum.secret”: Permission denied<br>
> <br>
> $ sudo dmesg<br>
> <br>
> [585353.519853] virbr0: port 2(vnet0) entered blocking state<br>
> [585353.519854] virbr0: port 2(vnet0) entered disabled state<br>
> [585353.519887] device vnet0 entered promiscuous mode<br>
> [585353.519982] virbr0: port 2(vnet0) entered blocking state<br>
> [585353.519983] virbr0: port 2(vnet0) entered listening state<br>
> [585353.706058] virbr0: port 2(vnet0) entered disabled state<br>
> [585353.707387] device vnet0 left promiscuous mode<br>
> [585353.707395] virbr0: port 2(vnet0) entered disabled state<br>
> <br>
> (I removed a bunch of UFW BLOCK messages)<br>
> <br>
> Extract from syslog:<br>
> <br>
> Jul 30 10:15:39 www kernel: [585353.519853] virbr0: port 2(vnet0) entered<br>
> blocking state<br>
> Jul 30 10:15:39 www kernel: [585353.519854] virbr0: port 2(vnet0) entered<br>
> disabled state<br>
> Jul 30 10:15:39 www kernel: [585353.519887] device vnet0 entered<br>
> promiscuous mode<br>
> Jul 30 10:15:39 www kernel: [585353.519982] virbr0: port 2(vnet0) entered<br>
> blocking state<br>
> Jul 30 10:15:39 www kernel: [585353.519983] virbr0: port 2(vnet0) entered<br>
> listening state<br>
> Jul 30 10:15:39 www libvirtd[775]: Domain id=5 name='Feigenbaum'<br>
> uuid=2734b78b-2dc6-4fed-a47b-9bb2534db76e is tainted: custom-argv<br>
> Jul 30 10:15:40 www kernel: [585353.706058] virbr0: port 2(vnet0) entered<br>
> disabled state<br>
> Jul 30 10:15:40 www kernel: [585353.707387] device vnet0 left promiscuous<br>
> mode<br>
> Jul 30 10:15:40 www kernel: [585353.707395] virbr0: port 2(vnet0) entered<br>
> disabled state<br>
> Jul 30 10:15:40 www libvirtd[775]: Unable to read from monitor: Connection<br>
> reset by peer<br>
> Jul 30 10:15:40 www libvirtd[775]: internal error: qemu unexpectedly closed<br>
> the monitor: 2019-07-30T08:15:39.975264Z qemu-system-x86_64: --object<br>
> secret,id=sec0,file=/etc/libvirt/secrets/Feigenbaum.secret: Unable to read<br>
> /etc/libvirt/secrets/Feigenbaum.secret: Failed to open file<br>
> “/etc/libvirt/secrets/Feigenbaum.secret”: Permission denied<br>
> Jul 30 10:15:40 www libvirtd[775]: internal error: process exited while<br>
> connecting to monitor: 2019-07-30T08:15:39.975264Z qemu-system-x86_64:<br>
> --object secret,id=sec0,file=/etc/libvirt/secrets/Feigenbaum.secret: Unable<br>
> to read /etc/libvirt/secrets/Feigenbaum.secret: Failed to open file<br>
> “/etc/libvirt/secrets/Feigenbaum.secret”: Permission denied<br>
> <br>
> <br>
> > That should have details what<br>
> > fails exactly.<br>
> Let me know if I can provide additional information to get more details on<br>
> what fails.<br>
> <br>
> Greetings<br>
> <br>
> Dominik<br>
> <br>
> <br>
> Am Di., 30. Juli 2019 um 09:00 Uhr schrieb Guido Günther <<a href="mailto:agx@sigxcpu.org" target="_blank">agx@sigxcpu.org</a>>:<br>
> <br>
> > Hi,<br>
> > On Tue, Jul 30, 2019 at 07:36:18AM +0200, Dominik wrote:<br>
> > > Package: libvirt-daemon<br>
> > > Version: 5.0.0-4<br>
> > > Severity: normal<br>
> > ><br>
> > > Dear Maintainer,<br>
> > ><br>
> > > after upgrading to buster, the encrypted kvm-guests stop to work. An<br>
> > error is thrown about missing rights to the file containing the encryption<br>
> > secret, which I placed under /etc/libvirt/secret/.<br>
> > ><br>
> > > I openend a question with more details on serverfault a while ago:<br>
> > <a href="https://serverfault.com/questions/974689/encrypted-qemu-virtual-machines-do-not-start-after-upgrade-to-buster-permission" rel="noreferrer" target="_blank">https://serverfault.com/questions/974689/encrypted-qemu-virtual-machines-do-not-start-after-upgrade-to-buster-permission</a><br>
> ><br>
> > As a workaround you can disable apparmor but can you attach the dmesg<br>
> > output after trying to start a domain? That should have details what<br>
> > fails exactly.<br>
> > Cheers,<br>
> > -- Guido<br>
> ><br>
</blockquote></div>