whiskerz007 / proxmox_hassos_install

MIT License
887 stars 192 forks source link

Setting Boot Order - Error 255@140 Unknown failure occurred #91

Closed osuapoc closed 3 years ago

osuapoc commented 3 years ago

On Proxmox 6.2.11 I get the following error when running the script:

[INFO] Using 'local-zfs' for storage location.
[INFO] Container ID is 103.
Getting URL for latest Home Assistant disk image...
Downloading disk image...
Extracting disk image...
Creating VM...
400 Parameter verification failed.
boot: value does not match the regex pattern
qm set <vmid> [OPTIONS]
[ERROR] 255@140 Unknown failure occured.

Running the script more verbose yields:

root@dellprox:~# bash -xc "$(wget -qLO - https://github.com/whiskerz007/proxmox_hassos_install/raw/master/install.sh)"
+ set -o errexit
+ set -o errtrace
+ set -o nounset
+ set -o pipefail
+ shopt -s expand_aliases
+ alias 'die=EXIT=$? LINE=$LINENO error_exit'
+ trap die ERR
+ trap cleanup EXIT
++ mktemp -d
+ TEMP_DIR=/tmp/tmp.61X6Js9bFG
+ pushd /tmp/tmp.61X6Js9bFG
+ read -r line
++ pvesm status -content images
++ awk 'NR>1'
++ echo FreeNAS_Storage nfs active 21756288256 1222721792 20533566464 5.62%
++ awk '{print $1}'
+ TAG=FreeNAS_Storage
++ echo FreeNAS_Storage nfs active 21756288256 1222721792 20533566464 5.62%
++ awk '{printf "%-10s", $2}'
+ TYPE='nfs       '
++ echo FreeNAS_Storage nfs active 21756288256 1222721792 20533566464 5.62%
++ numfmt --field 4-6 --from-unit=K --to=iec --format %.2f
++ awk '{printf( "%9sB", $6)}'
+ FREE='   18.68TB'
+ ITEM='  Type: nfs        Free:    18.68TB '
+ OFFSET=2
+ [[ 38 -gt '' ]]
+ MSG_MAX_LENGTH=38
+ STORAGE_MENU+=("$TAG" "$ITEM" "OFF")
+ read -r line
++ echo SSDscratch lvmthin active 468619264 370818423 97800840 79.13%
++ awk '{print $1}'
+ TAG=SSDscratch
++ echo SSDscratch lvmthin active 468619264 370818423 97800840 79.13%
++ awk '{printf "%-10s", $2}'
+ TYPE='lvmthin   '
++ echo SSDscratch lvmthin active 468619264 370818423 97800840 79.13%
++ numfmt --field 4-6 --from-unit=K --to=iec --format %.2f
++ awk '{printf( "%9sB", $6)}'
+ FREE='   91.09GB'
+ ITEM='  Type: lvmthin    Free:    91.09GB '
+ OFFSET=2
+ [[ 38 -gt 38 ]]
+ STORAGE_MENU+=("$TAG" "$ITEM" "OFF")
+ read -r line
++ echo local-zfs zfspool active 427847476 323647416 104200060 75.65%
++ awk '{print $1}'
+ TAG=local-zfs
++ echo local-zfs zfspool active 427847476 323647416 104200060 75.65%
++ awk '{printf "%-10s", $2}'
+ TYPE='zfspool   '
++ echo local-zfs zfspool active 427847476 323647416 104200060 75.65%
++ numfmt --field 4-6 --from-unit=K --to=iec --format %.2f
++ awk '{printf( "%9sB", $6)}'
+ FREE='   97.05GB'
+ ITEM='  Type: zfspool    Free:    97.05GB '
+ OFFSET=2
+ [[ 38 -gt 38 ]]
+ STORAGE_MENU+=("$TAG" "$ITEM" "OFF")
+ read -r line
++ echo rust1 lvm active 292966400 167772160 125194240 57.27%
++ awk '{print $1}'
+ TAG=rust1
++ echo rust1 lvm active 292966400 167772160 125194240 57.27%
++ awk '{printf "%-10s", $2}'
+ TYPE='lvm       '
++ echo rust1 lvm active 292966400 167772160 125194240 57.27%
++ numfmt --field 4-6 --from-unit=K --to=iec --format %.2f
++ awk '{printf( "%9sB", $6)}'
+ FREE='  116.60GB'
+ ITEM='  Type: lvm        Free:   116.60GB '
+ OFFSET=2
+ [[ 38 -gt 38 ]]
+ STORAGE_MENU+=("$TAG" "$ITEM" "OFF")
+ read -r line
+ '[' 4 -eq 0 ']'
+ '[' 4 -eq 1 ']'
+ '[' -z '' ']'
++ whiptail --title 'Storage Pools' --radiolist 'Which storage pool you would like to use for the container?\n\n' 16 61 6 FreeNAS_Storage '  Type: nfs        Free:    18.68TB ' OFF SSDscratch '  Type: lvmthin    Free:    91.09GB ' OFF local-zfs '  Type: zfspool    Free:    97.05GB ' OFF rust1 '  Type: lvm        Free:   116.60GB ' OFF
+ STORAGE=local-zfs
+ '[' -z x ']'
+ info 'Using '\''local-zfs'\'' for storage location.'
+ local 'REASON=Using '\''local-zfs'\'' for storage location.'
+ local 'FLAG=\e[36m[INFO]\e[39m'
+ msg '\e[36m[INFO]\e[39m Using '\''local-zfs'\'' for storage location.'
+ local 'TEXT=\e[36m[INFO]\e[39m Using '\''local-zfs'\'' for storage location.'
+ echo -e '\e[36m[INFO]\e[39m Using '\''local-zfs'\'' for storage location.'
[INFO] Using 'local-zfs' for storage location.
++ pvesh get /cluster/nextid
+ VMID=103
+ info 'Container ID is 103.'
+ local 'REASON=Container ID is 103.'
+ local 'FLAG=\e[36m[INFO]\e[39m'
+ msg '\e[36m[INFO]\e[39m Container ID is 103.'
+ local 'TEXT=\e[36m[INFO]\e[39m Container ID is 103.'
+ echo -e '\e[36m[INFO]\e[39m Container ID is 103.'
[INFO] Container ID is 103.
+ msg 'Getting URL for latest Home Assistant disk image...'
+ local 'TEXT=Getting URL for latest Home Assistant disk image...'
+ echo -e 'Getting URL for latest Home Assistant disk image...'
Getting URL for latest Home Assistant disk image...
+ RELEASE_EXT=vmdk.gz
++ cat
++ python3
+ URL=https://github.com/home-assistant/operating-system/releases/download/4.20/hassos_ova-4.20.vmdk.gz
+ '[' -z https://github.com/home-assistant/operating-system/releases/download/4.20/hassos_ova-4.20.vmdk.gz ']'
+ msg 'Downloading disk image...'
+ local 'TEXT=Downloading disk image...'
+ echo -e 'Downloading disk image...'
Downloading disk image...
+ wget -q --show-progress https://github.com/home-assistant/operating-system/releases/download/4.20/hassos_ova-4.20.vmdk.gz
hassos_ova-4.20.vmdk.gz                100%[=========================================================================>] 277.60M  13.8MB/s    in 22s
++ basename https://github.com/home-assistant/operating-system/releases/download/4.20/hassos_ova-4.20.vmdk.gz
+ FILE=hassos_ova-4.20.vmdk.gz
+ msg 'Extracting disk image...'
+ local 'TEXT=Extracting disk image...'
+ echo -e 'Extracting disk image...'
Extracting disk image...
+ gunzip -f hassos_ova-4.20.vmdk.gz
++ pvesm status -storage local-zfs
++ awk 'NR>1 {print $2}'
+ STORAGE_TYPE=zfspool
+ '[' zfspool = dir ']'
+ for i in {0,1}
+ disk=DISK0
+ eval DISK0=vm-103-disk-0
++ DISK0=vm-103-disk-0
+ eval DISK0_REF=local-zfs:vm-103-disk-0
++ DISK0_REF=local-zfs:vm-103-disk-0
+ for i in {0,1}
+ disk=DISK1
+ eval DISK1=vm-103-disk-1
++ DISK1=vm-103-disk-1
+ eval DISK1_REF=local-zfs:vm-103-disk-1
++ DISK1_REF=local-zfs:vm-103-disk-1
+ msg 'Creating VM...'
+ local 'TEXT=Creating VM...'
+ echo -e 'Creating VM...'
Creating VM...
++ sed -e 's/\_//g' -e s/.vmdk.gz//
+ VM_NAME=hassosova-4.20
+ qm create 103 -agent 1 -bios ovmf -name hassosova-4.20 -net0 virtio,bridge=vmbr0 -onboot 1 -ostype l26 -scsihw virtio-scsi-pci
+ pvesm alloc local-zfs 103 vm-103-disk-0 128
+ qm importdisk 103 hassos_ova-4.20.vmdk local-zfs
+ qm set 103 -efidisk0 local-zfs:vm-103-disk-0,size=128K -sata0 local-zfs:vm-103-disk-1,size=6G
+ qm set 103 -boot order=sata0
400 Parameter verification failed.
boot: value does not match the regex pattern
qm set <vmid> [OPTIONS]
++ EXIT=255
++ LINE=140
++ error_exit
++ trap - ERR
++ local 'DEFAULT=Unknown failure occured.'
++ local 'REASON=\e[97mUnknown failure occured.\e[39m'
++ local 'FLAG=\e[91m[ERROR] \e[93m255@140'
++ msg '\e[91m[ERROR] \e[93m255@140 \e[97mUnknown failure occured.\e[39m'
++ local 'TEXT=\e[91m[ERROR] \e[93m255@140 \e[97mUnknown failure occured.\e[39m'
++ echo -e '\e[91m[ERROR] \e[93m255@140 \e[97mUnknown failure occured.\e[39m'
[ERROR] 255@140 Unknown failure occured.
++ '[' '!' -z 103 ']'
++ cleanup_vmid
+++ qm status 103
+++ qm status 103
+++ awk '{print $2}'
++ '[' stopped == running ']'
++ qm destroy 103
++ exit 255
+ cleanup
+ popd
+ rm -rf /tmp/tmp.61X6Js9bFG

I believe the issue is that my local disks show as iscsi0 and not sata0 when looking at my boot order menus.

Gullfrode commented 3 years ago

Same problem here, bash -c "$(wget -qLO - https://github.com/whiskerz007/proxmox_hassos_install/raw/master/install.sh)" [INFO] Using 'local-lvm' for storage location. [INFO] Container ID is 102. Getting URL for latest Home Assistant disk image... Downloading disk image... Extracting disk image... Creating VM... 400 Parameter verification failed. boot: value does not match the regex pattern qm set <vmid> [OPTIONS] [ERROR] 255@140 Unknown failure occured. Logical volume "vm-102-disk-1" successfully removed Logical volume "vm-102-disk-0" successfully removed

ahakobyan79 commented 3 years ago

I'm having this same issue on Proxmox 5.4-13 version. Can this be fixed?

Gullfrode commented 3 years ago

I updated Proxmox to latest version(Datacenter-NUC(my Proxmoxname)-Updates), and Hassio installed. Changed the boot order, waited a couple of minutes, and was up and running. Installed samba, and are now restoring from backup.

osuapoc commented 3 years ago

Can confirm that updating to 6.3-3 (I must have had a package out of date somewhere, or something in the kernel) has solved the issue. The script ran without any hiccups.