[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Libguestfs] [PATCH 4/9] Converter: Remove disk driver elements other than 'qemu'



On 12/02/10 14:04, Richard W.M. Jones wrote:
> On Fri, Feb 12, 2010 at 02:03:46PM +0000, Matthew Booth wrote:
>> On 12/02/10 13:03, Richard W.M. Jones wrote:
>>> On Fri, Feb 12, 2010 at 09:39:17AM +0000, Matthew Booth wrote:
>>>> QEMU only currently supports the qemu storage driver in libvirt. Remove any
>>>> other driver element.
>>>> ---
>>>>  lib/Sys/VirtV2V/Converter.pm |    7 +++++++
>>>>  1 files changed, 7 insertions(+), 0 deletions(-)
>>>>
>>>> diff --git a/lib/Sys/VirtV2V/Converter.pm b/lib/Sys/VirtV2V/Converter.pm
>>>> index 4b11efd..edc6589 100644
>>>> --- a/lib/Sys/VirtV2V/Converter.pm
>>>> +++ b/lib/Sys/VirtV2V/Converter.pm
>>>> @@ -436,6 +436,13 @@ sub _unconfigure_hvs
>>>>          $emulator->getParent()->removeChild($emulator);
>>>>      }
>>>>  
>>>> +    # Remove any disk driver element other than 'qemu'
>>>> +    foreach my $driver
>>>> +        ($dom->findnodes('/domain/devices/disk/driver[ name != \'qemu\']'))
>>>> +    {
>>>> +        $driver->getParentNode()->removeChild($driver);
>>>> +    }
>>>> +
>>>>      _unconfigure_xen_metadata($dom, $default_dom);
>>>>  }
>>>>  
>>>> -- 
>>>> 1.6.6
>>>
>>> Not sure I understand this.  Looking at:
>>>
>>> http://libvirt.org/formatdomain.html#elementsDisks
>>>
>>> won't this change end up deleting important disks from the guest?
>>
>> No. It's only removing <driver>, not the disk element.
> 
> OK.  Is it safe to remove the <driver> element and
> leave the rest?

Pretty sure it is. I'll dig out a reason why when I get back on Tuesday.

This is now my only outstanding patch :)

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

M:       +44 (0)7977 267231
GPG ID:  D33C3490
GPG FPR: 3733 612D 2D05 5458 8A8A 1600 3441 EA19 D33C 3490


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]