From 19354585e16513f5ee590c90620b7fae603b6a78 Mon Sep 17 00:00:00 2001 From: Evgeny Antyshev Date: Mon, 24 Nov 2014 14:20:35 +0400 Subject: [PATCH] libvirt plugin "parallels" support We're in the process of establishing the CI testing with Parallels Cloud Server plugin for libvirt. Currently we use local clone of devstack in our infrastructure, but we want to switch to upstream requires extra customization of nova.conf and glance-api.conf: nova.conf should have "images_type" and "connection_uri" defined, and glance-api.conf to have "ploop" in disk formats Implements: blueprint pcs-support Change-Id: I0b073359fda8b4531cae7b8946eb52a561c82857 --- lib/glance | 3 +++ lib/nova_plugins/hypervisor-libvirt | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/lib/glance b/lib/glance index b4c18f8ac7..0970f9483a 100644 --- a/lib/glance +++ b/lib/glance @@ -129,6 +129,9 @@ function configure_glance { iniset $GLANCE_API_CONF DEFAULT container_formats "ami,ari,aki,bare,ovf,tgz" iniset $GLANCE_API_CONF DEFAULT disk_formats "ami,ari,aki,vhd,raw,iso" fi + if [ "$VIRT_DRIVER" = 'libvirt' ] && [ "$LIBVIRT_TYPE" = 'parallels' ]; then + iniset $GLANCE_API_CONF DEFAULT disk_formats "ami,ari,aki,vhd,vmdk,raw,qcow2,vdi,iso,ploop" + fi # Store specific configs iniset $GLANCE_API_CONF DEFAULT filesystem_store_datadir $GLANCE_IMAGE_DIR/ diff --git a/lib/nova_plugins/hypervisor-libvirt b/lib/nova_plugins/hypervisor-libvirt index 53dbfb976f..123ca82048 100644 --- a/lib/nova_plugins/hypervisor-libvirt +++ b/lib/nova_plugins/hypervisor-libvirt @@ -64,6 +64,11 @@ function configure_nova_hypervisor { # disable it here for now to avoid surprises later. iniset $NOVA_CONF libvirt inject_partition '-2' fi + + if [[ "$LIBVIRT_TYPE" = "parallels" ]]; then + iniset $NOVA_CONF libvirt connection_uri "parallels+unix:///system" + iniset $NOVA_CONF libvirt images_type "ploop" + fi } # install_nova_hypervisor() - Install external components