tteck / Proxmox

Proxmox VE Helper-Scripts
https://Helper-Scripts.com
MIT License
13.6k stars 2.13k forks source link

HAOS script misses on advanced settings the disk size #3895

Closed devexa closed 5 days ago

devexa commented 5 days ago

Please verify that you have read and understood the guidelines.

yes

A clear and concise description of the issue.

IDK if I missed it at some point, but I could not find in the advanced section the disk size setting which IMO is pretty important. And, regarding how detailed the advanced section is, I considered this as a mistake/issue/forgotten step more than a feature request.

It'd great if instead of being hardcoded to 32G, to have an additionnal step (for example right before or after the cache setting) to manually set the desired size in G for HAOS vDisk. It can be by default prefilled with the size 32.

Thanks for your amazing work !

PS: in Linux distro I selected a random thing as HAOS is missing from the list and selecting it is mandatory to submit an issue.

What settings are you currently utilizing?

Advanced Settings

Which Linux distribution are you employing?

Debian 12

If relevant, including screenshots or a code block can be helpful in clarifying the issue.

No response

Please provide detailed steps to reproduce the issue.

No response

Mellowlynx commented 5 days ago

The HAOS (VM) is downloading a disk image, so that's why it can't be changed during the deployment.

devexa commented 5 days ago

Indeed, but from what I know you can expand the disk storage. So, we might not be able to choose a value below 32, but it seems doable to expand it to whatever size the user chooses. The only main verification we'd need, would be to obviously choose a minimum size of 32G. That could be implemented right after the disk importation with a simple line like : qm resize $VMID scsi0 +${SIZE_TO_ADD}G In addition to the needed code to prompt the user for the size and check if the size is valid (>=32 && free disk space is enough && eventually that the size isn't absurdly high). The SIZE_TO_ADD = FINAL_SIZE - 32. FINAL_SIZE is what the user is prompted to enter.

tteck commented 5 days ago

Did you read the instructions?

🛈 The disk must have a minimum size of 32GB and its size cannot be changed during the creation of the VM.

@Mellowlynx is correct.

devexa commented 5 days ago

Yes ! But I dont really agree with the second part of it : 'its size cannot be changed during the creation of the VM'.

Technically its true but nothing prevents us from doing this operation at the end of the script, just before starting (or not) the vm.

I've implemented a PoC of what I had in mind when creating that issue :

bash -c "$(wget -qLO - https://github.com/devexa/Proxmox/raw/main/vm/haos-vm.sh)"

Here are the changes

I just tested it several times with different cases and it seems to do the intended job. The size seems correct on both proxmox and HA. Did I miss something ?

Thanks a lot @tteck and @Mellowlynx for your time ! Special thanks @tteck for your incredible work !

tteck commented 5 days ago

Yes ! But I dont really agree with the second part of it : 'its size cannot be changed during the creation of the VM'.

Whether you agree or not, I really don't care.

Technically its true but nothing prevents us from doing this operation at the end of the script, just before starting (or not) the vm.

When /if the time comes to increase storage, it's easily done via the UI.

Screenshot 2024-10-15 10 16 40 AM

I've implemented a PoC of what I had in mind when creating that issue :

There is no issue. The script executes as intended.

devexa commented 4 days ago

Whether you agree or not, I really don't care.

No need to be agressive :) ! I did not mean anything bad ! When I initially opened the issue I thought that this 'feature' was missing because of technical reasons. So I tried to understand what were they. First @Mellowlynx said that it was not possible to implement (at least thats what I understanded) and then you reacted with a ( :thumbsdown: ) to my comment. So, just out of curiosity I took some minutes to see whats the exact issue you were referring to if I implemented what you reacted to with a ( :thumbsdown: ) . Thats how came my PoC implementation and also because I thought I'd misspoken in English and that there's no better way to communicate than our universal language, code! Thats it ! :)

Now, I think I understand that its more of a choice than a technical constraint. And I respect it ! :blush:

When /if the time comes to increase storage, it's easily done via the UI.

From my understanding, the advanced part of your script includes some really nice props(Auto generated MAC addr, vLAN Tag ...) that can all be changed from the UI. But having them directly on the script on the initial setup was a really nice touch ! So thats why the missing 'custom storage size' section was non logical to me. But once again, I respect your choice. I'm just trying to clarify any possible misunderstanding !

Please note that english is not my main nor my second language. So please, forgive any clumsiness from my side !

There is no issue. The script executes as intended.

Thank you so much for taking the time to test it !

Once again, I am really admirative and grateful for your incredible work and effort. This comment is just for clarification ! Thanks again for everything and sorry for any inconvenience !