From 4d3a50a48011b412bf66b1386292f85cccf1db74 Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrange" Date: Fri, 20 Jul 2012 10:26:19 +0100 Subject: Revert "Attach ISO as separate disk if given proper instruction" The following commit commit b63a3e8cbd8fe57d0be119368bf47964543270c2 Author: Josh Kearney Date: Fri Jul 13 15:57:54 2012 -0500 Attach ISO as separate disk if given proper instruction. This gives the option to attach the ISO as a separate drive, like we do in XenServer, and boot from that instead of replacing the root drive. Fixes bug 914484. Change-Id: I0e0560f5fcbc361b60ff1284e7369997dd770fd9 Results in this XML config ... which is broken in many ways - The same backing file is used in read/write mode on 2 disks which will cause data corruption on write. - The 'virtio' bus type does not allow device="cdrom" disks - The 'dev' attribute is given the same value on 2 disks To compound the problems, the original commit completely lacks any tests which would have caught the brokeness and/or identified what was actually intended. Change-Id: If1ec286f98fc91f9f411800bbb0adbf2797d2114 Signed-off-by: Daniel P. Berrange --- nova/virt/libvirt/driver.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/nova/virt/libvirt/driver.py b/nova/virt/libvirt/driver.py index 56e8a155a..325569f8a 100644 --- a/nova/virt/libvirt/driver.py +++ b/nova/virt/libvirt/driver.py @@ -1688,15 +1688,6 @@ class LibvirtDriver(driver.ComputeDriver): diskos.target_dev = root_device if root_device_type == "cdrom": diskos.target_bus = "ide" - # NOTE(jk0): Only attach the ISO as a separate drive if - # the appropriate metadata is set on the image. - image_properties = image_meta.get("properties", {}) - if "separate_attach" in image_properties: - separate_disk = disk_info("disk") - separate_disk.driver_cache = self.disk_cachemode - separate_disk.target_dev = self.default_root_device - separate_disk.target_bus = ephemeral_disk_bus - guest.add_device(separate_disk) else: diskos.target_bus = "virtio" guest.add_device(diskos) -- cgit