Ask Your Question
0

how to set vcpupin in guest xml

asked 2013-07-23 03:51:52 -0600

Peeyush gravatar image

I am working with openstack and I want to pin vcpus to pcpus in guest xml. Now, the pinning operation can be done using

virsh vcpupin guestname vcpu pcpu

But I want to do it using python API. I investigated the openstack code and found out that get_guest_config function in libvirt/driver.py is responsible for generation of guest XML file. Now, I tried to put vcpupin attribute here by guest.vcpupin or guest.cputune_vcpupin but none of them is working. Any idea what am I doing wrong? Or is this functionality not available with openstack?

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

answered 2013-07-23 07:00:08 -0600

It looks like the vcpu_pin_set is coming directly from /etc/nova/nova.conf. Maybe you are satisfied with this global setting?

edit flag offensive delete link more

Comments

Yeah, well it restricts the pcpus where my instance can run, but it doesn't pin vcpus. I want the vcpupin attribute in guest xml.

Peeyush gravatar imagePeeyush ( 2013-07-23 12:01:00 -0600 )edit
0

answered 2013-07-24 01:16:02 -0600

Peeyush gravatar image

Okay, I figured it out. You need to define vcpupin in config file and after that it works.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2013-07-23 03:51:52 -0600

Seen: 226 times

Last updated: Jul 24 '13