Support qemu as a compute flavor

This commit is contained in:
Adam Gandelman 2011-12-20 15:26:08 -08:00
parent 6250063490
commit 3574d712e7
2 changed files with 8 additions and 2 deletions

View File

@ -26,7 +26,7 @@ options:
virt-type:
default: kvm
type: string
description: "Virtualization flavor. Supported: kvm, xen, uml, lxc"
description: "Virtualization flavor. Supported: kvm, xen, uml, lxc. qemu"
# needed if using flatmanager
bridge-interface:

View File

@ -11,7 +11,7 @@ fi
function install_hook {
[[ -z $VIRT_TYPE ]] && VIRT_TYPE="kvm"
case $VIRT_TYPE in
"kvm") COMPUTE_PKG="nova-compute-kvm";;
"kvm"|"qemu") COMPUTE_PKG="nova-compute-kvm";;
"xen") COMPUTE_PKG="nova-compute-xen";;
"uml") COMPUTE_PKG="nova-compute-uml";;
"lxc") COMPUTE_PKG="nova-compute-lxc";;
@ -22,6 +22,12 @@ function install_hook {
apt-get update || exit 1
apt-get -y install $COMPUTE_PKG nova-network || exit 1
# there is no nova-compute-qemu pkg. Install kvm and reconfigure
# manually for qemu.
if [[ "$VIRT_TYPE" == "qemu" ]] ; then
sed -i 's/\(\-\-libvirt_type=\).*/\1qemu/g' /etc/nova/nova-compute.conf
fi
# XXX sudo on the juju sample AMI doesnt function
# as it should (doesn't include suoders.d/*). do this
# manually until we can use any AMI