<div><font color="#000000">Hi </font><span class="HOEnZb"><font color="#000000">Michal,</font></span></div>
<div><span class="HOEnZb"></span> </div>
<div><span class="HOEnZb"><font color="#000000">Thanks for the reply.</font></span></div>
<div><span class="HOEnZb"></span> </div>
<div><span class="HOEnZb"><font color="#000000">But i want to keep this setting, my intention is to set IO throttling (IO tunning) over the block storage which is attached to the VM.</font></span></div>
<div><span class="HOEnZb"></span> </div>
<div><span class="HOEnZb">As per my understanding there are 2 ways to do it.</span></div>
<div><span class="HOEnZb"></span> </div>
<div><span class="HOEnZb">1. Using Cgroup - we can put the IO throttling on the device using cgroup command (this i have tried and it is working)</span></div>
<div><span class="HOEnZb"></span> </div>
<div><span class="HOEnZb">2. Using Libvirt API virDomainSetBlockIoTune() - But i am not able to achieve the IO throttling using it, please suggest how to do it.</span></div>
<div><span class="HOEnZb"></span> </div>
<div><span class="HOEnZb">Please let me know how to do it using Libvirt.</span></div>
<div><span class="HOEnZb"></span> </div>
<div><span class="HOEnZb">Regards,</span></div>
<div><span class="HOEnZb">Vikrant</span></div>
<div><span class="HOEnZb"><font color="#000000"> </font></span></div>
<div><br><br><br></div>
<div class="gmail_quote">On Thu, May 9, 2013 at 5:42 PM, Michal Privoznik <span dir="ltr"><<a href="mailto:mprivozn@redhat.com" target="_blank">mprivozn@redhat.com</a>></span> wrote:<br>
<blockquote style="BORDER-LEFT:#ccc 1px solid;MARGIN:0px 0px 0px 0.8ex;PADDING-LEFT:1ex" class="gmail_quote">
<div class="im">On 09.05.2013 14:02, vikrant verma wrote:<br>> Hi All,<br>><br>>  I am setting the value for  "read_bytes_sec"  using the following API code<br>><br>> virDomainSetBlockIoTune(dom, "/mnt/tmpsdb/FileVM1", parainfoPtr,<br>
> nparams, 2);<br>><br>> I am succesfully able to set this value and i can read it back using the API<br>><br>><br>> virDomainGetBlockIoTune(dom,"/mnt/tmpsdb/FileVM1",parainfoPtr,&nparams,2);<br>
><br>> But after setting this value when i shutdown my VM and start it again I<br>> am getting following error -<br>><br>> ibvirtError: internal error Process exited while reading console log<br>> output: qemu-system-x86_64: -drive<br>
> file=/mnt/tmpsdb/FileVM1,if=none,id=drive-ide0-1-1,format=raw,bps_rd=1048576:<br>> Invalid parameter 'bps_rd'<br><br></div>Interesting. What's the qemu version? bps_rs has been introduced in<br>qemu-1.1 IIRC.<br>

<div class="im"><br>><br>><br>> Note - when i see dumpxml of the VM following lines are got added after<br>> setting the iotunes for read_bytes_sec<br>><br>>  <iotune><br>>         <read_bytes_sec>1048576</read_bytes_sec><br>
>       </iotune><br>><br><br></div>Yep, that's correct. If you don't need this setting anymore, just delete<br>it (e.g. by using virsh edit) and you should be able to start the domain<br>up again.<br>

<div class="HOEnZb">
<div class="h5"><br>><br>> Please help me. Also i wanted to know whether we can set block IO tune<br>> for a VM using the above API. Is it same as the IO throttling provided<br>> by cgroup?<br>><br>><br>
><br><br></div></div><span class="HOEnZb"><font color="#888888">Michal<br></font></span></blockquote></div><br>