Rename BASE_IMAGE_COPY to VM_IMAGE
This commit is contained in:
parent
ad57a3a8e8
commit
d03329106f
1 changed files with 5 additions and 5 deletions
|
@ -52,7 +52,7 @@ CONTAINER_NAME=${CONTAINER_NAME:-kvmstack}
|
|||
BASE_IMAGE=$KVMSTACK_DIR/images/$DIST_NAME.raw
|
||||
|
||||
# Copy of base image, which we pre-install with tasty treats
|
||||
BASE_IMAGE_COPY=$IMAGES_DIR/$DIST_NAME.$CONTAINER_NAME.raw.copy
|
||||
VM_IMAGE=$IMAGES_DIR/$DIST_NAME.$CONTAINER_NAME.raw
|
||||
|
||||
# Mop up after previous runs
|
||||
virsh destroy $CONTAINER_NAME
|
||||
|
@ -76,8 +76,8 @@ if [ ! -e $IMAGES_DIR/$IMAGE_FNAME ]; then
|
|||
fi
|
||||
|
||||
# Create a copy of the base image
|
||||
if [ ! -e $BASE_IMAGE_COPY ]; then
|
||||
cp -p $BASE_IMAGE $BASE_IMAGE_COPY
|
||||
if [ ! -e $VM_IMAGE ]; then
|
||||
cp -p $BASE_IMAGE $VM_IMAGE
|
||||
fi
|
||||
|
||||
# Unmount the copied base image
|
||||
|
@ -108,7 +108,7 @@ trap kill_unmount SIGINT
|
|||
DEST=${DEST:-/opt/stack}
|
||||
|
||||
# Mount the file system
|
||||
mount -o loop,offset=32256 $BASE_IMAGE_COPY $COPY_DIR
|
||||
mount -o loop,offset=32256 $VM_IMAGE $COPY_DIR
|
||||
|
||||
# git clone only if directory doesn't exist already. Since ``DEST`` might not
|
||||
# be owned by the installation user, we create the directory and change the
|
||||
|
@ -231,7 +231,7 @@ cd $VM_DIR
|
|||
rm -f $VM_DIR/disk
|
||||
|
||||
# Create our instance fs
|
||||
qemu-img create -f qcow2 -b $BASE_IMAGE_COPY disk
|
||||
qemu-img create -f qcow2 -b $VM_IMAGE disk
|
||||
|
||||
sleep 5
|
||||
|
||||
|
|
Loading…
Reference in a new issue