[Libguestfs] [PATCH 2/2] Remove sound cards when outputting to libvirt

Matthew Booth mbooth at redhat.com
Mon Sep 27 16:13:44 UTC 2010


On 27/09/10 17:12, Richard W.M. Jones wrote:
> On Mon, Sep 27, 2010 at 03:03:37PM +0100, Matthew Booth wrote:
>> As we can't currently detect what sound card models are supported by the target
>> hypervisor, simply remove them.
>>
>> Works round RHBZ#589567
>> ---
>>   lib/Sys/VirtV2V/Target/LibVirt.pm |    8 +++++++-
>>   1 files changed, 7 insertions(+), 1 deletions(-)
>>
>> diff --git a/lib/Sys/VirtV2V/Target/LibVirt.pm b/lib/Sys/VirtV2V/Target/LibVirt.pm
>> index 95ffad4..029e4e2 100644
>> --- a/lib/Sys/VirtV2V/Target/LibVirt.pm
>> +++ b/lib/Sys/VirtV2V/Target/LibVirt.pm
>> @@ -344,7 +344,13 @@ sub _unconfigure_incompatible_devices
>>           # We have replaced the SCSI controller with either VirtIO or IDE.
>>           # Additionally, attempting to start a guest converted from ESX, which
>>           # has an lsilogic SCSI controller, will fail on RHEL 5.
>> -        $dom->findnodes("/domain/devices/controller[\@type='scsi']")
>> +        $dom->findnodes("/domain/devices/controller[\@type='scsi']"),
>> +
>> +        # XXX: We have no current way of detecting which sound card models are
>> +        # supported by the target hypervisor. As an unsupported sound card model
>> +        # can prevent the guest from starting, we simply remove sound cards for
>> +        # the moment.
>> +        $dom->findnodes("/domain/devices/sound")
>>       )
>>       {
>>           $path->getParentNode()->removeChild($path);
>
> ACK to both of these.  Seems simple for now.  It should be possible in
> future to detect which sound cards are supported (is it not in libvirt
> capabilities?)

Unfortunately not. I understand it's under discussion, though.

Matt
-- 
Matthew Booth, RHCA, RHCSS
Red Hat Engineering, Virtualisation Team

GPG ID:  D33C3490
GPG FPR: 3733 612D 2D05 5458 8A8A 1600 3441 EA19 D33C 3490




More information about the Libguestfs mailing list