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

Re: [libvirt] [PATCH] docs: clarify that virsh setvcpus and setmem only work on active domains



On Fri, Jan 14, 2011 at 03:12:13AM +1100, Justin Clift wrote:
> On 13/01/2011, at 8:54 AM, Eric Blake wrote:
> <snip>
> >> +B<Note>, this command only works on active guest domains.  To change the
> >> +number of virtual CPUs in a inactive guest domain, use the virsh B<edit>
> >> +command to update the XML <vcpu> element.
> > 
> > When I did the setvcpus work, my intention was that the --config option
> > was to allow changing vcpu allocation without requiring a running
> > domain, insofar as things are implemented by the hypervisor.  If we have
> > cases where the behavior still doesn't match those intentions, we
> > probably ought to fix the bugs, rather than documenting that this
> > command is live-only.  So I'm thinking this paragraph doesn't belong.
> 
> Think I've found a bug here.  With an inactive domain "Fedora_14_x64",
> attempting without the --config option gives the expected error message:
> 
>   virsh # setvcpus Fedora_14_x64 4
>   error: Requested operation is not valid: domain is not running
> 
> But trying other flags (such as --maximum) don't:
> 
>   virsh # setvcpus Fedora_14_x64 4 --maximum
>   error: invalid argument in virDomainSetVcpusFlags
> 
> Should that be giving the "domain is not running" error as well?

The 'invalid argument' error is because you can't mix 'MAXIMUM'
and 'LIVE' flags together. virsh should have reported that
error, before even trying to invoke virDomainSetVcpusFlags.

Daniel


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