On 6/24/2025 1:42 PM, Richard W.M. Jones wrote:
On Tue, Jun 24, 2025 at 01:25:47PM +0530, Aithal, Srikanth wrote:
libguestfs: command: run: \ --pid /tmp/libguestfsJamIlZ/passt1.pid ... Don't run as root. Changing to nobody... ... PID file open: Permission denied libguestfs: trace: launch = -1 (error) In libguestfs we already work around qemu changing its user when we are running as root:
https://github.com/libguestfs/libguestfs/blob/0991b4dc2124a8d6c3d232663ea347...
However I think because passt is creating the file, it cannot write into the 0755 directory.
Honestly (just as with libvirt / qemu) unilaterally changing the user ID when running as root is not helping anyone nor adding any security.
As for working around the bug, just don't run virt-customize as root. There's no need to run guestfs tools as root, unless for some reason you need to edit a disk image which is only accessible by root.
Rich.
Hello Rich, Thank you for your response. I tried using a non-root user, but I'm still encountering the same issue. I have confirmed that the user is part of the kvm and libvirt groups: $ id $(whoami) uid=1000(amd) gid=1000(amd) groups=1000(amd),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),994(kvm),101(lxd),110(libvirt) I ran the following command: $ virt-customize -v -x -a noble-server-cloudimg-amd64.qcow2 --install isc-dhcp-client The output includes: ... libguestfs: command: run: passt libguestfs: command: run: \ --one-off libguestfs: command: run: \ --socket /run/user/1000/libguestfsr1TVUg/passt.sock libguestfs: command: run: \ --pid /run/user/1000/libguestfsr1TVUg/passt3.pid libguestfs: command: run: \ --address 169.254.2.15 libguestfs: command: run: \ --netmask 16 libguestfs: command: run: \ --mac-addr 52:56:00:00:00:02 libguestfs: command: run: \ --gateway 169.254.2.2 No routable interface for IPv6: IPv6 is disabled Template interface: enp97s0 (IPv4) MAC: host: 52:56:00:00:00:02 DHCP: assign: 169.254.2.15 mask: 255.255.0.0 router: 169.254.2.2 DNS: 169.254.2.2 DNS search list: amd.com UNIX domain socket bound at /run/user/1000/libguestfsr1TVUg/passt.sock You can now start qemu (>= 7.2, with commit 13c6be96618c): kvm ... -device virtio-net-pci,netdev=s -netdev stream,id=s,server=off,addr.type=unix,addr.path=/run/user/1000/libguestfsr1TVUg/passt.sock or qrap, for earlier qemu versions: ./qrap 5 kvm ... -net socket,fd=5 -net nic,model=virtio PID file open: Permission denied libguestfs: trace: launch = -1 (error) virt-customize: error: libguestfs error: passt exited with status 1 ... I have attached the full log for your reference. Please let me know if you need additional details.