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 [ 0.0] Examining the guest ... [ 2.9] Setting a random
seed virt-customize: warning: random seed could not be setforthis typeof
guest [ 2.9] Installing packages: isc-dhcp-client Reading package
lists... W: Failed to fetch
http://archive.ubuntu.com/ubuntu/dists/noble/InRelease Temporary failure
resolving 'archive.ubuntu.com'W: Failed to fetch
http://archive.ubuntu.com/ubuntu/dists/noble-updates/InRelease Temporary
failure resolving 'archive.ubuntu.com'W: Failed to fetch
http://archive.ubuntu.com/ubuntu/dists/noble-backports/InRelease
Temporary failure resolving 'archive.ubuntu.com'W: Failed to fetch
http://security.ubuntu.com/ubuntu/dists/noble-security/InRelease
Temporary failure resolving 'security.ubuntu.com'W: Some index files
failed to download. They have been ignored, or old ones used instead.
Reading package lists... Building dependency tree... Reading state
information... Package grub2 is not available, but is referred to by
another package. This may mean that the package is missing, has been
obsoleted, or is only available from another sourceHowever the following
packages replace it: grub-efi-amd64 grub-pc-bin grub-pc
grub-ieee1275-bin grub-ieee1275 grub-efi-ia32-bin grub-efi-ia32
grub-efi-amd64-bin E: Unable to locate package isc-dhcp-client E: Unable
to locate package isc-dhcp-client-ddns E: Package 'grub2'has no
installation candidate ... If reporting bugs, run virt-customize with
debugging enabled and include the complete output: virt-customize -v -x
[...]|
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:
+ 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 \ ..
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?
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?
Thank you,
Srikanth Aithal
Srikanth.Aithal(a)amd.com
AMD Linux group