[libvirt] [PATCH 6/6] qemu: setvcpus: Save config changes to disk

Cole Robinson crobinso at redhat.com
Tue Nov 23 14:00:25 UTC 2010


On 11/23/2010 06:31 AM, Daniel P. Berrange wrote:
> On Mon, Nov 22, 2010 at 04:35:34PM -0500, Cole Robinson wrote:
>> Currently changes to the persistent config aren't flushed to disk, meaning
>> they are lost if the domain is redefined or libvirtd is restarted.
>>
>> Signed-off-by: Cole Robinson <crobinso at redhat.com>
>> ---
>>  src/qemu/qemu_driver.c |    4 ++++
>>  1 files changed, 4 insertions(+), 0 deletions(-)
>>
>> diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
>> index c0335c3..04cca43 100644
>> --- a/src/qemu/qemu_driver.c
>> +++ b/src/qemu/qemu_driver.c
>> @@ -6367,6 +6367,10 @@ qemudDomainSetVcpusFlags(virDomainPtr dom, unsigned int nvcpus,
>>          break;
>>      }
>>  
>> +    /* Save the persistent config to disk */
>> +    if (flags & VIR_DOMAIN_VCPU_CONFIG)
>> +        ret = virDomainSaveConfig(driver->configDir, persistentDef);
>> +
>>  endjob:
>>      if (qemuDomainObjEndJob(vm) == 0)
>>          vm = NULL;
> 
> ACK
> 
> Daniel

Thanks, I've pushed this series.

- Cole




More information about the libvir-list mailing list