[Libvir] [PATCH] Have xenDaemonDetachDevice() remove device configuration

Ryan Scott Ryan.Scott at Sun.COM
Wed Apr 9 18:08:21 UTC 2008


Daniel Veillard wrote:
> On Tue, Apr 08, 2008 at 01:06:12PM -0700, Ryan Scott wrote:
>> When a user runs 'virsh detach-disk' on a running domain, the disk is 
>> removed, but reappears after the domain is rebooted.  This seems odd, as 
>> someone who types detach-disk most likely wants the change to be permanent.
>>
>> This patch updates the code in xenDaemonDetachDevice() to pass the 
>> rm_cfg flag to Xen, so that the change is committed to the domain's 
>> configuration file.
>>
>> This change depends on a xen patch that was committed to unstable on 
>> March 20: 
>> http://lists.xensource.com/archives/html/xen-changelog/2008-03/msg00122.html
> 
>   but what happens if the flag is passed down while the xend version doesn't
> support it ? if this breaks we need to check first that the remote support
> it (based on a version change at some point), isn't it ?

In my tests, if you used a new libvirt with an old xen (i.e. passing the 
flag when it wasn't expected), the flag was ignored.  I didn't test all 
configurations, but I don't think a version check is necessary.

The problems occurred when you used a new xen with old libvirt.  Xen 
would refuse the call if all the flags were not provided.

-Ryan

> 
> Daniel
> 




More information about the libvir-list mailing list