virt-customize --install broken

davosian

Member
Feb 4, 2021
6
0
6
45
Hi there,

when running the following commands on my Proxmox 7.4-15 cluster, it fails:

Bash:
ssh root@proxmox-server

apt update && apt install libguestfs-tools -y
wget https://cloud.debian.org/images/cloud/bookworm/latest/debian-12-generic-amd64.qcow2
virt-customize -a debian-12-generic-amd64.qcow2 --install qemu-guest-agent

The error I am getting is as follows:

Bash:
[   0.0] Examining the guest ...
[   3.6] Setting a random seed
virt-customize: warning: random seed could not be set for this type of
guest
[   3.6] Installing packages: qemu-guest-agent
Get:1 file:/etc/apt/mirrors/debian.list Mirrorlist [30 B]
Get:5 file:/etc/apt/mirrors/debian-security.list Mirrorlist [39 B]
Ign:2 https://deb.debian.org/debian bookworm InRelease
Ign:3 https://deb.debian.org/debian bookworm-updates InRelease
Ign:4 https://deb.debian.org/debian bookworm-backports InRelease
Ign:6 https://deb.debian.org/debian-security bookworm-security InRelease
Ign:2 https://deb.debian.org/debian bookworm InRelease
Ign:3 https://deb.debian.org/debian bookworm-updates InRelease
Ign:4 https://deb.debian.org/debian bookworm-backports InRelease
Ign:6 https://deb.debian.org/debian-security bookworm-security InRelease
Ign:2 https://deb.debian.org/debian bookworm InRelease
Ign:3 https://deb.debian.org/debian bookworm-updates InRelease
Ign:4 https://deb.debian.org/debian bookworm-backports InRelease
Ign:6 https://deb.debian.org/debian-security bookworm-security InRelease
Err:2 https://deb.debian.org/debian bookworm InRelease
  Temporary failure resolving 'deb.debian.org'
Err:3 https://deb.debian.org/debian bookworm-updates InRelease
  Temporary failure resolving 'deb.debian.org'
Err:4 https://deb.debian.org/debian bookworm-backports InRelease
  Temporary failure resolving 'deb.debian.org'
Err:6 https://deb.debian.org/debian-security bookworm-security InRelease
  Temporary failure resolving 'deb.debian.org'
Reading package lists...
W: Failed to fetch mirror+file:/etc/apt/mirrors/debian.list/dists/bookworm/InRelease  Temporary failure resolving 'deb.debian.org'
W: Failed to fetch mirror+file:/etc/apt/mirrors/debian.list/dists/bookworm-updates/InRelease  Temporary failure resolving 'deb.debian.org'
W: Failed to fetch mirror+file:/etc/apt/mirrors/debian.list/dists/bookworm-backports/InRelease  Temporary failure resolving 'deb.debian.org'
W: Failed to fetch mirror+file:/etc/apt/mirrors/debian-security.list/dists/bookworm-security/InRelease  Temporary failure resolving 'deb.debian.org'
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...
E: Unable to locate package qemu-guest-agent
Get:1 file:/etc/apt/mirrors/debian.list Mirrorlist [30 B]
Get:5 file:/etc/apt/mirrors/debian-security.list Mirrorlist [39 B]
Ign:2 https://deb.debian.org/debian bookworm InRelease
Ign:3 https://deb.debian.org/debian bookworm-updates InRelease
Ign:4 https://deb.debian.org/debian bookworm-backports InRelease
Ign:6 https://deb.debian.org/debian-security bookworm-security InRelease
Ign:2 https://deb.debian.org/debian bookworm InRelease
Ign:3 https://deb.debian.org/debian bookworm-updates InRelease
Ign:4 https://deb.debian.org/debian bookworm-backports InRelease
Ign:6 https://deb.debian.org/debian-security bookworm-security InRelease
Ign:2 https://deb.debian.org/debian bookworm InRelease
Ign:3 https://deb.debian.org/debian bookworm-updates InRelease
Ign:4 https://deb.debian.org/debian bookworm-backports InRelease
Ign:6 https://deb.debian.org/debian-security bookworm-security InRelease
Err:2 https://deb.debian.org/debian bookworm InRelease
  Temporary failure resolving 'deb.debian.org'
Err:3 https://deb.debian.org/debian bookworm-updates InRelease
  Temporary failure resolving 'deb.debian.org'
Err:4 https://deb.debian.org/debian bookworm-backports InRelease
  Temporary failure resolving 'deb.debian.org'
Err:6 https://deb.debian.org/debian-security bookworm-security InRelease
  Temporary failure resolving 'deb.debian.org'
Reading package lists...
W: Failed to fetch mirror+file:/etc/apt/mirrors/debian.list/dists/bookworm/InRelease  Temporary failure resolving 'deb.debian.org'
W: Failed to fetch mirror+file:/etc/apt/mirrors/debian.list/dists/bookworm-updates/InRelease  Temporary failure resolving 'deb.debian.org'
W: Failed to fetch mirror+file:/etc/apt/mirrors/debian.list/dists/bookworm-backports/InRelease  Temporary failure resolving 'deb.debian.org'
W: Failed to fetch mirror+file:/etc/apt/mirrors/debian-security.list/dists/bookworm-security/InRelease  Temporary failure resolving 'deb.debian.org'
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...
E: Unable to locate package qemu-guest-agent
virt-customize: error:
        export DEBIAN_FRONTEND=noninteractive
        apt_opts='-q -y -o Dpkg::Options::=--force-confnew'
        apt-get $apt_opts update
        apt-get $apt_opts install 'qemu-guest-agent'
      : command exited with an error

If reporting bugs, run virt-customize with debugging enabled and include
the complete output:

  virt-customize -v -x [...]

I tried disabling the firewall on this node and I tried the same using an ubuntu image. The result was always the same. Any idea why this `virt-customize` command cannot access the mirrors?
 
The packages are bookwork (Debian 12), Proxmox 7 uses bullseye (Debian 11)
 
I just found the culpit: the DNS entries on the node where not correct. When I added something like 8.8.8.8, the command worked fine.
It is somewhat weird, because a curl to google.com was resolving correctly (but maybe going through another DNS Server by accident - I had two configured). Also, I had no issue running the command on a VM in Proxmox, only on the node itself.

Anyways, case closed :)
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!