Skip to content

Commit e1a7c0c

Browse files
committed
krunkit: Disable offloading by default
Future krunkit provides unixgram socket option supporting offloading argument to enable of disable offloading. This is a minimal change to test this option. Depends on: - libkrun/krunkit#63
1 parent a280911 commit e1a7c0c

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

example

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,7 @@ CONNECTION_AUTO = {
2222

2323
VMNET_OFFLOAD_AUTO = {
2424
"vfkit": "off",
25-
# libkrun enables offloading features by default, so we must enable vmnet
26-
# offloading. See https://github.com/containers/libkrun/issues/264
27-
"krunkit": "on",
25+
"krunkit": "off",
2826
"qemu": "off",
2927
}
3028

vmnet/vm.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ def __init__(self, args, mac_address, fd=None, socket=None, client=None):
4242
self.memory = args.memory
4343
self.distro = args.distro
4444
self.serial = store.vm_path(self.vm_name, "serial.log")
45+
self.vmnet_offload = args.vmnet_offload
4546

4647
# Running info
4748
self.disk = None
@@ -181,7 +182,7 @@ def krunkit_command(self):
181182
f"--restful-uri=none://",
182183
f"--device=virtio-blk,path={self.disk['image']}",
183184
f"--device=virtio-blk,path={self.cidata}",
184-
f"--device=virtio-net,unixSocketPath={self.socket},mac={self.mac_address}",
185+
f"--device=virtio-net,type=unixgram,path={self.socket},mac={self.mac_address},offloading={self.vmnet_offload}",
185186
f"--device=virtio-serial,logFilePath={self.serial}",
186187
"--krun-log-level=3",
187188
]

0 commit comments

Comments
 (0)