On 13/01/2011, at 8:54 AM, Eric Blake wrote: > On 01/12/2011 02:24 PM, Justin Clift wrote: >> Addresses BZ # 622534: >> >> https://bugzilla.redhat.com/show_bug.cgi?id=622534 >> --- >> tools/virsh.pod | 28 ++++++++++++++++++---------- >> 1 files changed, 18 insertions(+), 10 deletions(-) >> >> diff --git a/tools/virsh.pod b/tools/virsh.pod >> index 0e03d68..b4c6ff7 100644 >> --- a/tools/virsh.pod >> +++ b/tools/virsh.pod >> @@ -568,13 +568,16 @@ XEN_CREDIT scheduler and are now I<DEPRECATED>. >> >> =item B<setmem> I<domain-id> B<kilobytes> >> >> -Change the current memory allocation in the guest domain. This should take >> -effect immediately. The memory limit is specified in >> -kilobytes. >> +Change the current memory allocation in an B<active> guest domain. This >> +should take effect immediately. The memory limit is specified in kilobytes. > > Do we need extra text talking about rounding and/or rejection if the > hypervisor can't support a memory limit with that small of a granularity > (for example, Matthias recently posted patches regarding esx only having > megabyte granularity). That's not a bad idea. I have no idea of the text to add about it though. Is it something you know, or should we ask Matthias, or ? >> For Xen, you can only adjust the memory of a running domain if the >> domain is paravirtualized or running the PV balloon driver. >> >> +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 <memory> element. > > Oops - don't you mean "change the memory allocation of an inactive" > rather than "change the number of virtual CPUs in a inactive"? Oh wow. I even read that more than once, and still mentally missed it. Will v2 it after we figure out the rounding/rejection you mention above. :) >> @@ -593,24 +596,29 @@ QEMU/KVM supports I<--hard-limit>, I<--soft-limit>, and I<--swap-hard-limit>. >> =item B<setvcpus> I<domain-id> I<count> optional I<--maximum> I<--config> >> I<--live> > >> >> +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. Ahhh. With the BZ, it's main intention is that people have tried running setvcpus on an inactive domain, and it barfs. I haven't actually tried the command to see if modern libvirt behaves this way. -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list