Faster shopfloor-setup sync, prompt spacing, XP-era test client
- Deploy shopfloor-setup with rsync instead of the copy module: the ~4 GB tree took about 4 minutes on every re-run because copy checksums each file. rsync transfers only changes; changed only when it did. - iPXE drops a trailing space, so 'Machine number:' ran into the typed digits. The space now comes from a hex 20 setting. - tests/vm: pxetest-xp is a permanent client (SeaBIOS, qemu32 32-bit CPU, rtl8139, 1 GiB, IDE disk) for the i686 Clonezilla path; start.sh xp. Only one client may run at a time across all three.
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
#!/bin/bash
|
||||
# Start pxetest VMs. Idempotent (a running VM is left alone).
|
||||
# Usage: tests/vm/start.sh [server|client|client2|all] (default: server)
|
||||
# Usage: tests/vm/start.sh [server|client|client2|xp|all] (default: server)
|
||||
# client = Secure Boot client (virtio NIC: reaches the iPXE menu and WinPE)
|
||||
# client2 = Secure Boot OFF client, e1000e NIC (WinPE gets a network)
|
||||
# xp = XP/Win7-era PC: legacy BIOS, 32-bit CPU (i686 Clonezilla)
|
||||
# Start a client only once the server's playbook has finished, and only one
|
||||
# client at a time: server + one client = 6 GiB.
|
||||
source "$(dirname "$0")/common.sh"
|
||||
@@ -12,8 +13,9 @@ case "$which" in
|
||||
server) vms=("$SERVER_VM") ;;
|
||||
client) vms=("$CLIENT_VM") ;;
|
||||
client2|nosb) vms=("$CLIENT2_VM") ;;
|
||||
xp|client3) vms=("$CLIENT3_VM") ;;
|
||||
all) vms=("$SERVER_VM" "$CLIENT_VM") ;;
|
||||
*) die "usage: $0 [server|client|client2|all]" ;;
|
||||
*) die "usage: $0 [server|client|client2|xp|all]" ;;
|
||||
esac
|
||||
|
||||
net_exists "$IMAGING_NET" || die "run create.sh first"
|
||||
@@ -23,13 +25,13 @@ assert_imaging_isolated
|
||||
for vm in "${vms[@]}"; do
|
||||
dom_exists "$vm" || die "$vm not defined; run create.sh"
|
||||
# RAM: one client at a time.
|
||||
case "$vm" in
|
||||
"$CLIENT_VM") other="$CLIENT2_VM" ;;
|
||||
"$CLIENT2_VM") other="$CLIENT_VM" ;;
|
||||
*) other="" ;;
|
||||
esac
|
||||
if [ -n "$other" ] && [ "$(dom_state "$other")" = "running" ]; then
|
||||
die "$other is running; stop it first (tests/vm/stop.sh) to stay within RAM"
|
||||
if [ "$vm" != "$SERVER_VM" ]; then
|
||||
for other in "${ALL_CLIENTS[@]}"; do
|
||||
[ "$other" != "$vm" ] || continue
|
||||
if [ "$(dom_state "$other")" = "running" ]; then
|
||||
die "$other is running; stop it first (tests/vm/stop.sh) to stay within RAM"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
if [ "$vm" = "$SERVER_VM" ]; then
|
||||
vol_exists "$USB_VOL" || die "no $USB_VOL; run build-image.sh"
|
||||
|
||||
Reference in New Issue
Block a user