Skip to content

Commit

Permalink
add -D, increase default disk size, improve help
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Lange committed Oct 30, 2015
1 parent e74980c commit 3f6bc60
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions dev-utils/fai-kvm
Expand Up @@ -12,7 +12,7 @@ fix="-k en-us -cpu host -global isa-fdc.driveA= " # if loading cirrusfb (via pc

vga="-vga std"
user=1
size=5 # default size of the disk image
size=10 # default size of the disk image
ram=2000
disks=1
cdimage=/files/scratch/fai-cd.iso # default name for CD image
Expand Down Expand Up @@ -46,24 +46,27 @@ usage() {

cat <<EOF
fai-kvm [options] pxe # start a host booting with PXE from NIC
fai-kvm [options] pxe # start a host booting using PXE from NIC
fai-kvm [options] cd [imagename] # start a host booting from a ISO image
-n create a new empty disk image, which is used as a local disk
-N recreate a new empty disk image, even if one already exists
-s <size> size of the local disk (GB, defaults to ${size}GB)
-d <num> number of local disks (default is one)
-m <mem> RAM size (MB, defaults to ${ram}MB)
-u <num> user id. This will become the tap device number and a part of the MAC address
and part of the disk files names. Each VM must have a unique number.
-s <size> size of the local disk in GB (default is ${size}GB)
-d <num> number of local disks (default is 1)
-D <path> directory, where the disk image files are created (default: $diskdir)
-m <mem> RAM size inMB (defaults is ${ram}MB)
-u <num> user number. This will become part of the MAC address of the interface
of the VM and is the number of the tap device number. It is also used
for the file name of the disk files. Each VM must have a unique number.
If you have created 9 tap devies you can use the numbers 1 to 9.
-V do not use vga std with Bochs extensions, use the kvm default
-U Use kvm user networking instead of tap devices
EOF
exit 0
}
# - - - - - - - - - - - - - - - - - - - - - - - - -

while getopts "UhnNu:s:m:d:V" opt ; do
while getopts "UhnNu:s:m:d:VD:" opt ; do
case "$opt" in
n) newdisk=1 ;;
N) newdisk=2 ;;
Expand All @@ -72,6 +75,7 @@ while getopts "UhnNu:s:m:d:V" opt ; do
m) ram=$OPTARG ;;
s) size=$OPTARG ;;
d) disks=$OPTARG ;;
D) diskdir=$OPTARG ;;
h) usage;;
V) vga="";;
?) die 1 "Unknown option";;
Expand Down

0 comments on commit 3f6bc60

Please sign in to comment.