photoncloud-monorepo/baremetal/vm-cluster/launch-node02-vde.sh
centra 4bd9b4ef0b feat(t052): QEMU cluster comprehensive feature testing
T052 verifies all 8 PlasmaCloud services on the 3-node QEMU cluster:
- LightningSTOR: S3 API (SigV4 auth)
- FlashDNS: gRPC + DNS resolver
- NightLight: Prometheus-compatible metrics
- FiberLB: Load balancer gRPC API
- PrismNET: Virtual networking
- CreditService: Quota REST API
- K8sHost: Kubernetes API server
- PlasmaVMC: VM controller

All services verified running and responding.

Also adds VDE launch and recovery scripts for VM cluster management.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-19 17:37:33 +09:00

45 lines
1.2 KiB
Bash
Executable file

#!/usr/bin/env bash
set -euo pipefail
# PlasmaCloud VM Cluster - Node 02 (VDE Networking)
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
DISK="${SCRIPT_DIR}/node02.qcow2"
MAC_MCAST="52:54:00:12:34:02"
MAC_SLIRP="52:54:00:aa:bb:02"
VDE_SOCK="/tmp/vde.sock"
SSH_PORT=2202
VNC_DISPLAY=":2"
SERIAL_LOG="${SCRIPT_DIR}/node02-serial.log"
OVMF_CODE="/run/libvirt/nix-ovmf/edk2-x86_64-code.fd"
EFIVARS="${SCRIPT_DIR}/node02-efivars.fd"
if [ ! -f "$DISK" ]; then
echo "ERROR: Disk not found at $DISK"
exit 1
fi
if [ ! -S "${VDE_SOCK}/ctl" ]; then
echo "ERROR: VDE switch not running at ${VDE_SOCK}"
exit 1
fi
echo "Launching node02 with VDE networking..."
exec qemu-system-x86_64 \
-name node02 \
-machine type=q35,accel=kvm \
-cpu host \
-smp 8 \
-m 16G \
-drive if=pflash,format=raw,readonly=on,file="${OVMF_CODE}" \
-drive if=pflash,format=raw,file="${EFIVARS}" \
-drive file="${DISK}",if=virtio,format=qcow2 \
-boot c \
-netdev vde,sock="${VDE_SOCK}",id=vde0 \
-device virtio-net-pci,netdev=vde0,mac="${MAC_MCAST}" \
-netdev user,id=user0,hostfwd=tcp::${SSH_PORT}-:22 \
-device virtio-net-pci,netdev=user0,mac="${MAC_SLIRP}" \
-vnc "${VNC_DISPLAY}" \
-serial "file:${SERIAL_LOG}" \
-daemonize