On Wed, May 26, 2010 at 04:53:06PM +0100, Matthew Booth wrote:
RHEV will fail to start a guest with more than one VirtIO disk marked
as
bootable. The previous behaviour of V2V simply marked all disks as bootable,
intending to follow the behaviour of libvirt's qemu driver. However, libvirt's
qemu driver actually only marks the first disk specified in the domain XML
(which may or may not be Xda) as bootable. This change updates the RHEV output
to follow this.
Fixes RHBZ#595619
---
lib/Sys/VirtV2V/Target/RHEV.pm | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/lib/Sys/VirtV2V/Target/RHEV.pm b/lib/Sys/VirtV2V/Target/RHEV.pm
index c35379d..231fe5c 100644
--- a/lib/Sys/VirtV2V/Target/RHEV.pm
+++ b/lib/Sys/VirtV2V/Target/RHEV.pm
@@ -874,8 +874,9 @@ sub _disks
$diske->setAttribute('ovf:format',
'http://en.wikipedia.org/wiki/Byte');
# IDE = 0, SCSI = 1, VirtIO = 2
$diske->setAttribute('ovf:disk-interface', $bus eq 'virtio' ?
2 : 0);
- # The libvirt QEMU driver marks all disks as bootable
- $diske->setAttribute('ovf:boot', 'True');
+ # The libvirt QEMU driver marks the first disk (in document order) as
+ # bootable
+ $diske->setAttribute('ovf:boot', $driveno == 1 ? 'True' :
'False');
# Add disk to VirtualHardware
my $item = $ovf->createElement('Item');
ACK, obvious fix.
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
virt-top is 'top' for virtual machines. Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://et.redhat.com/~rjones/virt-top