Merge 3550dbaa87
into f6816052bb
This commit is contained in:
commit
2ad1fe151b
13
README.md
13
README.md
@ -1,9 +1,20 @@
|
||||
# New Proxmox VM with Home Assistant
|
||||
|
||||
|
||||
# Support Promox 7
|
||||
|
||||
- remove susbcription and add non-susbcription
|
||||
- add zip support
|
||||
|
||||
# Telegram channel
|
||||
- https://t.me/proxmoxha
|
||||
|
||||
|
||||
forked from whiskerz007/proxmox_hassos_install
|
||||
This script will create a new Proxmox VM with the latest version of Home Assistant. To create a new VM, run the following in a SSH session or the console from Proxmox interface
|
||||
|
||||
```
|
||||
bash -c "$(wget -qLO - https://github.com/whiskerz007/proxmox_hassos_install/raw/master/install.sh)"
|
||||
bash -c "$(wget -qLO - https://raw.githubusercontent.com/patriciocl/proxmox_hassos_install/master/install.sh)"
|
||||
```
|
||||
|
||||
After script completes, click on the new VM (_the script will tell you the ID_), click on the `Hardware` tab for the VM and change the `Memory` and `Processors` settings to what you desire. The `Hard Disk` can be expanded by clicking on it, then click on the `Resize disk` button above (_Note: additional steps must be taken for storage to take effect in the VM after the first boot_). The network MAC address can be changed by selecting `Network Device` and clicking `Edit` above. Once all changes have been made, click `Start` above.
|
||||
|
27
install.sh
27
install.sh
@ -1,5 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
|
||||
|
||||
# Setup script environment
|
||||
set -o errexit #Exit immediately if a pipeline returns a non-zero status
|
||||
set -o errtrace #Trap ERR from shell functions, command substitutions, and commands from subshell
|
||||
@ -10,6 +12,15 @@ alias die='EXIT=$? LINE=$LINENO error_exit'
|
||||
trap die ERR
|
||||
trap cleanup EXIT
|
||||
|
||||
#remove susbcription
|
||||
rm -rf /etc/apt/sources.list.d/pve-enterprise.list
|
||||
#add pve-no
|
||||
echo "deb http://download.proxmox.com/debian/pve bullseye pve-no-subscription" > /etc/apt/sources.list.d/pve-no-subscription.list
|
||||
apt-get update
|
||||
apt-get install -y zip unzip parted util-linux
|
||||
|
||||
|
||||
|
||||
function error_exit() {
|
||||
trap - ERR
|
||||
local DEFAULT='Unknown failure occured.'
|
||||
@ -113,16 +124,22 @@ msg "Extracting disk image..."
|
||||
case $FILE in
|
||||
*"gz") gunzip -f $FILE;;
|
||||
*"xz") xz -d $FILE;;
|
||||
*"zip") unzip -q $FILE;;
|
||||
*) die "Unable to handle file extension '${FILE##*.}'.";;
|
||||
esac
|
||||
|
||||
# Create variables for container disk
|
||||
STORAGE_TYPE=$(pvesm status -storage $STORAGE | awk 'NR>1 {print $2}')
|
||||
if [ "$STORAGE_TYPE" = "dir" ]; then
|
||||
DISK_EXT=".qcow2"
|
||||
DISK_REF="$VMID/"
|
||||
IMPORT_OPT="-format qcow2"
|
||||
fi
|
||||
msg "Extracting disk image..."
|
||||
case $STORAGE_TYPE in
|
||||
nfs|dir)
|
||||
DISK_EXT=".qcow2"
|
||||
DISK_REF="$VMID/"
|
||||
IMPORT_OPT="-format qcow2"
|
||||
;;
|
||||
*) echo "next"
|
||||
;;
|
||||
esac
|
||||
for i in {0,1}; do
|
||||
disk="DISK$i"
|
||||
eval DISK${i}=vm-${VMID}-disk-${i}${DISK_EXT:-}
|
||||
|
Loading…
Reference in New Issue
Block a user