summaryrefslogtreecommitdiffstats
path: root/src/os-plugins/plugins/virtualbox/files/run-virt.include
diff options
context:
space:
mode:
authorroot2011-01-17 12:10:15 +0100
committerroot2011-01-17 12:10:15 +0100
commite4aedfabe7d586a5633a8be2dcb253b4ac7afca8 (patch)
treeac9a4ddbe756f612dc0a7d4b35e7f23a9afc0b8a /src/os-plugins/plugins/virtualbox/files/run-virt.include
parentremove /proc/bus/usb stuff.. (diff)
downloadcore-e4aedfabe7d586a5633a8be2dcb253b4ac7afca8.tar.gz
core-e4aedfabe7d586a5633a8be2dcb253b4ac7afca8.tar.xz
core-e4aedfabe7d586a5633a8be2dcb253b4ac7afca8.zip
commit of quickfixes on 4.2
Diffstat (limited to 'src/os-plugins/plugins/virtualbox/files/run-virt.include')
-rw-r--r--src/os-plugins/plugins/virtualbox/files/run-virt.include9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/os-plugins/plugins/virtualbox/files/run-virt.include b/src/os-plugins/plugins/virtualbox/files/run-virt.include
index 53120f2c..d05913ad 100644
--- a/src/os-plugins/plugins/virtualbox/files/run-virt.include
+++ b/src/os-plugins/plugins/virtualbox/files/run-virt.include
@@ -67,7 +67,7 @@ diskfile="${diskfolder}/${imgname}"
# check the file type
if echo ${imgname} | grep -qiE "vdi|vmdk|vhd" && [ ${diskless} -eq 0 ]; then
- imgfmt=$(echo ${imgname##*.} | tr [a-z] [A-Z])
+ imgfmt=$(echo ${imgname##*.} | tr "[a-z]" "[A-Z]")
elif [ ${diskless} -eq 0 ]; then
writelog "${imgname} is not a valid image format (vdi|vmdk|vhd), exiting!"
cleanexit 1
@@ -120,14 +120,14 @@ macaddr=$(echo ${macaddr} | sed 's/://g')
# machine UUID, MAC addr part of it
machineuuid="00000000-0000-0000-0000-${macaddr}"
# cosmetical, since UUID in lower case
-machineuuid=$(echo ${machineuuid} | tr [A-Z] [a-z])
+machineuuid=$(echo ${machineuuid} | tr "[A-Z]" "[a-z]")
# get UUID of VBox image, if not diskless
[ ${diskless} -eq 0 ] && diskuuid=$(VBoxManage -q showvdiinfo ${diskfile} \
| grep UUID | awk '{print $2}')
# make disk immutable
imgtype="Immutable"
# snapshot UUID is static
-snapshotuuid="88bc8b6d-f248-468a-95fe-318084904f8b"
+snapshotuuid="34f617be-192a-46b3-a8ae-bce1029e093f"
# imageuuid in machine.include, dafault snapshotuuid
imageuuid=${snapshotuuid}
@@ -157,6 +157,9 @@ elif [ ${diskless} -eq 0 ]; then
# use temp disk as snapshot
cat ${PLUGINDIRVIRTUALBOX}/empty-diff.vdi.gz \
| gunzip > "${snapshotdir}/{${snapshotuuid}}.vdi"
+ # patch the disk file uuid into the snapshot vdi file
+ dd if=${diskfile} of="${snapshotdir}/{${snapshotuuid}}.vdi" seek=424 \
+ skip=392 bs=1 count=16 conv=notrunc
fi
# TODO: MEM muss noch angepasst werden. Maschine crasht wenn nehr als 50% MEM