diff options
| author | Daniel P. Berrange <berrange@redhat.com> | 2012-07-20 10:26:19 +0100 |
|---|---|---|
| committer | Daniel P. Berrange <berrange@redhat.com> | 2012-07-20 10:30:37 +0100 |
| commit | 4d3a50a48011b412bf66b1386292f85cccf1db74 (patch) | |
| tree | c196f1e5330d9ad018d1008107fd45e7ab783fb3 | |
| parent | b244f6fde2e4b85a01a8e0a340d12a1fa9073236 (diff) | |
Revert "Attach ISO as separate disk if given proper instruction"
The following commit
commit b63a3e8cbd8fe57d0be119368bf47964543270c2
Author: Josh Kearney <josh@jk0.org>
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
<devices>
<disk type="file" device="cdrom">
<driver type="qcow2" cache="none"/>
<source file="instance-00000001/disk"/>
<target bus="virtio" dev="vda"/>
</disk>
<disk type="file" device="cdrom">
<driver type="qcow2" cache="none"/>
<source file="instance-00000001/disk"/>
<target bus="ide" dev="vda"/>
</disk>
...
</devices>
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 <berrange@redhat.com>
| -rw-r--r-- | nova/virt/libvirt/driver.py | 9 |
1 files changed, 0 insertions, 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) |
