proxmox_hassos_install
proxmox_hassos_install copied to clipboard
vmid: type check ('integer') failed
This may be related to issue #56 as it happens immediately after "Creating VM..."
From start of script execution at a Proxmox 5.2-2 Console:
[INFO] Using 'local-lvm' for storage location. 200 OK [INFO] Container ID is "109". Getting URL for latest Home Assistant disk image... Downloading disk image... Extracting disk image... Creating VM... 400 Parameter verification failed. vmid: type check ('integer') failed - got '"109"' qm create
[OPTIONS] [ERROR] 255@126 Unknown failure occured.
Even though I have almost no experience playing around with bash scripts, i'm always keen to master the art of the bodge.
I downloaded the script myself, played around with trying to replicate what the script was doing with defining vmid, it appears to store the " " in the variable, so the contents of vmid is
"###"
not just
###
as I assumed it was looking for, as "###" wouldn't pass an integer check.
After googling trimming strings in bash and getting very lost very quickly, I tried looking at how to pull chars from a string.
playing around on the console I was about to get
NUMBERSONLY=${VMID:1:3}
to return just the 3 digits and not the "s.
I inserted VMID=${VMID:1:3} into install.sh here:
# Get the next guest VM/LXC ID
VMID=$(pvesh get /cluster/nextid)
VMID=${VMID:1:3}
info "Container ID is $VMID."
ran it, and it worked! Probably a no brainer for most of you, but thought I would report as i was pretty stoked it actually worked!
Is this still a problem?
I'm not sure, I haven't tried to run it again since. If I have time I'll try to run it again and see if it happens.
Is this still a problem?
i have the same issue here today fresh install
I have this problem too, And the proposed fix worked
This problem seems to be caused by the way Proxmox scripts have been modified. The script seems to works with PVE 6.x versions. If there is enough interest in supporting PVE 5.x, this problem can be looked into.