summaryrefslogtreecommitdiffstats
path: root/os-plugins/plugins/virtualbox/files/run-virt.include
diff options
context:
space:
mode:
authorMichael Janczyk2010-08-22 14:30:51 +0200
committerMichael Janczyk2010-08-22 14:30:51 +0200
commitbafde168ea55336dbf3efec9e61ebb236da673f1 (patch)
tree6509e5eeb2c9703a14142d31f41a0c4427b0f061 /os-plugins/plugins/virtualbox/files/run-virt.include
parent... (diff)
downloadcore-bafde168ea55336dbf3efec9e61ebb236da673f1.tar.gz
core-bafde168ea55336dbf3efec9e61ebb236da673f1.tar.xz
core-bafde168ea55336dbf3efec9e61ebb236da673f1.zip
cdrom support for vbox added
Diffstat (limited to 'os-plugins/plugins/virtualbox/files/run-virt.include')
-rw-r--r--os-plugins/plugins/virtualbox/files/run-virt.include43
1 files changed, 12 insertions, 31 deletions
diff --git a/os-plugins/plugins/virtualbox/files/run-virt.include b/os-plugins/plugins/virtualbox/files/run-virt.include
index 9dbe47ac..a4b3454b 100644
--- a/os-plugins/plugins/virtualbox/files/run-virt.include
+++ b/os-plugins/plugins/virtualbox/files/run-virt.include
@@ -266,32 +266,6 @@ enablevt="false"
# external GUI
vrdpport=${remotedesktopport}
-# TODO: nur bei vmchooser
-# TODO: most of the following does not make much sense yet ...
-# virtual fd/cd/dvd and drive devices, floppy b: for configuration
-# if $floppy_0 from run-virt.include set then fdtest="TRUE"
-fdtest=
-fdtest=${floppy_0:+"TRUE"}
-# if $fdtest not set floppy0="FALSE", else "TRUE"
-floppy0=${fdtest:-"FALSE"}
-floppy1="TRUE"
-floppy1name="/var/lib/virt/vmchooser/loopimg/fd.img"
-# if $cdrom_0 from run-virt.include set then cdtest="TRUE"
-cdtest=
-cdtest=${cdrom_0:+"TRUE"}
-# if $cdtest not set cdrom0="FALSE", else "TRUE"
-cdrom0=${cdtest:-"FALSE"}
-# if $cdrom_1 from run-virt.include set then cdtest="TRUE"
-cdtest=
-cdtest=${cdrom_1:+"TRUE"}
-# if $cdtest not set cdrom1="FALSE", else "TRUE"
-cdrom1=${cdtest:-"FALSE"}
-# ide is expected default, test for the virtual disk image type should
-# be done while creating the runscripts ...
-ide="TRUE"
-hddrv="ide"
-audio=${audio:-"true"}
-
[ ${diskless} -eq 0 ] && writelog "\tSnapshots dir:\t\t$snapshotdir"
writelog "Diskimage:"
[ ${diskless} -eq 0 ] && writelog "\tDisk file:\t\t$diskfile"
@@ -315,10 +289,10 @@ writelog "\tBooting from:\t\t${boot}\c"
[ ${diskless} -eq 1 ] && writelog " 'diskless'"
# TODO: server start activate via xml, etc...
#writelog "\tGuest VRDP port:\t${vrdpport}"
-#writelog "\tCD-ROM1:\t${cdrom0}"
-#writelog "\tCD-ROM2:\t${cdrom1}"
-#writelog "\tFloppy_A:\t${floppy0}"
-#writelog "\tFloppy_B:\t${floppy1}"
+writelog "\tCD-ROM1:\t\t${cdrom0}"
+#writelog "\tCD-ROM2:\t\t${cdrom1}"
+#writelog "\tFloppy_A:\t\t${floppy0}"
+#writelog "\tFloppy_B:\t\t${floppy1}"
# defined in run-virt.sh and run-vmgrid.sh
writelog "\tShared Folders '${sharename}':\t${sharepath}"
@@ -340,12 +314,19 @@ fi
# create machine.xml
. ${PLUGINCONFVIRTUALBOX}/machine.include
+# remove CD-ROM
+if [ "${cdrom0}" != "TRUE" ]; then
+ sed -i "/HostDrive/d" ${machconfig}
+ sed -i '/AttachedDevice.*type="DVD"/d' ${machconfig}
+ sed -i "/<!-- PLEASE DO NOT REMOVE THIS COMMENT (CD)!!! -->/d" ${machconfig}
+fi
+
# if diskless remove all disks
if [ ${diskless} -eq 1 ]; then
sed -i "/<HardDisk/d;/<\/HardDisk/d" "${confdir}/VirtualBox.xml"
sed -i "/${imageuuid}/d" ${machconfig}
sed -i '/AttachedDevice type="HardDisk"/d' ${machconfig}
- sed -i "/<!-- PLEASE DO NOT REMOVE THIS COMMENT!!! -->/d" ${machconfig}
+ sed -i "/<!-- PLEASE DO NOT REMOVE THIS COMMENT (HD)!!! -->/d" ${machconfig}
fi
# define redirects