Browse code

Rename BASE_IMAGE_COPY to VM_IMAGE

Dean Troyer authored on 2011/10/22 04:58:44
Showing 1 changed files
... ...
@@ -52,7 +52,7 @@ CONTAINER_NAME=${CONTAINER_NAME:-kvmstack}
52 52
 BASE_IMAGE=$KVMSTACK_DIR/images/$DIST_NAME.raw
53 53
 
54 54
 # Copy of base image, which we pre-install with tasty treats
55
-BASE_IMAGE_COPY=$IMAGES_DIR/$DIST_NAME.$CONTAINER_NAME.raw.copy
55
+VM_IMAGE=$IMAGES_DIR/$DIST_NAME.$CONTAINER_NAME.raw
56 56
 
57 57
 # Mop up after previous runs
58 58
 virsh destroy $CONTAINER_NAME
... ...
@@ -76,8 +76,8 @@ if [ ! -e $IMAGES_DIR/$IMAGE_FNAME ]; then
76 76
 fi
77 77
 
78 78
 # Create a copy of the base image
79
-if [ ! -e $BASE_IMAGE_COPY ]; then
80
-    cp -p $BASE_IMAGE $BASE_IMAGE_COPY
79
+if [ ! -e $VM_IMAGE ]; then
80
+    cp -p $BASE_IMAGE $VM_IMAGE
81 81
 fi
82 82
 
83 83
 # Unmount the copied base image
... ...
@@ -108,7 +108,7 @@ trap kill_unmount SIGINT
108 108
 DEST=${DEST:-/opt/stack}
109 109
 
110 110
 # Mount the file system
111
-mount -o loop,offset=32256 $BASE_IMAGE_COPY  $COPY_DIR
111
+mount -o loop,offset=32256 $VM_IMAGE  $COPY_DIR
112 112
 
113 113
 # git clone only if directory doesn't exist already.  Since ``DEST`` might not
114 114
 # be owned by the installation user, we create the directory and change the
... ...
@@ -231,7 +231,7 @@ cd $VM_DIR
231 231
 rm -f $VM_DIR/disk
232 232
 
233 233
 # Create our instance fs
234
-qemu-img create -f qcow2 -b $BASE_IMAGE_COPY disk
234
+qemu-img create -f qcow2 -b $VM_IMAGE disk
235 235
 
236 236
 sleep 5
237 237