#!/bin/sh
#
# Set defaults for a (hopefully halted) Virt.
# Usage: defaults.sh virtname|UUID
#
# $Id$
VIRT_NAME="$1"
VBM="VBoxManage -q"
# Try to minimize BIOS adverts
$VBM modifyvm "$VIRT_NAME" \
--bioslogodisplaytime 1 \
--bioslogofadein off \
--bioslogofadeout off \
--rtcuseutc on
# Setup NIC2 for virt2virt communication (NIC1 is NAT+DHCP by default)
$VBM modifyvm "$VIRT_NAME" \
--nic2 hostonly \
--hostonlyadapter2 vboxnet0 \
--cableconnected2 on
# Try to avoid virt halt on CD-ROM/floppy failures (UserManual section
# 9.6.2 vb 3.2.0)
$VBM setextradata "$VIRT_NAME" \
'VBoxInternal/Devices/piix3ide/0/LUN#2/Config/AttachFailError' 0
$VBM setextradata "$VIRT_NAME" \
'VBoxInternal/Devices/i82078/0/LUN#0/Config/AttachFailError' 0