diff --git a/bin/xen-create-image b/bin/xen-create-image index 920c360..19d7332 100755 --- a/bin/xen-create-image +++ b/bin/xen-create-image @@ -120,7 +120,9 @@ xen-create-image - Easily create new Xen instances with networking and OpenSSH. its /etc/fstab file either. - --ide Use IDE names for virtual devices (i.e. hda not sda) + --ide Use IDE names for virtual devices (i.e. hda not xvda) + + --scsi Use SCSI names for virtual devices (i.e. sda not xvda) Installation options: @@ -1436,6 +1438,7 @@ sub parseCommandLineArguments "cache=s", \$CONFIG{ 'cache' }, "config=s", \$CONFIG{ 'config' }, "ide", \$CONFIG{ 'ide' }, + "scsi", \$CONFIG{ 'scsi' }, "install=i", \$CONFIG{ 'install' }, "hooks=i", \$CONFIG{ 'hooks' }, "pygrub", \$CONFIG{ 'pygrub' }, diff --git a/bin/xt-create-xen-config b/bin/xt-create-xen-config index d655f12..8ae783c 100755 --- a/bin/xt-create-xen-config +++ b/bin/xt-create-xen-config @@ -350,11 +350,15 @@ sub createXenConfig # # The device we're using. # - my $device = 'sda'; + my $device = 'xvda'; if ( defined( $ENV{ 'ide' } ) ) { $device = 'hda'; } + elsif ( defined( $ENV{ 'scsi' } ) ) + { + $device = 'sda'; + } elsif ( defined( $ENV{ 'disk_device' } ) ) { $device = $ENV{ 'disk_device' }; diff --git a/debian/changelog b/debian/changelog index 2324f4f..d9a0c6c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,6 +7,7 @@ xen-tools (4.2~rc1-1) UNRELEASED; urgency=low - Supports for more recent versions of Fedora, Ubuntu and Debian (Closes: #499477) - Supports pygrub. (Added "Suggests: xen-utils" to debian/control) + - Uses hvc0 and xvda devices by default - Sets umask to 0077 before creating disk images (Closes: #548909) - Makes sure, MAKEDEV is found in either /dev/ or /sbin/ (Closes: #502798, #515228) diff --git a/hooks/centos-4/90-make-fstab b/hooks/centos-4/90-make-fstab index ea389e7..c6aa722 100755 --- a/hooks/centos-4/90-make-fstab +++ b/hooks/centos-4/90-make-fstab @@ -36,15 +36,19 @@ logMessage Filesystem options are ${options} # # Find the root device. # -# 1. default to sda. +# 1. default to xvda. # # 2. If --ide is specified use hda. # -# 3. Otherwise use a named $disk_device +# 3. If --scsi is specified use sda. # -device=sda +# 4. Otherwise use a named $disk_device +# +device=xvda if [ "${ide}" ]; then device=hda +elif [ "${scsi}" ]; then + device=sda else if [ ! -z "${disk_device}" ]; then device=`basename $disk_device` diff --git a/hooks/centos-5/90-make-fstab b/hooks/centos-5/90-make-fstab index 0c93a0b..38dc3bd 100755 --- a/hooks/centos-5/90-make-fstab +++ b/hooks/centos-5/90-make-fstab @@ -37,15 +37,19 @@ logMessage Filesystem options are ${options} # # Find the root device. # -# 1. default to sda. +# 1. default to xvda. # # 2. If --ide is specified use hda. # -# 3. Otherwise use a named $disk_device +# 3. If --scsi is specified use sda. # -device=sda +# 4. Otherwise use a named $disk_device +# +device=xvda if [ "${ide}" ]; then device=hda +elif [ "${scsi}" ]; then + device=sda else if [ ! -z "${disk_device}" ]; then device=`basename $disk_device` diff --git a/hooks/dapper/90-make-fstab b/hooks/dapper/90-make-fstab index 44bd268..36a2cf0 100755 --- a/hooks/dapper/90-make-fstab +++ b/hooks/dapper/90-make-fstab @@ -33,15 +33,19 @@ logMessage Script $0 starting # # Find the root device. # -# 1. default to sda. +# 1. default to xvda. # # 2. If --ide is specified use hda. # -# 3. Otherwise use a named $disk_device +# 3. If --scsi is specified use sda. # -device=sda +# 4. Otherwise use a named $disk_device +# +device=xvda if [ "${ide}" ]; then device=hda +elif [ "${scsi}" ]; then + device=sda else if [ ! -z "${disk_device}" ]; then device=`basename $disk_device` diff --git a/hooks/debian/90-make-fstab b/hooks/debian/90-make-fstab index b9bc7a2..94e6398 100755 --- a/hooks/debian/90-make-fstab +++ b/hooks/debian/90-make-fstab @@ -32,15 +32,19 @@ logMessage Script $0 starting # # Find the root device. # -# 1. default to sda. +# 1. default to xvda. # # 2. If --ide is specified use hda. # -# 3. Otherwise use a named $disk_device +# 3. If --scsi is specified use sda. # -device=sda +# 4. Otherwise use a named $disk_device +# +device=xvda if [ "${ide}" ]; then device=hda +elif [ "${scsi}" ]; then + device=sda else if [ ! -z "${disk_device}" ]; then device=`basename $disk_device` diff --git a/hooks/edgy/90-make-fstab b/hooks/edgy/90-make-fstab index 44bd268..36a2cf0 100755 --- a/hooks/edgy/90-make-fstab +++ b/hooks/edgy/90-make-fstab @@ -33,15 +33,19 @@ logMessage Script $0 starting # # Find the root device. # -# 1. default to sda. +# 1. default to xvda. # # 2. If --ide is specified use hda. # -# 3. Otherwise use a named $disk_device +# 3. If --scsi is specified use sda. # -device=sda +# 4. Otherwise use a named $disk_device +# +device=xvda if [ "${ide}" ]; then device=hda +elif [ "${scsi}" ]; then + device=sda else if [ ! -z "${disk_device}" ]; then device=`basename $disk_device` diff --git a/hooks/fedora-core-6/90-make-fstab b/hooks/fedora-core-6/90-make-fstab index ea389e7..c6aa722 100755 --- a/hooks/fedora-core-6/90-make-fstab +++ b/hooks/fedora-core-6/90-make-fstab @@ -36,15 +36,19 @@ logMessage Filesystem options are ${options} # # Find the root device. # -# 1. default to sda. +# 1. default to xvda. # # 2. If --ide is specified use hda. # -# 3. Otherwise use a named $disk_device +# 3. If --scsi is specified use sda. # -device=sda +# 4. Otherwise use a named $disk_device +# +device=xvda if [ "${ide}" ]; then device=hda +elif [ "${scsi}" ]; then + device=sda else if [ ! -z "${disk_device}" ]; then device=`basename $disk_device` diff --git a/hooks/gentoo/90-make-fstab b/hooks/gentoo/90-make-fstab index 9516f8d..61e5e02 100755 --- a/hooks/gentoo/90-make-fstab +++ b/hooks/gentoo/90-make-fstab @@ -33,15 +33,19 @@ logMessage Script $0 starting # # Find the root device. # -# 1. default to sda. +# 1. default to xvda. # # 2. If --ide is specified use hda. # -# 3. Otherwise use a named $disk_device +# 3. If --scsi is specified use sda. # -device=sda +# 4. Otherwise use a named $disk_device +# +device=xvda if [ "${ide}" ]; then device=hda +elif [ "${scsi}" ]; then + device=sda else if [ ! -z "${disk_device}" ]; then device=`basename $disk_device` diff --git a/hooks/intrepid/90-make-fstab b/hooks/intrepid/90-make-fstab index 44bd268..36a2cf0 100755 --- a/hooks/intrepid/90-make-fstab +++ b/hooks/intrepid/90-make-fstab @@ -33,15 +33,19 @@ logMessage Script $0 starting # # Find the root device. # -# 1. default to sda. +# 1. default to xvda. # # 2. If --ide is specified use hda. # -# 3. Otherwise use a named $disk_device +# 3. If --scsi is specified use sda. # -device=sda +# 4. Otherwise use a named $disk_device +# +device=xvda if [ "${ide}" ]; then device=hda +elif [ "${scsi}" ]; then + device=sda else if [ ! -z "${disk_device}" ]; then device=`basename $disk_device` diff --git a/hooks/karmic/90-make-fstab b/hooks/karmic/90-make-fstab index 44bd268..36a2cf0 100755 --- a/hooks/karmic/90-make-fstab +++ b/hooks/karmic/90-make-fstab @@ -33,15 +33,19 @@ logMessage Script $0 starting # # Find the root device. # -# 1. default to sda. +# 1. default to xvda. # # 2. If --ide is specified use hda. # -# 3. Otherwise use a named $disk_device +# 3. If --scsi is specified use sda. # -device=sda +# 4. Otherwise use a named $disk_device +# +device=xvda if [ "${ide}" ]; then device=hda +elif [ "${scsi}" ]; then + device=sda else if [ ! -z "${disk_device}" ]; then device=`basename $disk_device`