Skip to content

[Unifi OS Server VM] unable to parse volume filenname #1657

@frontend-report

Description

@frontend-report

Script: Unifi OS Server VM

Reported by: @horfic

Guidelines

  • Read and understood guidelines: yes
  • Verbose mode used: yes

Issue occurs during: Initial Creation / Installation

Environment

  • Linux distribution: Debian
  • Proxmox version: 9.1
  • Default settings: Yes
  • Advanced settings: Yes
  • Exact command: bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/vm/unifi-os-server-vm.sh)"

Description

VM creation does not work at default or advanced settings.

[ERROR] line 834: exit code 25: while executing pvesm alloc "$STORAGE" "$VMID" "vm-$VMID-disk-0" 4M > /dev/null

Steps to reproduce

Step 1: Start the script
Step 2: Use default
Step 3: If asked for storage, select the local one.

Error output

  • cat


    / / / /___ () __() / __ / / / / ______ _____ _____
    / / / / __ / / /
    / / / / / /_
    \ _
    / _ / / | / / _ / /
    / /
    / / / / / / __/ / / /
    / /
    / / / / _/ / | |/ / / /
    _
    /
    / /
    /
    /
    / // _/// //___// |/_/_/

  • echo -e ' ⚙️ \033[m\033[1m\033[36mUsing Default Settings\033[m'
    ⚙️ Using Default Settings

  • default_settings

  • select_os
    ++ whiptail --backtitle 'Proxmox VE Helper Scripts' --title 'SELECT OS' --radiolist 'Choose Operating System for UniFi OS VM' 12 68 2 debian13 'Debian 13 (Trixie) - Latest' ON ubuntu2404 'Ubuntu 24.04 LTS (Noble)' OFF

  • OS_CHOICE=debian13

  • case $OS_CHOICE in

  • OS_TYPE=debian

  • OS_VERSION=13

  • OS_CODENAME=trixie

  • OS_DISPLAY='Debian 13 (Trixie)'

  • select_cloud_init

  • USE_CLOUD_INIT=yes

  • set_root_password

  • true
    ++ whiptail --backtitle 'Proxmox VE Helper Scripts' --passwordbox 'Set root password for the VM' 8 58 --title 'ROOT PASSWORD' --cancel-button Exit-Script

  • PW1=password

  • '[' -z password ']'
    ++ whiptail --backtitle 'Proxmox VE Helper Scripts' --passwordbox 'Confirm root password' 8 58 --title 'CONFIRM PASSWORD' --cancel-button Exit-Script

  • PW2=password

  • '[' password = password ']'

  • USER_PASSWORD=password

  • echo -e ' 💡 \033[m\033[1m\033[32mRoot Password: \033[4;92m(set)\033[m'
    💡 Root Password: (set)

  • break

  • set_ssh_keys

  • SSH_KEYS_FILE=

  • SSH_KEY_COUNT=0

  • true
    ++ whiptail --backtitle 'Proxmox VE Helper Scripts' --inputbox 'Paste an SSH public key (0 added so far)' 8 74 --title 'SSH PUBLIC KEYS' --ok-button Add --cancel-button Done

  • PASTED_KEY=

  • break

  • '[' 0 -gt 0 ']'

  • echo -e ' 💡 \033[m\033[1m\033[32mSSH Keys: \033[4;92mnone (password auth only)\033[m'
    💡 SSH Keys: none (password auth only)
    ++ get_valid_nextid
    ++ local try_id
    +++ pvesh get /cluster/nextid
    ++ try_id=107
    ++ true
    ++ '[' -f /etc/pve/qemu-server/107.conf ']'
    ++ '[' -f /etc/pve/lxc/107.conf ']'
    ++ lvs --noheadings -o lv_name
    ++ grep -qE '(^|[-])107($|[-])'
    ++ break
    ++ echo 107

  • VMID=107

  • FORMAT=

  • MACHINE=' -machine q35'

  • DISK_CACHE=

  • DISK_SIZE=32G

  • HN=unifi-server-os

  • CPU_TYPE=' -cpu host'

  • CORE_COUNT=2

  • RAM_SIZE=6144

  • BRG=vmbr0

  • MAC=02:A8:48:71:41:1F

  • VLAN=

  • MTU=

  • START_VM=yes

  • METHOD=default

  • echo -e ' 🆔 \033[m\033[1m\033[32mVirtual Machine ID: \033[4;92m107\033[m'
    🆔 Virtual Machine ID: 107

  • echo -e ' 📦 \033[m\033[1m\033[32mMachine Type: \033[4;92mQ35 (Modern)\033[m'
    📦 Machine Type: Q35 (Modern)

  • echo -e ' 💾 \033[m\033[1m\033[32mDisk Size: \033[4;92m32G\033[m'
    💾 Disk Size: 32G

  • echo -e ' 💾 \033[m\033[1m\033[32mDisk Cache: \033[4;92mNone\033[m'
    💾 Disk Cache: None

  • echo -e ' 🏠 \033[m\033[1m\033[32mHostname: \033[4;92munifi-server-os\033[m'
    🏠 Hostname: unifi-server-os

  • echo -e ' 🖥️ \033[m\033[1m\033[32mCPU Model: \033[4;92mHost\033[m'
    🖥️ CPU Model: Host

  • echo -e ' 🧠 \033[m\033[1m\033[32mCPU Cores: \033[4;92m2\033[m'
    🧠 CPU Cores: 2

  • echo -e ' 🛠️ \033[m\033[1m\033[32mRAM Size: \033[4;92m6144\033[m'
    🛠️ RAM Size: 6144

  • echo -e ' 🌉 \033[m\033[1m\033[32mBridge: \033[4;92mvmbr0\033[m'
    🌉 Bridge: vmbr0

  • echo -e ' 🔗 \033[m\033[1m\033[32mMAC Address: \033[4;92m02:A8:48:71:41:1F\033[m'
    🔗 MAC Address: 02:A8:48:71:41:1F

  • echo -e ' 🏷️ \033[m\033[1m\033[32mVLAN: \033[4;92mDefault\033[m'
    🏷️ VLAN: Default

  • echo -e ' ⚙️ \033[m\033[1m\033[32mInterface MTU Size: \033[4;92mDefault\033[m'
    ⚙️ Interface MTU Size: Default

  • echo -e ' 🌐 \033[m\033[1m\033[32mStart VM when completed: \033[4;92myes\033[m'
    🌐 Start VM when completed: yes

  • echo -e ' 🚀 \033[m\033[1m\033[32mCreating a UniFi OS VM using the above default settings\033[m'
    🚀 Creating a UniFi OS VM using the above default settings

  • post_to_api_vm

  • [[ -f /usr/local/community-scripts/diagnostics ]]

  • command -v curl

  • [[ no == \n\o ]]

  • return 0

  • msg_info 'Checking system resources'

  • local 'msg=Checking system resources'

  • echo -ne ' \033[33m Checking system resources '
    Checking system resources ++ grep MemTotal /proc/meminfo
    ++ awk '{printf "%.0f", $2 / 1024 / 1024}'

  • SYSTEM_RAM_GB=63
    ++ grep SwapTotal /proc/meminfo
    ++ awk '{printf "%.0f", $2 / 1024 / 1024}'

  • SYSTEM_SWAP_GB=0
    ++ df -BG /
    ++ awk 'NR==2 {print $4}'
    ++ sed s/G//

  • SYSTEM_FREE_DISK_GB=121

  • [[ 63 -lt 4 ]]

  • [[ 121 -lt 10 ]]

  • msg_ok 'System resources: 63GB RAM, 121GB free disk'

  • local 'msg=System resources: 63GB RAM, 121GB free disk'

  • echo -e '\r\033[K ✔️ \033[m\033[1;92mSystem resources: 63GB RAM, 121GB free disk\033[m'
    ✔️ System resources: 63GB RAM, 121GB free disk

  • command -v ufw

  • msg_info 'Validating Storage'

  • local 'msg=Validating Storage'

  • echo -ne ' \033[33m Validating Storage '
    Validating Storage + STORAGE_MENU=()

  • MSG_MAX_LENGTH=0

  • read -r line
    ++ pvesm status -content images
    ++ awk 'NR>1'
    ++ echo local-btrfs btrfs active 246076496 115852208 126008848 47.08%
    ++ awk '{print $1}'

  • TAG=local-btrfs
    ++ echo local-btrfs btrfs active 246076496 115852208 126008848 47.08%
    ++ awk '{printf "%-10s", $2}'

  • TYPE='btrfs '
    ++ echo local-btrfs btrfs active 246076496 115852208 126008848 47.08%
    ++ numfmt --field 4-6 --from-unit=K --to=iec --format %.2f

  • FREE='local-btrfs btrfs active 229.18G 107.90G 117.36G 47.08%'

  • ITEM=' Type: btrfs Free: local-btrfs btrfs active 229.18G 107.90G 117.36G 47.08% '

  • OFFSET=2

  • [[ 89 -gt 0 ]]

  • MSG_MAX_LENGTH=89

  • STORAGE_MENU+=("$TAG" "$ITEM" "OFF")

  • read -r line
    ++ echo sas-fs01_vms-fast nfs active 976761856 377824256 597456896 38.68%
    ++ awk '{print $1}'

  • TAG=sas-fs01_vms-fast
    ++ echo sas-fs01_vms-fast nfs active 976761856 377824256 597456896 38.68%
    ++ awk '{printf "%-10s", $2}'

  • TYPE='nfs '
    ++ echo sas-fs01_vms-fast nfs active 976761856 377824256 597456896 38.68%
    ++ numfmt --field 4-6 --from-unit=K --to=iec --format %.2f

  • FREE='sas-fs01_vms-fast nfs active 909.69G 351.88G 556.43G 38.68%'

  • ITEM=' Type: nfs Free: sas-fs01_vms-fast nfs active 909.69G 351.88G 556.43G 38.68% '

  • OFFSET=2

  • [[ 93 -gt 89 ]]

  • MSG_MAX_LENGTH=93

  • STORAGE_MENU+=("$TAG" "$ITEM" "OFF")

  • read -r line
    ++ echo sas-fs01_vms-slow nfs active 105457446912 103012644864 2444802048 97.68%
    ++ awk '{print $1}'

  • TAG=sas-fs01_vms-slow
    ++ echo sas-fs01_vms-slow nfs active 105457446912 103012644864 2444802048 97.68%
    ++ awk '{printf "%-10s", $2}'

  • TYPE='nfs '
    ++ echo sas-fs01_vms-slow nfs active 105457446912 103012644864 2444802048 97.68%
    ++ numfmt --field 4-6 --from-unit=K --to=iec --format %.2f

  • FREE='sas-fs01_vms-slow nfs active 95.92T 93.69T 2.23T 97.68%'

  • ITEM=' Type: nfs Free: sas-fs01_vms-slow nfs active 95.92T 93.69T 2.23T 97.68% '

  • OFFSET=2

  • [[ 100 -gt 93 ]]

  • MSG_MAX_LENGTH=100

  • STORAGE_MENU+=("$TAG" "$ITEM" "OFF")

  • read -r line
    ++ pvesm status -content images
    ++ awk 'NR>1'

  • VALID='local-btrfs btrfs active 246076496 115852208 126008848 47.08%
    sas-fs01_vms-fast nfs active 976761856 377824256 597456896 38.68%
    sas-fs01_vms-slow nfs active 105457446912 103012644864 2444802048 97.68%'

  • '[' -z 'local-btrfs btrfs active 246076496 115852208 126008848 47.08%
    sas-fs01_vms-fast nfs active 976761856 377824256 597456896 38.68%
    sas-fs01_vms-slow nfs active 105457446912 103012644864 2444802048 97.68%' ']'

  • '[' 3 -eq 1 ']'

  • '[' -z '' ']'

  • printf '\e[?25h'
    ++ whiptail --backtitle 'Proxmox VE Helper Scripts' --title 'Storage Pools' --radiolist 'Which storage pool would you like to use for unifi-server-os?\nTo make a selection, use the Spacebar.\n' 16 123 6 local-btrfs ' Type: btrfs Free: local-btrfs btrfs active 229.18G 107.90G 117.36G 47.08% ' OFF sas-fs01_vms-fast ' Type: nfs Free: sas-fs01_vms-fast nfs active 909.69G 351.88G 556.43G 38.68% ' OFF sas-fs01_vms-slow ' Type: nfs Free: sas-fs01_vms-slow nfs active 95.92T 93.69T 2.23T 97.68% ' OFF

  • STORAGE=local-btrfs

  • '[' -z x ']'

  • msg_ok 'Using \033[m\033[36mlocal-btrfs\033[m \033[1;92mfor Storage Location.'

  • local 'msg=Using \033[m\033[36mlocal-btrfs\033[m \033[1;92mfor Storage Location.'

  • echo -e '\r\033[K ✔️ \033[m\033[1;92mUsing \033[m\033[36mlocal-btrfs\033[m \033[1;92mfor Storage Location.\033[m'
    ✔️ Using local-btrfs for Storage Location.

  • msg_ok 'Virtual Machine ID is \033[m\033[36m107\033[m.'

  • local 'msg=Virtual Machine ID is \033[m\033[36m107\033[m.'

  • echo -e '\r\033[K ✔️ \033[m\033[1;92mVirtual Machine ID is \033[m\033[36m107\033[m.\033[m'
    ✔️ Virtual Machine ID is 107.

  • msg_info 'Fetching latest UniFi OS Server version'

  • local 'msg=Fetching latest UniFi OS Server version'

  • echo -ne ' \033[33m Fetching latest UniFi OS Server version '
    Fetching latest UniFi OS Server version + command -v jq

  • API_URL=https://fw-update.ui.com/api/firmware-latest
    ++ mktemp

  • TEMP_JSON=/tmp/tmp.Ev41JOtT5c

  • curl -fsSL https://fw-update.ui.com/api/firmware-latest -o /tmp/tmp.Ev41JOtT5c
    ++ jq -r '
    ._embedded.firmware
    | map(select(.product == "unifi-os-server"))
    | map(select(.platform == "linux-x64"))
    | sort_by(.version_major, .version_minor, .version_patch)
    | last
    ' /tmp/tmp.Ev41JOtT5c

  • LATEST='{
    "channel": "release",
    "created": "2025-12-11T14:08:41Z",
    "file_size": 841709186,
    "id": "c91588f2-f35d-4a3e-b641-38321a20b5db",
    "md5": "610b385c834bad7c4db00c29e2b8a9f1",
    "sha256_checksum": "20fa164791938b2ec9d5680c118753c46a36eaa3369cef94d5cef8da9468df9e",
    "platform": "linux-x64",
    "product": "unifi-os-server",
    "updated": "2025-12-11T14:08:41Z",
    "version": "v5.0.6",
    "version_major": 5,
    "version_minor": 0,
    "version_patch": 6,
    "probability_computed": 0,
    "_links": {
    "self": {
    "href": "https://fw-update.ui.com/api/firmware/c91588f2-f35d-4a3e-b641-38321a20b5db"
    },
    "upload": [
    {
    "name": "data",
    "href": "https://fw-update.ui.com/api/firmware/c91588f2-f35d-4a3e-b641-38321a20b5db/data"
    },
    {
    "name": "changelog",
    "href": "https://fw-update.ui.com/api/firmware/c91588f2-f35d-4a3e-b641-38321a20b5db/changelog"
    }
    ],
    "data": {
    "href": "https://fw-download.ubnt.com/data/unifi-os-server/1856-linux-x64-5.0.6-33f4990f-6c68-4e72-9d9c-477496c22450.6-x64"
    }
    }
    }'
    ++ echo '{
    "channel": "release",
    "created": "2025-12-11T14:08:41Z",
    "file_size": 841709186,
    "id": "c91588f2-f35d-4a3e-b641-38321a20b5db",
    "md5": "610b385c834bad7c4db00c29e2b8a9f1",
    "sha256_checksum": "20fa164791938b2ec9d5680c118753c46a36eaa3369cef94d5cef8da9468df9e",
    "platform": "linux-x64",
    "product": "unifi-os-server",
    "updated": "2025-12-11T14:08:41Z",
    "version": "v5.0.6",
    "version_major": 5,
    "version_minor": 0,
    "version_patch": 6,
    "probability_computed": 0,
    "_links": {
    "self": {
    "href": "https://fw-update.ui.com/api/firmware/c91588f2-f35d-4a3e-b641-38321a20b5db"
    },
    "upload": [
    {
    "name": "data",
    "href": "https://fw-update.ui.com/api/firmware/c91588f2-f35d-4a3e-b641-38321a20b5db/data"
    },
    {
    "name": "changelog",
    "href": "https://fw-update.ui.com/api/firmware/c91588f2-f35d-4a3e-b641-38321a20b5db/changelog"
    }
    ],
    "data": {
    "href": "https://fw-download.ubnt.com/data/unifi-os-server/1856-linux-x64-5.0.6-33f4990f-6c68-4e72-9d9c-477496c22450.6-x64"
    }
    }
    }'
    ++ jq -r .version
    ++ sed 's/^v//'

  • UOS_VERSION=5.0.6
    ++ echo '{
    "channel": "release",
    "created": "2025-12-11T14:08:41Z",
    "file_size": 841709186,
    "id": "c91588f2-f35d-4a3e-b641-38321a20b5db",
    "md5": "610b385c834bad7c4db00c29e2b8a9f1",
    "sha256_checksum": "20fa164791938b2ec9d5680c118753c46a36eaa3369cef94d5cef8da9468df9e",
    "platform": "linux-x64",
    "product": "unifi-os-server",
    "updated": "2025-12-11T14:08:41Z",
    "version": "v5.0.6",
    "version_major": 5,
    "version_minor": 0,
    "version_patch": 6,
    "probability_computed": 0,
    "_links": {
    "self": {
    "href": "https://fw-update.ui.com/api/firmware/c91588f2-f35d-4a3e-b641-38321a20b5db"
    },
    "upload": [
    {
    "name": "data",
    "href": "https://fw-update.ui.com/api/firmware/c91588f2-f35d-4a3e-b641-38321a20b5db/data"
    },
    {
    "name": "changelog",
    "href": "https://fw-update.ui.com/api/firmware/c91588f2-f35d-4a3e-b641-38321a20b5db/changelog"
    }
    ],
    "data": {
    "href": "https://fw-download.ubnt.com/data/unifi-os-server/1856-linux-x64-5.0.6-33f4990f-6c68-4e72-9d9c-477496c22450.6-x64"
    }
    }
    }'
    ++ jq -r ._links.data.href

  • UOS_URL=https://fw-download.ubnt.com/data/unifi-os-server/1856-linux-x64-5.0.6-33f4990f-6c68-4e72-9d9c-477496c22450.6-x64

  • rm -f /tmp/tmp.Ev41JOtT5c

  • '[' -z https://fw-download.ubnt.com/data/unifi-os-server/1856-linux-x64-5.0.6-33f4990f-6c68-4e72-9d9c-477496c22450.6-x64 ']'

  • '[' -z 5.0.6 ']'

  • UOS_INSTALLER=unifi-os-server-5.0.6.bin

  • msg_ok 'Found UniFi OS Server 5.0.6'

  • local 'msg=Found UniFi OS Server 5.0.6'

  • echo -e '\r\033[K ✔️ \033[m\033[1;92mFound UniFi OS Server 5.0.6\033[m'
    ✔️ Found UniFi OS Server 5.0.6

  • msg_info 'Downloading Debian 13 (Trixie) Cloud Image'

  • local 'msg=Downloading Debian 13 (Trixie) Cloud Image'

  • echo -ne ' \033[33m Downloading Debian 13 (Trixie) Cloud Image '
    Downloading Debian 13 (Trixie) Cloud Image ++ get_image_url
    ++ local arch
    +++ dpkg --print-architecture
    ++ arch=amd64
    ++ case $OS_TYPE in
    ++ echo https://cloud.debian.org/images/cloud/trixie/latest/debian-13-generic-amd64.qcow2

  • URL=https://cloud.debian.org/images/cloud/trixie/latest/debian-13-generic-amd64.qcow2

  • sleep 2

  • msg_ok '\033[m\033[36mhttps://cloud.debian.org/images/cloud/trixie/latest/debian-13-generic-amd64.qcow2\033[m'

  • local 'msg=\033[m\033[36mhttps://cloud.debian.org/images/cloud/trixie/latest/debian-13-generic-amd64.qcow2\033[m'

  • echo -e '\r\033[K ✔️ \033[m\033[1;92m\033[m\033[36mhttps://cloud.debian.org/images/cloud/trixie/latest/debian-13-generic-amd64.qcow2\033[m\033[m'
    ✔️ https://cloud.debian.org/images/cloud/trixie/latest/debian-13-generic-amd64.qcow2
    ++ basename https://cloud.debian.org/images/cloud/trixie/latest/debian-13-generic-amd64.qcow2

  • curl -f#SL -o debian-13-generic-amd64.qcow2 https://cloud.debian.org/images/cloud/trixie/latest/debian-13-generic-amd64.qcow2
    ########################################################################################################################################################################################################### 100.0%
    ++ basename https://cloud.debian.org/images/cloud/trixie/latest/debian-13-generic-amd64.qcow2

  • FILE=debian-13-generic-amd64.qcow2

  • msg_ok 'Downloaded \033[m\033[36mdebian-13-generic-amd64.qcow2\033[m'

  • local 'msg=Downloaded \033[m\033[36mdebian-13-generic-amd64.qcow2\033[m'

  • echo -e '\r\033[K ✔️ \033[m\033[1;92mDownloaded \033[m\033[36mdebian-13-generic-amd64.qcow2\033[m\033[m'
    ✔️ Downloaded debian-13-generic-amd64.qcow2

  • msg_ok 'Downloaded Debian 13 (Trixie) Cloud Image'

  • local 'msg=Downloaded Debian 13 (Trixie) Cloud Image'

  • echo -e '\r\033[K ✔️ \033[m\033[1;92mDownloaded Debian 13 (Trixie) Cloud Image\033[m'
    ✔️ Downloaded Debian 13 (Trixie) Cloud Image

  • msg_info 'Expanding disk image to 32G'

  • local 'msg=Expanding disk image to 32G'

  • echo -ne ' \033[33m Expanding disk image to 32G '
    Expanding disk image to 32G + command -v virt-resize

  • qemu-img create -f qcow2 expanded.qcow2 32G
    ++ virt-filesystems --long -h --all -a debian-13-generic-amd64.qcow2
    ++ grep -oP '/dev/\K(s|v)da1'
    ++ head -1

  • PARTITION_DEV=sda1

  • '[' -z sda1 ']'

  • virt-resize --quiet --expand /dev/sda1 debian-13-generic-amd64.qcow2 expanded.qcow2

  • mv expanded.qcow2 debian-13-generic-amd64.qcow2

  • msg_ok 'Expanded disk image to 32G'

  • local 'msg=Expanded disk image to 32G'

  • echo -e '\r\033[K ✔️ \033[m\033[1;92mExpanded disk image to 32G\033[m'
    ✔️ Expanded disk image to 32G

  • msg_info 'Downloading UniFi OS Server 5.0.6 installer'

  • local 'msg=Downloading UniFi OS Server 5.0.6 installer'

  • echo -ne ' \033[33m Downloading UniFi OS Server 5.0.6 installer '
    Downloading UniFi OS Server 5.0.6 installer + curl -fsSL https://fw-download.ubnt.com/data/unifi-os-server/1856-linux-x64-5.0.6-33f4990f-6c68-4e72-9d9c-477496c22450.6-x64 -o unifi-os-server.bin

  • chmod +x unifi-os-server.bin

  • msg_ok 'Downloaded UniFi OS Server installer'

  • local 'msg=Downloaded UniFi OS Server installer'

  • echo -e '\r\033[K ✔️ \033[m\033[1;92mDownloaded UniFi OS Server installer\033[m'
    ✔️ Downloaded UniFi OS Server installer

  • msg_info 'Customizing disk image (installing packages, staging installer)'

  • local 'msg=Customizing disk image (installing packages, staging installer)'

  • echo -ne ' \033[33m Customizing disk image (installing packages, staging installer) '
    Customizing disk image (installing packages, staging installer) ++ mktemp

  • FIRSTBOOT_SCRIPT=/tmp/tmp.HgKll8npdq

  • cat
    ++ mktemp

  • FIRSTBOOT_SVC=/tmp/tmp.4TNa8mK84r

  • cat

  • virt-customize -a debian-13-generic-amd64.qcow2 --upload unifi-os-server.bin:/opt/unifi-os-server.bin --chmod 0755:/opt/unifi-os-server.bin --upload /tmp/tmp.HgKll8npdq:/opt/unifi-os-firstboot.sh --chmod 0755:/opt/unifi-os-firstboot.sh --upload /tmp/tmp.4TNa8mK84r:/etc/systemd/system/unifi-os-firstboot.service --run-command 'systemctl enable unifi-os-firstboot.service' --run-command 'sed -i '''s/^#?PermitRootLogin./PermitRootLogin yes/''' /etc/ssh/sshd_config' --run-command 'sed -i '''s/^#?PasswordAuthentication./PasswordAuthentication yes/''' /etc/ssh/sshd_config' --run-command 'systemctl enable ssh'

  • read -r line

  • echo -ne '\r\033[K \033[33m [ 0.0] Examining the guest ... '
    [ 0.0] Examining the guest ... + read -r line

  • echo -ne '\r\033[K \033[33m [ 2.0] Setting a random seed '
    [ 2.0] Setting a random seed + read -r line

  • echo -ne '\r\033[K \033[33m virt-customize: warning: random seed could not be set for this type of guest '
    virt-customize: warning: random seed could not be set for this type of guest + read -r line

  • echo -ne '\r\033[K \033[33m [ 2.0] Setting the machine ID in /etc/machine-id '
    [ 2.0] Setting the machine ID in /etc/machine-id + read -r line

  • echo -ne '\r\033[K \033[33m [ 2.0] Uploading: unifi-os-server.bin to /opt/unifi-os-server.bin '
    [ 2.0] Uploading: unifi-os-server.bin to /opt/unifi-os-server.bin + read -r line

  • echo -ne '\r\033[K \033[33m [ 4.3] Changing permissions of /opt/unifi-os-server.bin to 0755 '
    [ 4.3] Changing permissions of /opt/unifi-os-server.bin to 0755 + read -r line

  • echo -ne '\r\033[K \033[33m [ 4.3] Uploading: /tmp/tmp.HgKll8npdq to /opt/unifi-os-firstboot.sh '
    [ 4.3] Uploading: /tmp/tmp.HgKll8npdq to /opt/unifi-os-firstboot.sh + read -r line

  • echo -ne '\r\033[K \033[33m [ 4.3] Changing permissions of /opt/unifi-os-firstboot.sh to 0755 '
    [ 4.3] Changing permissions of /opt/unifi-os-firstboot.sh to 0755 + read -r line

  • echo -ne '\r\033[K \033[33m [ 4.3] Uploading: /tmp/tmp.4TNa8mK84r to /etc/systemd/system/unifi-os-firstboot.service '
    [ 4.3] Uploading: /tmp/tmp.4TNa8mK84r to /etc/systemd/system/unifi-os-firstboot.service + read -r line

  • echo -ne '\r\033[K \033[33m [ 4.3] Running: systemctl enable unifi-os-firstboot.service '
    [ 4.3] Running: systemctl enable unifi-os-firstboot.service + read -r line

  • echo -ne '\r\033[K \033[33m [ 4.4] Running: sed -i '''s/^#?PermitRootLogin./PermitRootLogin yes/''' /etc/ssh/sshd_config '
    [ 4.4] Running: sed -i 's/^#?PermitRootLogin.
    /PermitRootLogin yes/' /etc/ssh/sshd_config + read -r line

  • echo -ne '\r\033[K \033[33m [ 4.4] Running: sed -i '''s/^#?PasswordAuthentication./PasswordAuthentication yes/''' /etc/ssh/sshd_config '
    [ 4.4] Running: sed -i 's/^#?PasswordAuthentication.
    /PasswordAuthentication yes/' /etc/ssh/sshd_config + read -r line

  • echo -ne '\r\033[K \033[33m [ 4.4] Running: systemctl enable ssh '
    [ 4.4] Running: systemctl enable ssh + read -r line

  • echo -ne '\r\033[K \033[33m [ 4.5] SELinux relabelling '
    [ 4.5] SELinux relabelling + read -r line

  • echo -ne '\r\033[K \033[33m [ 4.6] Finishing off '
    [ 4.6] Finishing off + read -r line

  • rm -f /tmp/tmp.HgKll8npdq /tmp/tmp.4TNa8mK84r unifi-os-server.bin

  • msg_ok 'Disk image customized (UniFi OS 5.0.6 staged for first-boot install)'

  • local 'msg=Disk image customized (UniFi OS 5.0.6 staged for first-boot install)'

  • echo -e '\r\033[K ✔️ \033[m\033[1;92mDisk image customized (UniFi OS 5.0.6 staged for first-boot install)\033[m'
    ✔️ Disk image customized (UniFi OS 5.0.6 staged for first-boot install)

  • msg_info 'Creating UniFi OS VM'

  • local 'msg=Creating UniFi OS VM'

  • echo -ne ' \033[33m Creating UniFi OS VM '
    Creating UniFi OS VM + qm create 107 -agent 1 -machine q35 -tablet 0 -localtime 1 -bios ovmf -cpu host -cores 2 -memory 6144 -name unifi-server-os -tags community-script -net0 virtio,bridge=vmbr0,macaddr=02:A8:48:71:41:1F -onboot 1 -ostype l26 -scsihw virtio-scsi-pci

  • pvesm alloc local-btrfs 107 vm-107-disk-0 4M
    unable to parse volume filename 'vm-107-disk-0'
    ++ error_handler 834 'pvesm alloc "$STORAGE" "$VMID" "vm-$VMID-disk-0" 4M > /dev/null'
    ++ local exit_code=25
    ++ local line_number=834
    ++ local 'command=pvesm alloc "$STORAGE" "$VMID" "vm-$VMID-disk-0" 4M > /dev/null'
    ++ post_update_to_api failed 'pvesm alloc "$STORAGE" "$VMID" "vm-$VMID-disk-0" 4M > /dev/null'
    ++ command -v curl
    ++ local force=
    ++ POST_UPDATE_DONE=false
    ++ [[ false == \t\r\u\e ]]
    ++ [[ no == \n\o ]]
    ++ return 0
    ++ echo -e '\n\033[01;31m[ERROR]\033[m line \033[01;31m834\033[m: exit code \033[01;31m25\033[m: while executing \033[33mpvesm alloc "$STORAGE" "$VMID" "vm-$VMID-disk-0" 4M > /dev/null\033[m\n'

[ERROR] line 834: exit code 25: while executing pvesm alloc "$STORAGE" "$VMID" "vm-$VMID-disk-0" 4M > /dev/null

++ '[' -n 107 ']'
++ qm status 107
++ qm stop 107

  • cleanup
  • popd
  • post_update_to_api done none
  • command -v curl
  • local force=
  • POST_UPDATE_DONE=false
  • [[ false == \t\r\u\e ]]
  • [[ no == \n\o ]]
  • return 0
  • '[' -n /tmp/tmp.ev51Vygtsc ']'
  • rm -rf /tmp/tmp.ev51Vygtsc

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions