3
# this generates an XML template for libvirt domain specification,
4
# which is tailored to an instance by the node controller
10
use English; # for descriptive predefined var names
11
use Data::Dumper; # for debugging: print Dumper($var)
14
$OUTPUT_AUTOFLUSH = 1; # no output buffering
17
our $use_ephemeral = 0;
19
# deal with command-line parameters
20
GetOptions('ramdisk' => sub { $use_ramdisk = 1; },
21
'ephemeral' => sub { $use_ephemeral = 1; }
29
<kernel>BASEPATH/kernel</kernel>
33
print " <initrd>BASEPATH/ramdisk</initrd>\n";
37
<cmdline>root=/dev/sda1 console=ttyS0</cmdline>
42
<memory>MEMORY</memory>
45
<emulator>/usr/bin/kvm</emulator>
47
<source file='BASEPATH/root'/>
52
if ( $use_ephemeral ) {
55
<source file='BASEPATH/ephemeral'/>
62
<interface type='bridge'>
63
<source bridge='BRIDGEDEV'/>
64
<mac address='PRIVMACADDR'/>
67
<source path='BASEPATH/console.log'/>