Index: /trunk/include/VBox/settings.h
===================================================================
--- /trunk/include/VBox/settings.h	(revision 29352)
+++ /trunk/include/VBox/settings.h	(revision 29353)
@@ -876,5 +876,6 @@
     {
         BuildMachineXML_IncludeSnapshots = 0x01,
-        BuildMachineXML_WriteVboxVersionAttribute = 0x02
+        BuildMachineXML_WriteVboxVersionAttribute = 0x02,
+        BuildMachineXML_SkipRemovableMedia = 0x02
     };
     void buildMachineXML(xml::ElementNode &elmMachine, uint32_t fl);
@@ -899,5 +900,5 @@
     void buildHardwareXML(xml::ElementNode &elmParent, const Hardware &hw, const Storage &strg);
     void buildNetworkXML(NetworkAttachmentType_T mode, xml::ElementNode &elmParent, const NetworkAdapter &nic);
-    void buildStorageControllersXML(xml::ElementNode &elmParent, const Storage &st);
+    void buildStorageControllersXML(xml::ElementNode &elmParent, const Storage &st, bool fSkipRemovableMedia);
     void buildSnapshotXML(xml::ElementNode &elmParent, const Snapshot &snap);
 
Index: /trunk/src/VBox/Main/ApplianceImplExport.cpp
===================================================================
--- /trunk/src/VBox/Main/ApplianceImplExport.cpp	(revision 29352)
+++ /trunk/src/VBox/Main/ApplianceImplExport.cpp	(revision 29353)
@@ -1297,5 +1297,6 @@
         // write the machine config to the vbox:Machine element
         pConfig->buildMachineXML(*pelmVBoxMachine,
-                                 settings::MachineConfigFile::BuildMachineXML_WriteVboxVersionAttribute);
+                                   settings::MachineConfigFile::BuildMachineXML_WriteVboxVersionAttribute
+                                 | settings::MachineConfigFile::BuildMachineXML_SkipRemovableMedia);
                                         // but not BuildMachineXML_IncludeSnapshots
         delete pConfig;
Index: /trunk/src/VBox/Main/xml/Settings.cpp
===================================================================
--- /trunk/src/VBox/Main/xml/Settings.cpp	(revision 29352)
+++ /trunk/src/VBox/Main/xml/Settings.cpp	(revision 29353)
@@ -3651,7 +3651,12 @@
  * @param elmParent
  * @param st
+ * @param fSkipRemovableMedia If true, DVD and floppy attachments are skipped and
+ *   an empty drive is always written instead. This is for the OVF export case.
+ *   This parameter is ignored unless the settings version is at least v1.9, which
+ *   is always the case when this gets called for OVF export.
  */
 void MachineConfigFile::buildStorageControllersXML(xml::ElementNode &elmParent,
-                                                   const Storage &st)
+                                                   const Storage &st,
+                                                   bool fSkipRemovableMedia)
 {
     xml::ElementNode *pelmStorageControllers = elmParent.createChild("StorageControllers");
@@ -3765,5 +3770,9 @@
             pelmDevice->setAttribute("device", att.lDevice);
 
-            if (!att.uuid.isEmpty())
+            if (    !att.uuid.isEmpty()
+                 && (    att.deviceType == DeviceType_HardDisk
+                      || !fSkipRemovableMedia
+                    )
+               )
                 pelmDevice->createChild("Image")->setAttribute("uuid", makeString(att.uuid));
             else if (    (m->sv >= SettingsVersion_v1_9)
@@ -3798,5 +3807,9 @@
 
     buildHardwareXML(*pelmSnapshot, snap.hardware, snap.storage);
-    buildStorageControllersXML(*pelmSnapshot, snap.storage);
+    buildStorageControllersXML(*pelmSnapshot,
+                               snap.storage,
+                               false /* fSkipRemovableMedia */);
+                                    // we only skip removable media for OVF, but we never get here for OVF
+                                    // since snapshots never get written then
 
     if (snap.llChildSnapshots.size())
@@ -3835,4 +3848,10 @@
  *      the OVF export case in which we don't have the settings version set in
  *      the root element.
+ *
+ *  --  BuildMachineXML_SkipRemovableMedia: If set, removable media attachments
+ *      (DVDs, floppies) are silently skipped. This is for the OVF export case
+ *      until we support copying ISO and RAW media as well.  This flas is ignored
+ *      unless the settings version is at least v1.9, which is always the case
+ *      when this gets called for OVF export.
  *
  * @param elmMachine XML <Machine> element to add attributes and elements to.
@@ -3887,5 +3906,7 @@
 
     buildHardwareXML(elmMachine, hardwareMachine, storageMachine);
-    buildStorageControllersXML(elmMachine, storageMachine);
+    buildStorageControllersXML(elmMachine,
+                               storageMachine,
+                               !!(fl & BuildMachineXML_SkipRemovableMedia));
 }
 
