mirror of https://github.com/tteck/Proxmox.git
Compare commits
No commits in common. "b1451e795e1f0675fcd6c0d12cc216939edab9e0" and "2ff5df2ea8e84ef636d23c824fcb8a977043d83f" have entirely different histories.
b1451e795e
...
2ff5df2ea8
|
@ -2,19 +2,12 @@
|
||||||
# Change Log
|
# Change Log
|
||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
|
|
||||||
## 2023-04-02
|
|
||||||
|
|
||||||
### Changed
|
|
||||||
|
|
||||||
- **Home Assistant OS VM**
|
|
||||||
- Include a choice within the "Advanced" settings to configure the CPU model between kvm64 (default) or host.
|
|
||||||
|
|
||||||
## 2023-03-31
|
## 2023-03-31
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
- **Home Assistant OS VM**
|
- **Home Assistant OS VM**
|
||||||
- Include a choice within the "Advanced" settings to configure the disk cache between none (default) or Write Through.
|
- Include a choice within the "Advanced" settings to configure the disk cache.
|
||||||
|
|
||||||
## 2023-03-27
|
## 2023-03-27
|
||||||
|
|
||||||
|
|
|
@ -116,7 +116,7 @@ function ssh_check() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function exit-script() {
|
exit-script() {
|
||||||
clear
|
clear
|
||||||
echo -e "⚠ User exited script \n"
|
echo -e "⚠ User exited script \n"
|
||||||
exit
|
exit
|
||||||
|
@ -129,7 +129,6 @@ function default_settings() {
|
||||||
MACHINE=""
|
MACHINE=""
|
||||||
DISK_CACHE=""
|
DISK_CACHE=""
|
||||||
HN="haos$stable"
|
HN="haos$stable"
|
||||||
CPU_TYPE=""
|
|
||||||
CORE_COUNT="2"
|
CORE_COUNT="2"
|
||||||
RAM_SIZE="4096"
|
RAM_SIZE="4096"
|
||||||
BRG="vmbr0"
|
BRG="vmbr0"
|
||||||
|
@ -142,7 +141,6 @@ function default_settings() {
|
||||||
echo -e "${DGN}Using Machine Type: ${BGN}i440fx${CL}"
|
echo -e "${DGN}Using Machine Type: ${BGN}i440fx${CL}"
|
||||||
echo -e "${DGN}Using Disk Cache: ${BGN}Default${CL}"
|
echo -e "${DGN}Using Disk Cache: ${BGN}Default${CL}"
|
||||||
echo -e "${DGN}Using Hostname: ${BGN}${HN}${CL}"
|
echo -e "${DGN}Using Hostname: ${BGN}${HN}${CL}"
|
||||||
echo -e "${DGN}Using CPU Model: ${BGN}Default${CL}"
|
|
||||||
echo -e "${DGN}Allocated Cores: ${BGN}${CORE_COUNT}${CL}"
|
echo -e "${DGN}Allocated Cores: ${BGN}${CORE_COUNT}${CL}"
|
||||||
echo -e "${DGN}Allocated RAM: ${BGN}${RAM_SIZE}${CL}"
|
echo -e "${DGN}Allocated RAM: ${BGN}${RAM_SIZE}${CL}"
|
||||||
echo -e "${DGN}Using Bridge: ${BGN}${BRG}${CL}"
|
echo -e "${DGN}Using Bridge: ${BGN}${BRG}${CL}"
|
||||||
|
@ -152,7 +150,6 @@ function default_settings() {
|
||||||
echo -e "${DGN}Start VM when completed: ${BGN}yes${CL}"
|
echo -e "${DGN}Start VM when completed: ${BGN}yes${CL}"
|
||||||
echo -e "${BL}Creating a HAOS VM using the above default settings${CL}"
|
echo -e "${BL}Creating a HAOS VM using the above default settings${CL}"
|
||||||
}
|
}
|
||||||
|
|
||||||
function advanced_settings() {
|
function advanced_settings() {
|
||||||
if BRANCH=$(whiptail --title "HAOS VERSION" --radiolist "Choose Version" --cancel-button Exit-Script 10 58 3 \
|
if BRANCH=$(whiptail --title "HAOS VERSION" --radiolist "Choose Version" --cancel-button Exit-Script 10 58 3 \
|
||||||
"$stable" "Stable " ON \
|
"$stable" "Stable " ON \
|
||||||
|
@ -228,21 +225,6 @@ function advanced_settings() {
|
||||||
exit-script
|
exit-script
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if CPU_TYPE1=$(whiptail --title "CPU MODEL" --radiolist "Choose" --cancel-button Exit-Script 10 58 2 \
|
|
||||||
"0" "KVM64 (Default)" ON \
|
|
||||||
"1" "Host" OFF \
|
|
||||||
3>&1 1>&2 2>&3); then
|
|
||||||
if [ $CPU_TYPE1 = "1" ]; then
|
|
||||||
echo -e "${DGN}Using CPU Model: ${BGN}Host${CL}"
|
|
||||||
CPU_TYPE=" -cpu host"
|
|
||||||
else
|
|
||||||
echo -e "${DGN}Using CPU Model: ${BGN}Default${CL}"
|
|
||||||
CPU_TYPE=""
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
exit-script
|
|
||||||
fi
|
|
||||||
|
|
||||||
if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 2 --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
|
if CORE_COUNT=$(whiptail --inputbox "Allocate CPU Cores" 8 58 2 --title "CORE COUNT" --cancel-button Exit-Script 3>&1 1>&2 2>&3); then
|
||||||
if [ -z $CORE_COUNT ]; then
|
if [ -z $CORE_COUNT ]; then
|
||||||
CORE_COUNT="2"
|
CORE_COUNT="2"
|
||||||
|
@ -347,7 +329,6 @@ arch_check
|
||||||
pve_check
|
pve_check
|
||||||
ssh_check
|
ssh_check
|
||||||
start_script
|
start_script
|
||||||
|
|
||||||
msg_info "Validating Storage"
|
msg_info "Validating Storage"
|
||||||
while read -r line; do
|
while read -r line; do
|
||||||
TAG=$(echo $line | awk '{print $1}')
|
TAG=$(echo $line | awk '{print $1}')
|
||||||
|
@ -413,7 +394,7 @@ for i in {0,1}; do
|
||||||
done
|
done
|
||||||
msg_ok "Extracted KVM Disk Image"
|
msg_ok "Extracted KVM Disk Image"
|
||||||
msg_info "Creating HAOS VM"
|
msg_info "Creating HAOS VM"
|
||||||
qm create $VMID -agent 1${MACHINE} -tablet 0 -localtime 1 -bios ovmf${CPU_TYPE} -cores $CORE_COUNT -memory $RAM_SIZE \
|
qm create $VMID -agent 1${MACHINE} -tablet 0 -localtime 1 -bios ovmf -cores $CORE_COUNT -memory $RAM_SIZE \
|
||||||
-name $HN -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN$MTU -onboot 1 -ostype l26 -scsihw virtio-scsi-pci
|
-name $HN -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN$MTU -onboot 1 -ostype l26 -scsihw virtio-scsi-pci
|
||||||
pvesm alloc $STORAGE $VMID $DISK0 4M 1>&/dev/null
|
pvesm alloc $STORAGE $VMID $DISK0 4M 1>&/dev/null
|
||||||
qm importdisk $VMID ${FILE%.*} $STORAGE ${DISK_IMPORT:-} 1>&/dev/null
|
qm importdisk $VMID ${FILE%.*} $STORAGE ${DISK_IMPORT:-} 1>&/dev/null
|
||||||
|
|
Loading…
Reference in New Issue