[GH-ISSUE #12073] Docker VM Install Error #2533

Closed
opened 2026-02-26 12:52:45 +03:00 by kerem · 0 comments
Owner

Originally created by @braxtron on GitHub (Feb 19, 2026).
Original GitHub issue: https://github.com/community-scripts/ProxmoxVE/issues/12073

Have you read and understood the above guidelines?

yes

🔎 Did you run the script with verbose mode enabled?

Yes, verbose mode was enabled and the output is included below

📜 What is the name of the script you are using?

Docker DockerVM

📂 What was the exact command used to execute the script?

bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/vm/docker-vm.sh)"

⚙️ What settings are you using?

  • Default Settings
  • Advanced Settings

🖥️ Which Linux distribution are you using?

Debian 13

📈 Which Proxmox version are you on?

9.1.5

📝 Provide a clear and concise description of the issue.

Install fails near the end. The last line here just spins forever:

EOF' >/dev/null 2>&1
DOCKER_PREINSTALLED="yes"
msg_ok "Configured Docker daemon"
else
msg_ok "Docker will be installed on first boot"
fi
else
msg_ok "Packages will be installed on first boot"
fi
✔️ Packages will be installed on first boot

msg_info "Finalizing image (hostname, SSH config)"

Set hostname and prepare for unique machine-id

⠋ Finalizing image (hostname, SSH config)virt-customize -q -a "$WORK_FILE" --hostname "${HN}" >/dev/null 2>&1
⠧ Finalizing image (hostname, SSH config)error_handler $LINENO "$BASH_COMMAND"

[ERROR] in line 528: exit code 1: while executing command virt-customize -q -a "$WORK_FILE" --hostname "${HN}" > /dev/null 2>&1

⠸ Finalizing image (hostname, SSH config)cleanup

🔄 Steps to reproduce the issue.

Run script and choose default settings.

Paste the full error output (if available).

⚙️ Using Default Settings
🖥️ Operating System: Debian 13 (Trixie)
☁️ Cloud-Init: yes
🆔 Virtual Machine ID: 103
📦 Machine Type: Q35 (Modern)
💾 Disk Size: 10G
💾 Disk Cache: None
🏠 Hostname: docker
🖥️ CPU Model: Host
🧠 CPU Cores: 2
🛠️ RAM Size: 4096
🌉 Bridge: vmbr0
🔗 MAC Address: 02:34:03:D5:27:1C
🏷️ VLAN: Default
⚙️ Interface MTU Size: Default
🌐 Start VM when completed: yes
🚀 Creating a Docker VM using the above settings
post_to_api_vm

==============================================================================

STORAGE SELECTION

==============================================================================

msg_info "Validating Storage"
while read -r line; do
TAG=$(echo $line | awk '{print $1}')
⠋ Validating Storage TYPE=$(echo $line | awk '{printf "%-10s", $2}')
FREE=$(echo $line | numfmt --field 4-6 --from-unit=K --to=iec --format %.2f | awk '{printf( "%9sB", $6)}')
ITEM=" Type: $TYPE Free: $FREE "
OFFSET=2
if $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ; then
MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET))
fi
STORAGE_MENU+=("$TAG" "$ITEM" "OFF")
done < <(pvesm status -content images | awk 'NR>1')
⠼ Validating Storage

VALID=$(pvesm status -content images | awk 'NR>1')
⠋ Validating Storageif [ -z "$VALID" ]; then
msg_error "Unable to detect a valid storage location."
exit
elif [ $((${#STORAGE_MENU[@]} / 3)) -eq 1 ]; then
STORAGE=${STORAGE_MENU[0]}
else
if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID >/dev/null; then kill $SPINNER_PID >/dev/null; fi
printf "\e[?25h"
while [ -z "${STORAGE:+x}" ]; do
STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist
done
fi
msg_ok "Using ${CL}${BL}$STORAGE${CL} ${GN}for Storage Location."
✔️ Using local-lvm for Storage Location.
msg_ok "Virtual Machine ID is ${CL}${BL}$VMID${CL}."
✔️ Virtual Machine ID is 103.

==============================================================================

PREREQUISITES

==============================================================================

if ! command -v virt-customize &>/dev/null; then
msg_info "Installing libguestfs-tools"
apt-get -qq update >/dev/null
apt-get -qq install libguestfs-tools lsb-release -y >/dev/null
apt-get -qq install dhcpcd-base -y >/dev/null 2>&1 || true
msg_ok "Installed libguestfs-tools"
fi

==============================================================================

IMAGE DOWNLOAD

==============================================================================

msg_info "Retrieving the URL for the ${OS_DISPLAY} Qcow2 Disk Image"
URL=$(get_image_url)
⠋ Retrieving the URL for the Debian 13 (Trixie) Qcow2 Disk ImageCACHE_DIR="/var/lib/vz/template/cache"
CACHE_FILE="$CACHE_DIR/$(basename "$URL")"
mkdir -p "$CACHE_DIR"
msg_ok "${CL}${BL}${URL}${CL}"
✔️ https://cloud.debian.org/images/cloud/trixie/latest/debian-13-generic-amd64.qcow2

if ! -s "$CACHE_FILE" ; then
curl -f#SL -o "$CACHE_FILE" "$URL"
echo -en "\e[1A\e[0K"
msg_ok "Downloaded ${CL}${BL}$(basename "$CACHE_FILE")${CL}"
else
msg_ok "Using cached image ${CL}${BL}$(basename "$CACHE_FILE")${CL}"
fi
✔️ Using cached image debian-13-generic-amd64.qcow2

==============================================================================

STORAGE TYPE DETECTION

==============================================================================

STORAGE_TYPE=$(pvesm status -storage "$STORAGE" | awk 'NR>1 {print $2}')
case $STORAGE_TYPE in
nfs | dir)
DISK_EXT=".qcow2"
DISK_REF="$VMID/"
DISK_IMPORT="--format qcow2"
THIN=""
;;
btrfs)
DISK_EXT=".raw"
DISK_REF="$VMID/"
DISK_IMPORT="--format raw"
FORMAT=",efitype=4m"
THIN=""
;;
*)
DISK_EXT=""
DISK_REF=""
DISK_IMPORT="--format raw"
;;
esac

==============================================================================

IMAGE CUSTOMIZATION WITH DOCKER

==============================================================================

msg_info "Preparing ${OS_DISPLAY} image with Docker"

WORK_FILE=$(mktemp --suffix=.qcow2)
⠋ Preparing Debian 13 (Trixie) image with Dockercp "$CACHE_FILE" "$WORK_FILE"

export LIBGUESTFS_BACKEND_SETTINGS=dns=8.8.8.8,1.1.1.1

DOCKER_PREINSTALLED="no"

Install qemu-guest-agent and Docker during image customization

msg_info "Installing base packages in image"
if virt-customize -a "$WORK_FILE" --install qemu-guest-agent,curl,ca-certificates >/dev/null 2>&1; then
⠋ Installing base packages in image msg_ok "Installed base packages"

msg_info "Installing Docker (this may take 2-5 minutes)"
if virt-customize -q -a "$WORK_FILE" --run-command "curl -fsSL https://get.docker.com | sh" >/dev/null 2>&1 &&
virt-customize -q -a "$WORK_FILE" --run-command "systemctl enable docker" >/dev/null 2>&1; then
msg_ok "Installed Docker"

msg_info "Configuring Docker daemon"
# Optimize Docker daemon configuration
virt-customize -q -a "$WORK_FILE" --run-command "mkdir -p /etc/docker" >/dev/null 2>&1
virt-customize -q -a "$WORK_FILE" --run-command 'cat > /etc/docker/daemon.json << EOF

{
"storage-driver": "overlay2",
"log-driver": "json-file",
"log-opts": {
"max-size": "10m",
"max-file": "3"
}
}
EOF' >/dev/null 2>&1
DOCKER_PREINSTALLED="yes"
msg_ok "Configured Docker daemon"
else
msg_ok "Docker will be installed on first boot"
fi
else
msg_ok "Packages will be installed on first boot"
fi
✔️ Packages will be installed on first boot

msg_info "Finalizing image (hostname, SSH config)"

Set hostname and prepare for unique machine-id

⠋ Finalizing image (hostname, SSH config)virt-customize -q -a "$WORK_FILE" --hostname "${HN}" >/dev/null 2>&1
⠧ Finalizing image (hostname, SSH config)error_handler $LINENO "$BASH_COMMAND"

[ERROR] in line 528: exit code 1: while executing command virt-customize -q -a "$WORK_FILE" --hostname "${HN}" > /dev/null 2>&1

⠸ Finalizing image (hostname, SSH config)cleanup

🖼️ Additional context (optional).

No response

Originally created by @braxtron on GitHub (Feb 19, 2026). Original GitHub issue: https://github.com/community-scripts/ProxmoxVE/issues/12073 ### ✅ Have you read and understood the above guidelines? yes ### 🔎 Did you run the script with verbose mode enabled? Yes, verbose mode was enabled and the output is included below ### 📜 What is the name of the script you are using? Docker DockerVM ### 📂 What was the exact command used to execute the script? bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/vm/docker-vm.sh)" ### ⚙️ What settings are you using? - [x] Default Settings - [ ] Advanced Settings ### 🖥️ Which Linux distribution are you using? Debian 13 ### 📈 Which Proxmox version are you on? 9.1.5 ### 📝 Provide a clear and concise description of the issue. Install fails near the end. The last line here just spins forever: EOF' >/dev/null 2>&1 DOCKER_PREINSTALLED="yes" msg_ok "Configured Docker daemon" else msg_ok "Docker will be installed on first boot" fi else msg_ok "Packages will be installed on first boot" fi ✔️ Packages will be installed on first boot msg_info "Finalizing image (hostname, SSH config)" # Set hostname and prepare for unique machine-id ⠋ Finalizing image (hostname, SSH config)virt-customize -q -a "$WORK_FILE" --hostname "${HN}" >/dev/null 2>&1 ⠧ Finalizing image (hostname, SSH config)error_handler $LINENO "$BASH_COMMAND" [ERROR] in line 528: exit code 1: while executing command virt-customize -q -a "$WORK_FILE" --hostname "${HN}" > /dev/null 2>&1 ⠸ Finalizing image (hostname, SSH config)cleanup ### 🔄 Steps to reproduce the issue. Run script and choose default settings. ### ❌ Paste the full error output (if available). ⚙️ Using Default Settings 🖥️ Operating System: Debian 13 (Trixie) ☁️ Cloud-Init: yes 🆔 Virtual Machine ID: 103 📦 Machine Type: Q35 (Modern) 💾 Disk Size: 10G 💾 Disk Cache: None 🏠 Hostname: docker 🖥️ CPU Model: Host 🧠 CPU Cores: 2 🛠️ RAM Size: 4096 🌉 Bridge: vmbr0 🔗 MAC Address: 02:34:03:D5:27:1C 🏷️ VLAN: Default ⚙️ Interface MTU Size: Default 🌐 Start VM when completed: yes 🚀 Creating a Docker VM using the above settings post_to_api_vm # ============================================================================== # STORAGE SELECTION # ============================================================================== msg_info "Validating Storage" while read -r line; do TAG=$(echo $line | awk '{print $1}') ⠋ Validating Storage TYPE=$(echo $line | awk '{printf "%-10s", $2}') FREE=$(echo $line | numfmt --field 4-6 --from-unit=K --to=iec --format %.2f | awk '{printf( "%9sB", $6)}') ITEM=" Type: $TYPE Free: $FREE " OFFSET=2 if [[ $((${#ITEM} + $OFFSET)) -gt ${MSG_MAX_LENGTH:-} ]]; then MSG_MAX_LENGTH=$((${#ITEM} + $OFFSET)) fi STORAGE_MENU+=("$TAG" "$ITEM" "OFF") done < <(pvesm status -content images | awk 'NR>1') ⠼ Validating Storage VALID=$(pvesm status -content images | awk 'NR>1') ⠋ Validating Storageif [ -z "$VALID" ]; then msg_error "Unable to detect a valid storage location." exit elif [ $((${#STORAGE_MENU[@]} / 3)) -eq 1 ]; then STORAGE=${STORAGE_MENU[0]} else if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID >/dev/null; then kill $SPINNER_PID >/dev/null; fi printf "\e[?25h" while [ -z "${STORAGE:+x}" ]; do STORAGE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Storage Pools" --radiolist \ done fi msg_ok "Using ${CL}${BL}$STORAGE${CL} ${GN}for Storage Location." ✔️ Using local-lvm for Storage Location. msg_ok "Virtual Machine ID is ${CL}${BL}$VMID${CL}." ✔️ Virtual Machine ID is 103. # ============================================================================== # PREREQUISITES # ============================================================================== if ! command -v virt-customize &>/dev/null; then msg_info "Installing libguestfs-tools" apt-get -qq update >/dev/null apt-get -qq install libguestfs-tools lsb-release -y >/dev/null apt-get -qq install dhcpcd-base -y >/dev/null 2>&1 || true msg_ok "Installed libguestfs-tools" fi # ============================================================================== # IMAGE DOWNLOAD # ============================================================================== msg_info "Retrieving the URL for the ${OS_DISPLAY} Qcow2 Disk Image" URL=$(get_image_url) ⠋ Retrieving the URL for the Debian 13 (Trixie) Qcow2 Disk ImageCACHE_DIR="/var/lib/vz/template/cache" CACHE_FILE="$CACHE_DIR/$(basename "$URL")" mkdir -p "$CACHE_DIR" msg_ok "${CL}${BL}${URL}${CL}" ✔️ https://cloud.debian.org/images/cloud/trixie/latest/debian-13-generic-amd64.qcow2 if [[ ! -s "$CACHE_FILE" ]]; then curl -f#SL -o "$CACHE_FILE" "$URL" echo -en "\e[1A\e[0K" msg_ok "Downloaded ${CL}${BL}$(basename "$CACHE_FILE")${CL}" else msg_ok "Using cached image ${CL}${BL}$(basename "$CACHE_FILE")${CL}" fi ✔️ Using cached image debian-13-generic-amd64.qcow2 # ============================================================================== # STORAGE TYPE DETECTION # ============================================================================== STORAGE_TYPE=$(pvesm status -storage "$STORAGE" | awk 'NR>1 {print $2}') case $STORAGE_TYPE in nfs | dir) DISK_EXT=".qcow2" DISK_REF="$VMID/" DISK_IMPORT="--format qcow2" THIN="" ;; btrfs) DISK_EXT=".raw" DISK_REF="$VMID/" DISK_IMPORT="--format raw" FORMAT=",efitype=4m" THIN="" ;; *) DISK_EXT="" DISK_REF="" DISK_IMPORT="--format raw" ;; esac # ============================================================================== # IMAGE CUSTOMIZATION WITH DOCKER # ============================================================================== msg_info "Preparing ${OS_DISPLAY} image with Docker" WORK_FILE=$(mktemp --suffix=.qcow2) ⠋ Preparing Debian 13 (Trixie) image with Dockercp "$CACHE_FILE" "$WORK_FILE" export LIBGUESTFS_BACKEND_SETTINGS=dns=8.8.8.8,1.1.1.1 DOCKER_PREINSTALLED="no" # Install qemu-guest-agent and Docker during image customization msg_info "Installing base packages in image" if virt-customize -a "$WORK_FILE" --install qemu-guest-agent,curl,ca-certificates >/dev/null 2>&1; then ⠋ Installing base packages in image msg_ok "Installed base packages" msg_info "Installing Docker (this may take 2-5 minutes)" if virt-customize -q -a "$WORK_FILE" --run-command "curl -fsSL https://get.docker.com | sh" >/dev/null 2>&1 && virt-customize -q -a "$WORK_FILE" --run-command "systemctl enable docker" >/dev/null 2>&1; then msg_ok "Installed Docker" msg_info "Configuring Docker daemon" # Optimize Docker daemon configuration virt-customize -q -a "$WORK_FILE" --run-command "mkdir -p /etc/docker" >/dev/null 2>&1 virt-customize -q -a "$WORK_FILE" --run-command 'cat > /etc/docker/daemon.json << EOF { "storage-driver": "overlay2", "log-driver": "json-file", "log-opts": { "max-size": "10m", "max-file": "3" } } EOF' >/dev/null 2>&1 DOCKER_PREINSTALLED="yes" msg_ok "Configured Docker daemon" else msg_ok "Docker will be installed on first boot" fi else msg_ok "Packages will be installed on first boot" fi ✔️ Packages will be installed on first boot msg_info "Finalizing image (hostname, SSH config)" # Set hostname and prepare for unique machine-id ⠋ Finalizing image (hostname, SSH config)virt-customize -q -a "$WORK_FILE" --hostname "${HN}" >/dev/null 2>&1 ⠧ Finalizing image (hostname, SSH config)error_handler $LINENO "$BASH_COMMAND" [ERROR] in line 528: exit code 1: while executing command virt-customize -q -a "$WORK_FILE" --hostname "${HN}" > /dev/null 2>&1 ⠸ Finalizing image (hostname, SSH config)cleanup ### 🖼️ Additional context (optional). _No response_
kerem 2026-02-26 12:52:45 +03:00
  • closed this issue
  • added the
    bug
    label
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ProxmoxVE#2533
No description provided.