Index: trunk/scripts/invirt-admin/invirt-admin
===================================================================
--- trunk/scripts/invirt-admin/invirt-admin	(revision 2237)
+++ trunk/scripts/invirt-admin/invirt-admin	(revision 2854)
@@ -8,4 +8,6 @@
     echo "  required options: --name, --fs-size, --swap-size, --memory,"
     echo "    --hostname, --ip, --mac, --arch, --dist, --mirror"
+    echo
+    echo "  optional options: --netmask, --gateway.  Defaults will be pulled from invirt-getconf"
     echo
     echo "  fs-size, swap-size, memory in MiB"
@@ -19,5 +21,5 @@
 shift
 
-vg=xenvg
+vg=$(invirt-getconf xen.lvm.vg)
 while [ $# -gt 0 ]; do
     case "$1" in
@@ -33,4 +35,6 @@
 	--dist)      dist=$2;      shift 2;;
 	--mirror)    mirror=$2;    shift 2;;
+	--netmask)   netmask=$2;   shift 2;;
+	--gateway)   gateway=$2;   shift 2;;
         *)
             echo "Unknown option: $1"
@@ -52,4 +56,5 @@
 ARCH=$arch DIST=$dist MIRROR=$mirror \
 HOSTNAME=$hostname IP=$ip \
+NETMASK=$netmask GATEWAY=$gateway \
  invirt-create-image 
 
