Skip to content

Commit

Permalink
Cleanup EOLed Fedora, update to latest stable (F23)
Browse files Browse the repository at this point in the history
  • Loading branch information
kashyapc committed Feb 16, 2016
1 parent 52232bd commit 3281f10
Showing 1 changed file with 20 additions and 19 deletions.
39 changes: 20 additions & 19 deletions create-guest-qcow2.bash
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/bash
#
# Copyright (C) 2015 Red Hat Inc.
# Author: <[email protected]>
# Further contributions: <[email protected]>
# Copyright (C) 2016 Red Hat Inc.
# Author: Kashyap Chamarthy <[email protected]>
# Further contributions: Prasad J. Pandit <[email protected]>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -32,15 +32,15 @@

#set -x

VERSION="0.2"
VERSION="0.3"
prog=`basename $0`

fstype="ext4"
IMAGE_HOME="/var/lib/libvirt/images"

burl="http://dl.fedoraproject.org/pub"
location1="$burl/fedora/linux/releases/21/Server/ARCH/os"
location2="$burl/fedora/linux/releases/22/Server/ARCH/os"
location1="$burl/fedora/linux/releases/22/Server/ARCH/os"
location2="$burl/fedora/linux/releases/23/Server/ARCH/os"
location3="$burl/fedora/linux/development/rawhide/ARCH/os"

# Create a minimal kickstart file and return the temporary file name.
Expand Down Expand Up @@ -123,21 +123,21 @@ usage ()
{
echo -e "Usage: $prog [OPTIONS] <vm-name> <distro> <arch> [dest-dir]\n"

echo "distro : f21, f22, rawhide,
echo "distro : f22, f23, rawhide,
[Or, path to HTTP URL, like]: http://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/x86_64/os/"
echo "arch : x86_64, i386"
echo "dest-dir : /path/dest-dir [Optional: Alternate directory to store images,
assuming QEMU has access to it, i.e. 'chmod go+rx /path/dest-dir']
EXAMPLES:
# Create a Fedora 22 VM:
./`basename $0` vm1 f22 x86_64
# Create a Fedora-23 VM:
./`basename $0` vm1 f23 x86_64
# Create a Fedora-22 VM, and store the VM disk image in the said dir:
./`basename $0` vm2 f22 x86_64 /export/vmimages
# Create a Fedora-23 VM, and store the VM disk image in the said dir:
./`basename $0` vm2 f23 x86_64 /export/vmimages
# Create a Fedora-22 VM, with the specified Fedora tree URL:
# Create a Fedora-23 VM, with the specified Fedora tree URL:
./`basename $0` vm3 http://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/x86_64/os/ x86_64"
}

Expand All @@ -150,7 +150,8 @@ printh ()
printf "$format" " -f <FSTYPE>" "specify file system type, default: ext4"
printf "$format" " -h" "display this help"
printf "$format" " -v" "display version information"
printf "\nReport bugs to Kashyap <[email protected]>\n"
printf "\nReport bugs here:
https://github.com/kashyapc/virt-scripts/issues\n"
}

check_options ()
Expand Down Expand Up @@ -216,25 +217,25 @@ check_options ()

locn=""
case "$dist" in
f21)
dist="fedora21"
f22)
dist="fedora22"
locn=${location1/ARCH/$arch}
;;

f22)
dist="fedora21"
f23)
dist="fedora23"
locn=${location2/ARCH/$arch}
;;

rawhide)
dist="fedora21"
dist="fedora23"
locn=${location3/ARCH/$arch}
;;

http*)
locn=${dist/ARCH/$arch}
echo "RAW version: $locn"
dist="fedora21"
dist="fedora23"
;;

*)
Expand Down

0 comments on commit 3281f10

Please sign in to comment.