초기 구현: TailRescue Headscale ISO 프로젝트 정리
This commit is contained in:
28
scripts/test-proxmox-vm.sh
Executable file
28
scripts/test-proxmox-vm.sh
Executable file
@@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
VMID=${VMID:-990}
|
||||
ISO=${ISO:-local:iso/tailrescue-headscale-test.iso}
|
||||
STORAGE=${STORAGE:-local-lvm}
|
||||
BRIDGE=${BRIDGE:-vmbr0}
|
||||
HEADSCALE_HOST=${HEADSCALE_HOST:-root@192.168.0.100}
|
||||
HEADSCALE_CONTAINER=${HEADSCALE_CONTAINER:-headscale}
|
||||
|
||||
qm stop "$VMID" --skiplock 1 || true
|
||||
qm destroy "$VMID" --purge 1 --destroy-unreferenced-disks 1 || true
|
||||
qm create "$VMID" \
|
||||
--name tailrescue-test \
|
||||
--memory 2048 \
|
||||
--cores 2 \
|
||||
--net0 virtio,bridge="$BRIDGE" \
|
||||
--ostype l26 \
|
||||
--scsihw virtio-scsi-single \
|
||||
--vga std \
|
||||
--boot order=ide2 \
|
||||
--ide2 "$ISO",media=cdrom \
|
||||
--agent enabled=0
|
||||
qm set "$VMID" --scsi0 "$STORAGE":8
|
||||
qm start "$VMID"
|
||||
sleep 3
|
||||
qm sendkey "$VMID" ret || true
|
||||
sleep 75
|
||||
ssh "$HEADSCALE_HOST" "docker exec $HEADSCALE_CONTAINER headscale nodes list | grep -i tailrescue || true"
|
||||
Reference in New Issue
Block a user