mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2025-06-27 20:06:52 +00:00
Update CHANGELOG.md
This commit is contained in:
parent
00cb951f42
commit
58d137c60b
34
CHANGELOG.md
34
CHANGELOG.md
@ -1,3 +1,37 @@
|
||||
## 2025-03-24
|
||||
### Improved
|
||||
- Improved the logic for detecting physical disks in the **Disk Passthrough to a VM** script. Previously, the script would display disks that were already mounted in the system on some setups. This update ensures that only unmounted disks are shown in Proxmox, preventing confusion and potential conflicts.
|
||||
|
||||
```bash
|
||||
get_disk_info() {
|
||||
local disk=$1
|
||||
MODEL=$(lsblk -dn -o MODEL "$disk" | xargs)
|
||||
SIZE=$(lsblk -dn -o SIZE "$disk" | xargs)
|
||||
echo "$MODEL" "$SIZE"
|
||||
}
|
||||
|
||||
USED_DISKS=$(lsblk -n -o PKNAME,TYPE | grep 'lvm' | awk '{print "/dev/" $1}')
|
||||
MOUNTED_DISKS=$(mount | grep -o '/dev/[a-z]*' | sort | uniq)
|
||||
FREE_DISKS=()
|
||||
|
||||
while read -r DISK; do
|
||||
if ! echo "$USED_DISKS" | grep -q "$DISK" && \
|
||||
! echo "$MOUNTED_DISKS" | grep -q "$DISK" && \
|
||||
! qm config "$VMID" | grep -q "$DISK"; then
|
||||
|
||||
INFO=($(get_disk_info "$DISK"))
|
||||
MODEL="${INFO[@]::${#INFO[@]}-1}"
|
||||
SIZE="${INFO[-1]}"
|
||||
|
||||
DESCRIPTION=$(printf "%-40s %10s" "$MODEL" "$SIZE")
|
||||
|
||||
FREE_DISKS+=("$DISK" "$DESCRIPTION" "OFF")
|
||||
fi
|
||||
done < <(lsblk -dn -e 7,11 -o PATH)
|
||||
```
|
||||
|
||||
- This improvement ensures that disks already mounted or assigned to other VMs are excluded from the list of available disks, providing a more accurate and reliable selection process.
|
||||
|
||||
## [1.1.1] - 2025-03-21
|
||||
### Improved
|
||||
- Improved the logic of the post-install script to prevent overwriting or adding duplicate settings if similar settings are already configured by the user.
|
||||
|
Loading…
x
Reference in New Issue
Block a user