-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
10 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -102,15 +102,21 @@ EOF | |
|
||
if [ "$CLOUD" == "opennebula" ] ; then | ||
net_config="$opennebula_specific" | ||
elif [ "$CLOUD" == "ec2" ] ; then | ||
elif [ "$CLOUD" == "ec2" ] || [ "$CLOUD" == "openstack" ] ; then | ||
net_config="$ec2_specific" | ||
else | ||
cecho 'Something went wrong. "CLOUD" shell variable is not properly defined.'; | ||
exit 1; | ||
fi | ||
|
||
#OpenStack defaults to the use of the virtio disk driver | ||
BLOCK_DEV=/dev/sda1 | ||
if [ "$CLOUD" == "openstack" ] ; then | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
anaion
Author
Contributor
|
||
BLOCK_DEV=/dev/vda1 | ||
fi | ||
|
||
cecho "Writing fstab" | ||
echo "/dev/sda1 / ext3 defaults 0 1" > $ROOT_DIR/etc/fstab | ||
echo "$BLOCK_DEV / ext3 defaults 0 1" > $ROOT_DIR/etc/fstab | ||
cecho "Writing /etc/network/interfaces" | ||
cat <<EOF > $ROOT_DIR/etc/network/interfaces | ||
auto lo | ||
|
@@ -167,7 +173,7 @@ set timeout=0 | |
menuentry '$(basename $VMLINUZ)' { | ||
insmod ext2 | ||
set root='(hd0,1)' | ||
linux $VMLINUZ root=/dev/sda1 | ||
linux $VMLINUZ root=$BLOCK_DEV | ||
initrd $INITRD | ||
} | ||
EOF | ||
|
this condition should check for the hypervisor to be KVM. If OpenStack on Xen also uses virtio, then the condition should check whether it is KVM OR Xen.