#841
unexpected dgram pkt: 3 errors with qemu-guest-agent on vsock
Description
When running qemu-guest-agent with --method=vsock-listen inside
the guest, krunkit logs periodic unexpected dgram pkt: 3 errors.
The timesync feature works correctly despite the errors.
Reproduction
Download a Fedora 44 cloud image and convert to raw:
curl --fail --location --output /tmp/fedora-44.qcow2 \
https://download.fedoraproject.org/pub/fedora/linux/releases/44/Cloud/aarch64/images/Fedora-Cloud-Base-Generic-44-1.7.aarch64.qcow2
mkdir -p ~/.cache/vm-images
qemu-img convert -f qcow2 -O raw /tmp/fedora-44.qcow2 \
~/.cache/vm-images/fedora-44.imgCreate a minimal Fedora VM with timesync enabled:
VM_NAME=krunkit-vsock-test
CPUS=2
MEMORY=2048
MAC_ADDRESS=$(python3 -c "
import os
b = bytearray(os.urandom(6))
b[0] = (b[0] | 2) & 0xFE
print(':'.join(f'{x:02x}' for x in b))
")
mkdir -p ~/vms/$VM_NAME
cp -c ~/.cache/vm-images/fedora-44.img ~/vms/$VM_NAME/disk.img
cat > ~/vms/$VM_NAME/user-data << EOF
#cloud-config
password: password
chpasswd:
expire: false
ssh_authorized_keys:
- "$(cat ~/.ssh/id_ed25519.pub)"
packages:
- avahi
write_files:
- path: /etc/systemd/system/qemu-guest-agent.service
content: |
[Unit]
Description=QEMU Guest Agent
[Service]
ExecStart=/usr/bin/qemu-ga --method=vsock-listen --path=3:1234
Restart=always
RestartSec=0
[Install]
WantedBy=multi-user.target
- path: /root/qemu-ga-vsock.cil
content: |
(allow virt_qemu_ga_t self (vsock_socket (bind create getattr listen accept read write)))
runcmd:
- semodule -i /root/qemu-ga-vsock.cil
- systemctl daemon-reload
- systemctl disable qemu-guest-agent
- systemctl enable --now qemu-guest-agent
- systemctl enable --now avahi-daemon
EOF
cat > ~/vms/$VM_NAME/meta-data << EOF
instance-id: $(uuidgen)
local-hostname: $VM_NAME
EOF
cat > ~/vms/$VM_NAME/network-config << EOF
version: 2
ethernets:
eth0:
match:
macaddress: $MAC_ADDRESS
dhcp4: true
dhcp-identifier: mac
EOF
(cd ~/vms/$VM_NAME && mkisofs -output cidata.iso -volid cidata -joliet -rock \
user-data meta-data network-config)Start the VM with --timesync:
vmnet-run -- krunkit \
--cpus $CPUS --memory $MEMORY \
--bootloader efi,variable-store=$HOME/vms/$VM_NAME/efi-variable-store,create \
--device virtio-blk,path=$HOME/vms/$VM_NAME/disk.img \
--device virtio-blk,path=$HOME/vms/$VM_NAME/cidata.iso \
--device virtio-serial,logFilePath=$HOME/vms/$VM_NAME/serial.log \
--device virtio-net,type=unixgram,fd=4,mac=$MAC_ADDRESS \
--device virtio-rng \
--timesync vsockPort=1234 \
2> ~/vms/$VM_NAME/vm.logWait for boot, then sleep the Mac for 2 minutes and wake.
Expected behavior
No errors in the krunkit log. Timesync works cleanly.
Actual behavior
Timesync works, but periodic errors appear in the log:
INFO [runner] running on macOS 26.6.2
INFO [main] running /opt/homebrew/opt/vmnet-helper/libexec/vmnet-helper v0.13.0 on macOS 26.6.2
INFO [main] running as uid: 501 gid: 20
INFO [main] using bulk_forwarding: true
INFO [main] started vmnet interface
INFO [main] started host forwarding
INFO [main] started vm forwarding
INFO [main] running
[2026-09-05T20:38:41.937103Z ERROR krun_devices::virtio::vsock::muxer] unexpected dgram pkt: 3
[2026-09-05T20:39:42.427042Z ERROR krun_devices::virtio::vsock::muxer] unexpected dgram pkt: 3
[2026-09-05T20:41:16Z INFO krunkit::timesync] Time synced to 1788640876754749000
[2026-09-05T20:41:16.987398Z INFO krun_devices::virtio::vsock::muxer] deferring proxy removal: 5302651567290
[2026-09-05T20:41:16.987789Z ERROR krun_devices::virtio::vsock::muxer] unexpected dgram pkt: 3
[2026-09-05T20:41:17Z INFO krunkit::timesync] Time synced to 1788640877375356000
[2026-09-05T20:41:17.455077Z INFO krun_devices::virtio::vsock::muxer] deferring proxy removal: 5304101308742
[2026-09-05T20:42:18.901966Z ERROR krun_devices::virtio::vsock::muxer] unexpected dgram pkt: 3
[2026-09-05T20:43:20.495915Z ERROR krun_devices::virtio::vsock::muxer] unexpected dgram pkt: 3
[2026-09-05T20:44:22.218088Z ERROR krun_devices::virtio::vsock::muxer] unexpected dgram pkt: 3
[2026-09-05T20:45:23.927198Z ERROR krun_devices::virtio::vsock::muxer] unexpected dgram pkt: 3
[2026-09-05T20:46:25.615528Z ERROR krun_devices::virtio::vsock::muxer] unexpected dgram pkt: 3
[2026-09-05T20:47:27.397178Z ERROR krun_devices::virtio::vsock::muxer] unexpected dgram pkt: 3
[2026-09-05T20:48:29.010969Z ERROR krun_devices::virtio::vsock::muxer] unexpected dgram pkt: 3
[2026-09-05T20:49:30.678920Z ERROR krun_devices::virtio::vsock::muxer] unexpected dgram pkt: 3
[2026-09-05T20:50:32.433443Z ERROR krun_devices::virtio::vsock::muxer] unexpected dgram pkt: 3
[2026-09-05T20:51:34.163351Z ERROR krun_devices::virtio::vsock::muxer] unexpected dgram pkt: 3
[2026-09-05T20:52:35.883812Z ERROR krun_devices::virtio::vsock::muxer] unexpected dgram pkt: 3
[2026-09-05T20:53:37.736684Z ERROR krun_devices::virtio::vsock::muxer] unexpected dgram pkt: 3
[2026-09-05T20:54:39.325297Z ERROR krun_devices::virtio::vsock::muxer] unexpected dgram pkt: 3
[2026-09-05T20:55:40.941764Z ERROR krun_devices::virtio::vsock::muxer] unexpected dgram pkt: 3
[2026-09-05T20:56:42.673880Z ERROR krun_devices::virtio::vsock::muxer] unexpected dgram pkt: 3
[2026-09-05T20:57:44.177723Z ERROR krun_devices::virtio::vsock::muxer] unexpected dgram pkt: 3
[2026-09-05T20:58:45.783152Z ERROR krun_devices::virtio::vsock::muxer] unexpected dgram pkt: 3
[2026-09-05T20:59:47.469649Z ERROR krun_devices::virtio::vsock::muxer] unexpected dgram pkt: 3
[2026-09-05T21:00:48.956776Z ERROR krun_devices::virtio::vsock::muxer] unexpected dgram pkt: 3
[2026-09-05T21:01:50.639601Z ERROR krun_devices::virtio::vsock::muxer] unexpected dgram pkt: 3
[2026-09-05T21:02:52.154391Z ERROR krun_devices::virtio::vsock::muxer] unexpected dgram pkt: 3
[2026-09-05T21:03:53.665566Z ERROR krun_devices::virtio::vsock::muxer] unexpected dgram pkt: 3
[2026-09-05T21:04:55.274934Z ERROR krun_devices::virtio::vsock::muxer] unexpected dgram pkt: 3
[2026-09-05T21:05:57.201705Z ERROR krun_devices::virtio::vsock::muxer] unexpected dgram pkt: 3The errors appear roughly every minute even without sleep, and also during the timesync operation after wake.
Environment
- macOS 26.6.2 (arm64)
- krunkit 1.3.2
- libkrun: libkrun/krun/libkrun: stable 1.19.4 (bottled)
- Fedora 44 cloud image
- qemu-guest-agent qemu-guest-agent-10.2.2-1.fc44.aarch64
Activity
0No activity yet.