proxmox_hassos_install icon indicating copy to clipboard operation
proxmox_hassos_install copied to clipboard

vmid: type check ('integer') failed

Open aussieskibum opened this issue 4 years ago • 5 comments

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!

aussieskibum avatar May 05 '20 04:05 aussieskibum

Is this still a problem?

whiskerz007 avatar May 28 '20 15:05 whiskerz007

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.

aussieskibum avatar May 30 '20 22:05 aussieskibum

Is this still a problem?

i have the same issue here today fresh install

docteurzoidberg avatar Aug 26 '20 10:08 docteurzoidberg

I have this problem too, And the proposed fix worked

FranciscoTrigo avatar Sep 07 '20 06:09 FranciscoTrigo

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.

whiskerz007 avatar Oct 28 '20 12:10 whiskerz007