On 11/05/2014 10:50 AM, Thomas Stein wrote:
Am 04.11.14 17:55, schrieb Thomas Stein:
> Hello.
>
> Just a quick question. Is "setvcpus $windowsVM --guest 4" supposed to
> work? I have qemu-guest-agent (1.6.something) running inside a windows7
> vm but all i get is:
>
> virsh # setvcpus windows7 --guest 4
> error: invalid argument: requested vcpu count is greater than the count
> of enabled vcpus in the domain: 4 > 1
I'm not exactly sure how well setvcpus --guest will work (or not) with
windows guests. But the way it works for Linux guest is by telling the
guest to treat an available cpu as offline; for this to work, the host
must provide that cpu. So the error message makes sense.
>
> The xml file looks like this:
>
> <vcpu placement='static' current='1'>4</vcpu>
For --guest to have any chance of changing cpus from the guest
perspective, you need something like <vcpu current='4'>4</vcpu> as
your
starting point, then tell the guest to offline 3 cpus shortly after
boot, then later tell the guest to turn the cpus back on when you are
ready to give it more power.
Another question regarding qemu-guest-agent. What if i have more then
one VM running on a host? Is the configuration for any of them the same
or do i have to adjust some settings?
<channel type='unix'>
<source mode='bind'
path='/var/lib/libvirt/qemu/f16x86_64.agent'/>
<target type='virtio' name='org.qemu.guest_agent.0'/>
<address type='virtio-serial' controller='0' bus='0'
port='1'/>
</channel>
I mean, do i have to use a different port or something for each VM?
The <address> element of a guest XML is related to what the _guest_
sees, not what the host provides. So it is perfectly fine for multiple
guests to see the same <address> (each sees their own virtual hardware,
and could care less if some other guest has similar virtual hardware).
Similarly for the name of the <target> element - each guest will see
their own guest-agent channel at the name 'org.qemu.guest_agent.0'; this
is a guest view, so it doesn't matter whether other guests happen to
also pick the same name.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library
http://libvirt.org