Hi experts I want to use libvirt doing the migration migration the guest from core 0 to core 2, Is there a way to do this ? any points? Lei -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20131203/1cd982b2/attachment.htm>
Nicolas Sebrecht
2013-Dec-03 07:52 UTC
[libvirt-users] Re: help about migration with libvirt
The 03/12/13, lei yang wrote:> Hi experts > > I want to use libvirt doing the migrationBasically, migration allows moving a VM from host to another.> migration the guest from core 0 to core 2, Is there a way to do this ? any > points?This is about CPU affinity. You may look at CPU pinning with 'vcpupin' in the manual of virsh. It is possible to enable vCPU pinning in libvirt guest XML. Don't know if libvirt supports applying CPU affinity at guest runtime but you could do it with usual tools (taskset, htop, etc). -- Nicolas Sebrecht
On Tue, Dec 3, 2013 at 3:52 PM, Nicolas Sebrecht <nsebrecht@piing.fr> wrote:> The 03/12/13, lei yang wrote: > > Hi experts > > > > I want to use libvirt doing the migration > > Basically, migration allows moving a VM from host to another. > > > migration the guest from core 0 to core 2, Is there a way to do this > ? any > > points? > > This is about CPU affinity. You may look at CPU pinning with 'vcpupin' > in the manual of virsh. It is possible to enable vCPU pinning in libvirt > guest XML. > > Don't know if libvirt supports applying CPU affinity at guest runtime > but you could do it with usual tools (taskset, htop, etc). >I don't know how to change the affinity use tasket for the vms in the libvirt, my goal it to get the downtime from core 0 to core 2 Lei> > -- > Nicolas Sebrecht >
On 12/03/2013 12:52 AM, Nicolas Sebrecht wrote:> This is about CPU affinity. You may look at CPU pinning with 'vcpupin' > in the manual of virsh. It is possible to enable vCPU pinning in libvirt > guest XML. > > Don't know if libvirt supports applying CPU affinity at guest runtimeYes, 'virsh vcpupin' can be used to change CPU affinity at runtime.> but you could do it with usual tools (taskset, htop, etc).Going behind libvirt's back may lead to unexpected surprises. Also, preferring the libvirt interfaces for changing CPU affinity gives you better flexibility of changing things even when using remote URIs (you don't have to open separate ssh sessions to the remote machines to run secondary tools). -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org