Hello,
Thank you for the detailed note. My comments in-line. Appreciate your
time in helping me on this issue.
On 6/20/2025 9:54 PM, Stefano Brivio wrote:
On Fri, 20 Jun 2025 14:26:11 +0100
"Richard W.M. Jones" <rjo...@redhat.com> wrote:
On Fri, Jun 20, 2025 at 05:12:27PM +0530, Aithal, Srikanth wrote:
Hello all,
I am encountering an issue with virt-customize when the host kernel, on which
virt-customize runs, has CONFIG_IPV6_SIT built-in. Below is the error output
from the command:
virt-customize -a noble-server-cloudimg-amd64.qcow2 --install isc-dhcp-client [
...
Using the -v verbose option, I discovered that the IP address assigned in the
QEMU command line was not reflected inside the guest. Here is the relevant ip a
output from the log:
You would not expect the IP inside the appliance to be the same as
outside. We're using two tools called libslirp & passt to create a
user-level network.
By the way, just to avoid confusion: passt's default behaviour
(stand-alone, not started by libguestfs) is to advertise to the guest
(DHCP / NDP / DHCPv6) addresses and routes copied from the host
interface with the (first) default route.
But with libguestfs, for compatibility with libslirp, passt is also
configured with a fixed address, which won't be the same as the host.
You would see that in passt's own command-line (it's a separate tool,
so you won't see that in QEMU's command line).
+ ip a 1: lo: mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 brd
127.255.255.255 scope host lo valid_lft forever preferred_lft forever inet6 ::1
/128 scope host valid_lft forever preferred_lft forever 2: eth0: mtu 1500 qdisc
pfifo_fast state UP group default qlen 1000 link/ether 52:54:00:12:34:56 brd
ff:ff:ff:ff:ff:ff inet6 fe80::5054:ff:fe12:3456/64 scope link tentative
valid_lft forever preferred_lft forever 3: sit0@NONE: mtu 1480 qdisc noqueue
state UNKNOWN group default qlen 1000 link/sit 0.0.0.0 brd 0.0.0.0 inet6
::127.0.0.1/96 scope host valid_lft forever preferred_lft forever
Further debugging revealed that when the host kernel has SIT-related
configurations enabled (i.e., CONFIG_IPV6_SIT), the supermin appliance, which
libguestfs uses, inherits the same kernel and initrd. Consequently, the guest
environment booted by virt-customize includes the sit0 device.
When the sit0 device is present, the primary NIC (eth0) does not receive the
static IP address assigned by libguestfs in the QEMU command line:
/usr/bin/qemu-system-x86_64 \ -global virtio-blk-pci.scsi=off \ ... -netdev
user,id=usernet,net=169.254.2.15/16 \ -device virtio-net-pci,netdev=usernet \
In this case it would use libslirp. I'm pretty sure slirp doesn't
support IPv6 at all which is the problem here. But also ...
It kind of does, but it's not enabled by default, and it doesn't
support SLAAC plus a number of mandatory functionalities, at least not
ouf of the box, so, yes, see below...
I verified this issue on another machine where the host kernel had no
SIT-related configurations enabled. On that machine, the same virt-customize
command with the same Noble image worked correctly. I have attached verbose
logs for both working and non-working configurations. A diff of these logs
shows that the sit0 device causes the IP assignment issue with the eth0
interface.
I have the following queries and would appreciate any responses:
1. Why does the user network IP not get applied when the sit0 device is
present in the appliance?
I think the DHCP client tries to configure sit0 as it's the first
interface reported by the kernel and can't do it with the information
provided by libslirp's DHCP server.
No idea about 2. and 3.
2. Is there a way to append parameters to the libguestfs QEMU command line to
blacklist the sit module in such cases?
3. Can we override the kernel and initrd used by libguestfs via the
virt-customize command line?
libguestfs: command: run: passt --help
sh: 1: passt: not found
If you use passt (which supports IPv6) it might work better, or at
least differently ...
...that would be my suggestion as well (apt install passt). It's not
exactly up to date on Ubuntu 24.04, and doesn't look very maintained
(see e.g. https://bugs.launchpad.net/ubuntu/+source/passt/+bug/2077158,
I maintain the Debian package only), but it should work better than
libslirp anyway, as the appliance can use SLAAC as well.
I tried using passt on Ubuntu 24.04 LTS (Noble Numbat) but encountered
permission issues. I spent some time debugging without success. Below
are the steps I took. I would appreciate any suggestions for resolving
this issue.
# passt --version
passt unknown version
Copyright Red Hat
GNU General Public License, version 2 or later
<https://www.gnu.org/licenses/old-licenses/gpl-2.0.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
# dpkg -l | grep passt
ii passt 0.0~git20240220.1e6f92b-1 amd64 user-mode networking
daemons for virtual machines and namespaces
Running virt-customize resulted in a different error:
Error with virt-customize:
libguestfs: command: run: passt
libguestfs: command: run: \ --one-off
libguestfs: command: run: \ --socket /tmp/libguestfsJamIlZ/passt.sock
libguestfs: command: run: \ --pid /tmp/libguestfsJamIlZ/passt1.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
Don't run as root. Changing to nobody...
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 /tmp/libguestfsJamIlZ/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=/tmp/libguestfsJamIlZ/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 tested both versions of passt: the one provided by Ubuntu 24.04 and
the Debian passt package. I have attached error logs for both versions.
I also tried modifying AppArmor rules, but it still fails on Ubuntu 24.04:
# aa-disable /etc/apparmor.d/usr.bin.passt
ERROR: Operation {'runbindable'} cannot have a source. Source = AARE('/')
I attempted to stop the AppArmor service, but the issue with passt persists.
# virt-customize -v -x -a noble-server-cloudimg-amd64.qcow2 --install
isc-dhcp-client
[ 0.0] Examining the guest ...
libguestfs: trace: set_verbose true
libguestfs: trace: set_verbose = 0
libguestfs: trace: set_backend "direct"
libguestfs: trace: set_backend = 0
libguestfs: trace: set_trace true
libguestfs: trace: set_trace = 0
libguestfs: trace: set_verbose true
libguestfs: trace: set_verbose = 0
libguestfs: trace: set_network true
libguestfs: trace: set_network = 0
libguestfs: trace: add_drive "noble-server-cloudimg-amd64.qcow2"
"readonly:false" "protocol:file" "discard:besteffort"
libguestfs: trace: add_drive = 0
libguestfs: trace: launch
libguestfs: trace: max_disks
libguestfs: trace: max_disks = 255
libguestfs: trace: get_tmpdir
libguestfs: trace: get_tmpdir = "/tmp"
libguestfs: trace: version
libguestfs: trace: version = <struct guestfs_version = major: 1, minor: 52,
release: 0, extra: , >
libguestfs: trace: get_backend
libguestfs: trace: get_backend = "direct"
libguestfs: launch: program=virt-customize
libguestfs: launch: version=1.52.0
libguestfs: launch: backend registered: libvirt
libguestfs: launch: backend registered: direct
libguestfs: launch: backend=direct
libguestfs: launch: tmpdir=/tmp/libguestfstRoNa9
libguestfs: launch: umask=0022
libguestfs: launch: euid=0
libguestfs: trace: get_cachedir
libguestfs: trace: get_cachedir = "/var/tmp"
libguestfs: begin building supermin appliance
libguestfs: run supermin
libguestfs: command: run: /usr/bin/supermin
libguestfs: command: run: \ --build
libguestfs: command: run: \ --verbose
libguestfs: command: run: \ --if-newer
libguestfs: command: run: \ --lock /var/tmp/.guestfs-0/lock
libguestfs: command: run: \ --copy-kernel
libguestfs: command: run: \ -f ext2
libguestfs: command: run: \ --host-cpu x86_64
libguestfs: command: run: \ /usr/lib/x86_64-linux-gnu/guestfs/supermin.d
libguestfs: command: run: \ -o /var/tmp/.guestfs-0/appliance.d
supermin: version: 5.2.2
supermin: package handler: debian/dpkg
supermin: acquiring lock on /var/tmp/.guestfs-0/lock
supermin: build: /usr/lib/x86_64-linux-gnu/guestfs/supermin.d
supermin: reading the supermin appliance
supermin: build: visiting
/usr/lib/x86_64-linux-gnu/guestfs/supermin.d/base.tar.gz type gzip base image
(tar)
supermin: build: visiting
/usr/lib/x86_64-linux-gnu/guestfs/supermin.d/daemon.tar.gz type gzip base image
(tar)
supermin: build: visiting
/usr/lib/x86_64-linux-gnu/guestfs/supermin.d/excludefiles type uncompressed
excludefiles
supermin: build: visiting
/usr/lib/x86_64-linux-gnu/guestfs/supermin.d/hostfiles type uncompressed
hostfiles
supermin: build: visiting
/usr/lib/x86_64-linux-gnu/guestfs/supermin.d/init.tar.gz type gzip base image
(tar)
supermin: build: visiting /usr/lib/x86_64-linux-gnu/guestfs/supermin.d/packages
type uncompressed packages
supermin: build: visiting
/usr/lib/x86_64-linux-gnu/guestfs/supermin.d/packages-hfsplus type uncompressed
packages
supermin: build: visiting
/usr/lib/x86_64-linux-gnu/guestfs/supermin.d/packages-reiserfs type
uncompressed packages
supermin: build: visiting
/usr/lib/x86_64-linux-gnu/guestfs/supermin.d/packages-xfs type uncompressed
packages
supermin: build: visiting
/usr/lib/x86_64-linux-gnu/guestfs/supermin.d/udev-rules.tar.gz type gzip base
image (tar)
supermin: mapping package names to installed packages
supermin: resolving full list of package dependencies
supermin: build: 207 packages, including dependencies
supermin: build: 7971 files
supermin: build: 4268 files, after matching excludefiles
supermin: build: 4277 files, after adding hostfiles
supermin: build: 4277 files, after removing unreadable files
supermin: build: 4284 files, after munging
supermin: kernel: looking for kernel using environment variables ...
supermin: kernel: looking for kernels in /lib/modules/*/vmlinuz ...
supermin: kernel: looking for kernels in /boot ...
supermin: kernel: kernel version of /boot/vmlinuz-6.15.1 = 6.15.1 (from content)
supermin: kernel: picked modules path /lib/modules/6.15.1
supermin: kernel: kernel version of /boot/vmlinuz-6.14.5-kal = 6.14.5-kal (from
content)
supermin: kernel: picked modules path /lib/modules/6.14.5-kal
supermin: kernel: kernel version of
/boot/vmlinuz-6.14.2-amdsos-build66-ubuntu-24.04+ =
6.14.2-amdsos-build66-ubuntu-24.04+ (from content)
supermin: kernel: picked modules path
/lib/modules/6.14.2-amdsos-build66-ubuntu-24.04+
supermin: kernel: kernel version of /boot/vmlinuz-6.8.0-60-generic =
6.8.0-60-generic (from content)
supermin: kernel: picked modules path /lib/modules/6.8.0-60-generic
supermin: kernel: picked vmlinuz /boot/vmlinuz-6.15.1
supermin: kernel: kernel_version 6.15.1
supermin: kernel: modpath /lib/modules/6.15.1
supermin: ext2: creating empty ext2 filesystem
'/var/tmp/.guestfs-0/appliance.d.ut3sa1bb/root'
supermin: ext2: populating from base image
supermin: ext2: copying files from host filesystem
supermin: ext2: copying kernel modules
supermin: ext2: creating minimal initrd
'/var/tmp/.guestfs-0/appliance.d.ut3sa1bb/initrd'
supermin: ext2: wrote 0 modules to minimal initrd
supermin: renaming /var/tmp/.guestfs-0/appliance.d.ut3sa1bb to
/var/tmp/.guestfs-0/appliance.d
libguestfs: finished building supermin appliance
libguestfs: begin testing qemu features
libguestfs: trace: get_cachedir
libguestfs: trace: get_cachedir = "/var/tmp"
libguestfs: checking for previously cached test results of
/usr/bin/qemu-system-x86_64, in /var/tmp/.guestfs-0
libguestfs: loading previously cached test results
libguestfs: qemu version: 8.2
libguestfs: qemu mandatory locking: yes
libguestfs: qemu KVM: enabled
libguestfs: trace: get_backend_setting "force_tcg"
libguestfs: trace: get_backend_setting = NULL (error)
libguestfs: trace: get_backend_setting "force_kvm"
libguestfs: trace: get_backend_setting = NULL (error)
libguestfs: trace: get_sockdir
libguestfs: trace: get_sockdir = "/tmp"
libguestfs: finished testing qemu features
libguestfs: trace: get_backend_setting "gdb"
libguestfs: trace: get_backend_setting = NULL (error)
libguestfs: command: run: passt --help
Usage: passt [OPTION]...
-d, --debug\t\tBe verbose
--trace\t\tBe extra verbose, implies --debug
-q, --quiet\t\tDon't print informational messages
-f, --foreground\tDon't run in background
default: run in background if started from a TTY
-e, --stderr\t\tLog to stderr too
default: log to system logger only if started from a TTY
-l, --log-file PATH\tLog (only) to given file
--log-size BYTES\tMaximum size of log file
default: 1 MiB
--runas UID|UID:GID \tRun as given UID, GID, which can be
numeric, or login and group names
default: drop to user "nobody"
-h, --help\t\tDisplay this help message and exit
--version\t\tShow version and exit
-s, --socket PATH\tUNIX domain socket path
default: probe free path starting from /tmp/passt_1.socket
-F, --fd FD\t\tUse FD as pre-opened connected socket
-p, --pcap FILE\tLog tap-facing traffic to pcap file
-P, --pid FILE\tWrite own PID to the given file
-m, --mtu MTU\tAssign MTU via DHCP/NDP
a zero value disables assignment
default: 65520: maximum 802.3 MTU minus 802.3 header
length, rounded to 32 bits (IPv4 words)
-a, --address ADDR\tAssign IPv4 or IPv6 address ADDR
can be specified zero to two times (for IPv4 and IPv6)
default: use addresses from interface with default route
-n, --netmask MASK\tAssign IPv4 MASK, dot-decimal or bits
default: netmask from matching address on the host
-M, --mac-addr ADDR\tUse source MAC address ADDR
default: MAC address from interface with default route
-g, --gateway ADDR\tPass IPv4 or IPv6 address as gateway
default: gateway from interface with default route
-i, --interface NAME\tInterface for addresses and routes
default: from --outbound-if4 and --outbound-if6, if any
otherwise interface with first default route
-o, --outbound ADDR\tBind to address as outbound source
can be specified zero to two times (for IPv4 and IPv6)
default: use source address from routing tables
--outbound-if4 NAME\tBind to outbound interface for IPv4
default: use interface from default route
--outbound-if6 NAME\tBind to outbound interface for IPv6
default: use interface from default route
-D, --dns ADDR\tUse IPv4 or IPv6 address as DNS
can be specified multiple times
a single, empty option disables DNS information
default: use addresses from /etc/resolv.conf
-S, --search LIST\tSpace-separated list, search domains
a single, empty option disables the DNS search list
default: use search list from /etc/resolv.conf
--no-dhcp-dns\tNo DNS list in DHCP/DHCPv6/NDP
--no-dhcp-search\tNo list in DHCP/DHCPv6/NDP
--dns-forward ADDR\tForward DNS queries sent to ADDR
can be specified zero to two times (for IPv4 and IPv6)
default: don't forward DNS queries
--no-tcp\t\tDisable TCP protocol handler
--no-udp\t\tDisable UDP protocol handler
--no-icmp\t\tDisable ICMP/ICMPv6 protocol handler
--no-dhcp\t\tDisable DHCP server
--no-ndp\t\tDisable NDP responses
--no-dhcpv6\t\tDisable DHCPv6 server
--no-ra\t\tDisable router advertisements
--no-map-gw\t\tDon't map gateway address to host
-4, --ipv4-only\tEnable IPv4 operation only
-6, --ipv6-only\tEnable IPv6 operation only
-1, --one-off\tQuit after handling one single client
-t, --tcp-ports SPEC\tTCP port forwarding to guest
can be specified multiple times
SPEC can be:
'none': don't forward any ports
'all': forward all unbound, non-ephemeral ports
a comma-separated list, optionally ranged with '-'
and optional target ports after ':', with optional
address specification suffixed by '/' and optional
interface prefixed by '%'. Ranges can be reduced by
excluding ports or ranges prefixed by '~'
Examples:
-t 22\t\tForward local port 22 to 22 on guest
-t 22:23\tForward local port 22 to 23 on guest
-t 22,25\tForward ports 22, 25 to ports 22, 25
-t 22-80 \tForward ports 22 to 80
-t 22-80:32-90\tForward ports 22 to 80 to
\t\t\tcorresponding port numbers plus 10
-t 192.0.2.1/5\tBind port 5 of 192.0.2.1 to guest
-t 5-25,~10-20\tForward ports 5 to 9, and 21 to 25
-t ~25\t\tForward all ports except for 25
default: none
-u, --udp-ports SPEC\tUDP port forwarding to guest
SPEC is as described for TCP above
default: none
libguestfs: command: run: passt
libguestfs: command: run: \ --one-off
libguestfs: command: run: \ --socket /tmp/libguestfsJamIlZ/passt.sock
libguestfs: command: run: \ --pid /tmp/libguestfsJamIlZ/passt1.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
Don't run as root. Changing to nobody...
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 /tmp/libguestfsJamIlZ/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=/tmp/libguestfsJamIlZ/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
libguestfs: trace: close
libguestfs: closing guestfs handle 0x56391406bdd0 (state 0)
libguestfs: command: run: rm
libguestfs: command: run: \ -rf /tmp/libguestfstRoNa9
libguestfs: command: run: rm
libguestfs: command: run: \ -rf /tmp/libguestfsJamIlZ
# virt-customize -v -x -a noble-server-cloudimg-amd64.qcow2 --install
isc-dhcp-client
[ 0.0] Examining the guest ...
libguestfs: trace: set_verbose true
libguestfs: trace: set_verbose = 0
libguestfs: trace: set_backend "direct"
libguestfs: trace: set_backend = 0
libguestfs: trace: set_trace true
libguestfs: trace: set_trace = 0
libguestfs: trace: set_verbose true
libguestfs: trace: set_verbose = 0
libguestfs: trace: set_network true
libguestfs: trace: set_network = 0
libguestfs: trace: add_drive "noble-server-cloudimg-amd64.qcow2"
"readonly:false" "protocol:file" "discard:besteffort"
libguestfs: trace: add_drive = 0
libguestfs: trace: launch
libguestfs: trace: max_disks
libguestfs: trace: max_disks = 255
libguestfs: trace: get_tmpdir
libguestfs: trace: get_tmpdir = "/tmp"
libguestfs: trace: version
libguestfs: trace: version = <struct guestfs_version = major: 1, minor: 52,
release: 0, extra: , >
libguestfs: trace: get_backend
libguestfs: trace: get_backend = "direct"
libguestfs: launch: program=virt-customize
libguestfs: launch: version=1.52.0
libguestfs: launch: backend registered: libvirt
libguestfs: launch: backend registered: direct
libguestfs: launch: backend=direct
libguestfs: launch: tmpdir=/tmp/libguestfsrYvBRy
libguestfs: launch: umask=0022
libguestfs: launch: euid=0
libguestfs: trace: get_cachedir
libguestfs: trace: get_cachedir = "/var/tmp"
libguestfs: begin building supermin appliance
libguestfs: run supermin
libguestfs: command: run: /usr/bin/supermin
libguestfs: command: run: \ --build
libguestfs: command: run: \ --verbose
libguestfs: command: run: \ --if-newer
libguestfs: command: run: \ --lock /var/tmp/.guestfs-0/lock
libguestfs: command: run: \ --copy-kernel
libguestfs: command: run: \ -f ext2
libguestfs: command: run: \ --host-cpu x86_64
libguestfs: command: run: \ /usr/lib/x86_64-linux-gnu/guestfs/supermin.d
libguestfs: command: run: \ -o /var/tmp/.guestfs-0/appliance.d
supermin: version: 5.2.2
supermin: package handler: debian/dpkg
supermin: acquiring lock on /var/tmp/.guestfs-0/lock
supermin: build: /usr/lib/x86_64-linux-gnu/guestfs/supermin.d
supermin: reading the supermin appliance
supermin: build: visiting
/usr/lib/x86_64-linux-gnu/guestfs/supermin.d/base.tar.gz type gzip base image
(tar)
supermin: build: visiting
/usr/lib/x86_64-linux-gnu/guestfs/supermin.d/daemon.tar.gz type gzip base image
(tar)
supermin: build: visiting
/usr/lib/x86_64-linux-gnu/guestfs/supermin.d/excludefiles type uncompressed
excludefiles
supermin: build: visiting
/usr/lib/x86_64-linux-gnu/guestfs/supermin.d/hostfiles type uncompressed
hostfiles
supermin: build: visiting
/usr/lib/x86_64-linux-gnu/guestfs/supermin.d/init.tar.gz type gzip base image
(tar)
supermin: build: visiting /usr/lib/x86_64-linux-gnu/guestfs/supermin.d/packages
type uncompressed packages
supermin: build: visiting
/usr/lib/x86_64-linux-gnu/guestfs/supermin.d/packages-hfsplus type uncompressed
packages
supermin: build: visiting
/usr/lib/x86_64-linux-gnu/guestfs/supermin.d/packages-reiserfs type
uncompressed packages
supermin: build: visiting
/usr/lib/x86_64-linux-gnu/guestfs/supermin.d/packages-xfs type uncompressed
packages
supermin: build: visiting
/usr/lib/x86_64-linux-gnu/guestfs/supermin.d/udev-rules.tar.gz type gzip base
image (tar)
supermin: mapping package names to installed packages
supermin: resolving full list of package dependencies
supermin: build: 207 packages, including dependencies
supermin: build: 7971 files
supermin: build: 4268 files, after matching excludefiles
supermin: build: 4277 files, after adding hostfiles
supermin: build: 4277 files, after removing unreadable files
supermin: build: 4284 files, after munging
supermin: kernel: looking for kernel using environment variables ...
supermin: kernel: looking for kernels in /lib/modules/*/vmlinuz ...
supermin: kernel: looking for kernels in /boot ...
supermin: kernel: kernel version of /boot/vmlinuz-6.15.1 = 6.15.1 (from content)
supermin: kernel: picked modules path /lib/modules/6.15.1
supermin: kernel: kernel version of /boot/vmlinuz-6.14.5-kal = 6.14.5-kal (from
content)
supermin: kernel: picked modules path /lib/modules/6.14.5-kal
supermin: kernel: kernel version of
/boot/vmlinuz-6.14.2-amdsos-build66-ubuntu-24.04+ =
6.14.2-amdsos-build66-ubuntu-24.04+ (from content)
supermin: kernel: picked modules path
/lib/modules/6.14.2-amdsos-build66-ubuntu-24.04+
supermin: kernel: kernel version of /boot/vmlinuz-6.8.0-60-generic =
6.8.0-60-generic (from content)
supermin: kernel: picked modules path /lib/modules/6.8.0-60-generic
supermin: kernel: picked vmlinuz /boot/vmlinuz-6.15.1
supermin: kernel: kernel_version 6.15.1
supermin: kernel: modpath /lib/modules/6.15.1
supermin: ext2: creating empty ext2 filesystem
'/var/tmp/.guestfs-0/appliance.d.fvi7sn27/root'
supermin: ext2: populating from base image
supermin: ext2: copying files from host filesystem
supermin: ext2: copying kernel modules
supermin: ext2: creating minimal initrd
'/var/tmp/.guestfs-0/appliance.d.fvi7sn27/initrd'
supermin: ext2: wrote 0 modules to minimal initrd
supermin: renaming /var/tmp/.guestfs-0/appliance.d.fvi7sn27 to
/var/tmp/.guestfs-0/appliance.d
libguestfs: finished building supermin appliance
libguestfs: begin testing qemu features
libguestfs: trace: get_cachedir
libguestfs: trace: get_cachedir = "/var/tmp"
libguestfs: checking for previously cached test results of
/usr/bin/qemu-system-x86_64, in /var/tmp/.guestfs-0
libguestfs: loading previously cached test results
libguestfs: qemu version: 8.2
libguestfs: qemu mandatory locking: yes
libguestfs: qemu KVM: enabled
libguestfs: trace: get_backend_setting "force_tcg"
libguestfs: trace: get_backend_setting = NULL (error)
libguestfs: trace: get_backend_setting "force_kvm"
libguestfs: trace: get_backend_setting = NULL (error)
libguestfs: trace: get_sockdir
libguestfs: trace: get_sockdir = "/tmp"
libguestfs: finished testing qemu features
libguestfs: trace: get_backend_setting "gdb"
libguestfs: trace: get_backend_setting = NULL (error)
libguestfs: command: run: passt --help
Usage: passt [OPTION]...
-d, --debug\t\tBe verbose
--trace\t\tBe extra verbose, implies --debug
-q, --quiet\t\tDon't print informational messages
-f, --foreground\tDon't run in background
default: run in background if started from a TTY
-e, --stderr\t\tLog to stderr too
default: log to system logger only if started from a TTY
-l, --log-file PATH\tLog (only) to given file
--log-size BYTES\tMaximum size of log file
default: 1 MiB
--runas UID|UID:GID \tRun as given UID, GID, which can be
numeric, or login and group names
default: drop to user "nobody"
-h, --help\t\tDisplay this help message and exit
--version\t\tShow version and exit
-s, --socket PATH\tUNIX domain socket path
default: probe free path starting from /tmp/passt_1.socket
-F, --fd FD\t\tUse FD as pre-opened connected socket
-p, --pcap FILE\tLog tap-facing traffic to pcap file
-P, --pid FILE\tWrite own PID to the given file
-m, --mtu MTU\tAssign MTU via DHCP/NDP
a zero value disables assignment
default: 65520: maximum 802.3 MTU minus 802.3 header
length, rounded to 32 bits (IPv4 words)
-a, --address ADDR\tAssign IPv4 or IPv6 address ADDR
can be specified zero to two times (for IPv4 and IPv6)
default: use addresses from interface with default route
-n, --netmask MASK\tAssign IPv4 MASK, dot-decimal or bits
default: netmask from matching address on the host
-M, --mac-addr ADDR\tUse source MAC address ADDR
default: MAC address from interface with default route
-g, --gateway ADDR\tPass IPv4 or IPv6 address as gateway
default: gateway from interface with default route
-i, --interface NAME\tInterface for addresses and routes
default: from --outbound-if4 and --outbound-if6, if any
otherwise interface with first default route
-o, --outbound ADDR\tBind to address as outbound source
can be specified zero to two times (for IPv4 and IPv6)
default: use source address from routing tables
--outbound-if4 NAME\tBind to outbound interface for IPv4
default: use interface from default route
--outbound-if6 NAME\tBind to outbound interface for IPv6
default: use interface from default route
-D, --dns ADDR\tUse IPv4 or IPv6 address as DNS
can be specified multiple times
a single, empty option disables DNS information
default: use addresses from /etc/resolv.conf
-S, --search LIST\tSpace-separated list, search domains
a single, empty option disables the DNS search list
default: use search list from /etc/resolv.conf
--no-dhcp-dns\tNo DNS list in DHCP/DHCPv6/NDP
--no-dhcp-search\tNo list in DHCP/DHCPv6/NDP
--dns-forward ADDR\tForward DNS queries sent to ADDR
can be specified zero to two times (for IPv4 and IPv6)
default: don't forward DNS queries
--no-tcp\t\tDisable TCP protocol handler
--no-udp\t\tDisable UDP protocol handler
--no-icmp\t\tDisable ICMP/ICMPv6 protocol handler
--no-dhcp\t\tDisable DHCP server
--no-ndp\t\tDisable NDP responses
--no-dhcpv6\t\tDisable DHCPv6 server
--no-ra\t\tDisable router advertisements
--no-map-gw\t\tDon't map gateway address to host
-4, --ipv4-only\tEnable IPv4 operation only
-6, --ipv6-only\tEnable IPv6 operation only
-1, --one-off\tQuit after handling one single client
-t, --tcp-ports SPEC\tTCP port forwarding to guest
can be specified multiple times
SPEC can be:
'none': don't forward any ports
'all': forward all unbound, non-ephemeral ports
a comma-separated list, optionally ranged with '-'
and optional target ports after ':', with optional
address specification suffixed by '/' and optional
interface prefixed by '%'. Ranges can be reduced by
excluding ports or ranges prefixed by '~'
Examples:
-t 22\t\tForward local port 22 to 22 on guest
-t 22:23\tForward local port 22 to 23 on guest
-t 22,25\tForward ports 22, 25 to ports 22, 25
-t 22-80 \tForward ports 22 to 80
-t 22-80:32-90\tForward ports 22 to 80 to
\t\t\tcorresponding port numbers plus 10
-t 192.0.2.1/5\tBind port 5 of 192.0.2.1 to guest
-t 5-25,~10-20\tForward ports 5 to 9, and 21 to 25
-t ~25\t\tForward all ports except for 25
default: none
-u, --udp-ports SPEC\tUDP port forwarding to guest
SPEC is as described for TCP above
default: none
libguestfs: command: run: passt
libguestfs: command: run: \ --one-off
libguestfs: command: run: \ --socket /tmp/libguestfs5Zhzrj/passt.sock
libguestfs: command: run: \ --pid /tmp/libguestfs5Zhzrj/passt1.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
Don't run as root. Changing to nobody...
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 /tmp/libguestfs5Zhzrj/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=/tmp/libguestfs5Zhzrj/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
libguestfs: trace: close
libguestfs: closing guestfs handle 0x55da1783fdd0 (state 0)
libguestfs: command: run: rm
libguestfs: command: run: \ -rf /tmp/libguestfsrYvBRy
libguestfs: command: run: rm
libguestfs: command: run: \ -rf /tmp/libguestfs5Zhzrj
_______________________________________________
Libguestfs mailing list -- guestfs@lists.libguestfs.org
To unsubscribe send an email to guestfs-le...@lists.libguestfs.org