Hi,
Anyone else using vmbuilder with Ubuntu's 10.x Lucid Lynx (Alpha3, I
know) and cursing the change in options that just happened recently?
I've been playing around building VMs (based on Karmic) and tossing
them away since it was so quick. Now that I've upgrade to a newer
version of Lucid, it's all busted.
Sigh...
This would be a good talk too, about building and using VMs.
Here's the script I whipped up to help automate things, which is now
busted. Sigh... I realize I need to just look in the docs, but they
a) suck and b) aren't easily found. Nor is any list of changes in the
options listed nicely either. Grrr!!!!
THanks,
John
#!/bin/sh
# My own script for building and starting VMs more easily, based on
# the instructions given at:
#
# http://www.howtoforge.com/virtualization-with-kvm-on-ubuntu-9.10
#
# Version 0.1 - 12/29/2009
#
if [ $# -ne 3 ]; then
echo "Usage: $0 hostname ip username"
echo " IP is last octet of the 192.168.1/24 subnet"
echo
exit
fi
euid=`id -u`
if [ $euid -ne 0 ]; then
echo "Error! Script must run with root privs. Try sudo $0 ...."
echo
exit
fi
hostname=$1
ip=$2
username=$3
vmbase="/var/vm"
subnet="192.168.1"
suite="karmic"
bridge="br0"
mem=256
mirror="http://192.168.1.3:9999/ubuntu"
# LVM stuff
volgroup="virtmachs"
#---------------------------------------------------------------------
# Make the directory where we store the VM config
#---------------------------------------------------------------------
if [ -d ${vmbase}/${hostname} ]; then
/bin/rm -rf ${vmbase}/${hostname}
fi
mkdir -p ${vmbase}/${hostname}
cd ${vmbase}/${hostname}
#---------------------------------------------------------------------
# Copy over the template, but use the fixed one instead in vm0
#---------------------------------------------------------------------
mkdir -p ${vmbase}/${hostname}/mytemplates/libvirt
cp ${vmbase}/vm0/mytemplates/libvirt/* ${vmbase}/${hostname}/mytemplates/libvirt/
#---------------------------------------------------------------------
# Setup partitions file
#---------------------------------------------------------------------
cat >vmbuilder.partition <
participants (1)
-
John Stoffel