cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bob <>
Subject Re: cloudstack 4.4.2 - VM network rate limit - has no effect
Date Fri, 27 Mar 2015 16:52:35 GMT
Compiled against library: libvirt 0.10.2
Using library: libvirt 0.10.2
Using API: QEMU 0.10.2
Running hypervisor: QEMU 0.12.1

$ virsh dumpxml i-VM-XXXX

<domain type='kvm' id='143'>
   <description>CentOS 5.5 (64-bit)</description>
   <memory unit='KiB'>524288</memory>
   <currentMemory unit='KiB'>524288</currentMemory>
   <vcpu placement='static'>1</vcpu>
     <type arch='x86_64' machine='rhel6.6.0'>hvm</type>
     <boot dev='cdrom'/>
     <boot dev='hd'/>
   <clock offset='utc'/>
     <disk type='file' device='disk'>
       <driver name='qemu' type='qcow2' cache='none'/>
       <target dev='vda' bus='virtio'/>
       <alias name='virtio-disk0'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x04' 
     <disk type='file' device='cdrom'>
       <driver name='qemu' type='raw' cache='none'/>
       <target dev='hdc' bus='ide'/>
       <alias name='ide0-1-0'/>
       <address type='drive' controller='0' bus='1' target='0' unit='0'/>
     <controller type='usb' index='0'>
       <alias name='usb0'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x01' 
     <controller type='ide' index='0'>
       <alias name='ide0'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x01' 
     <interface type='bridge'>
       <mac address='02:00:42:f4:00:14'/>
       <source bridge='breth0-537'/>
         <inbound average='25600' peak='25600'/>
         <outbound average='25600' peak='25600'/>
       <target dev='vnet13'/>
       <model type='virtio'/>
       <alias name='net0'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x03' 
     <serial type='pty'>
       <source path='/dev/pts/6'/>
       <target port='0'/>
       <alias name='serial0'/>
     <console type='pty' tty='/dev/pts/6'>
       <source path='/dev/pts/6'/>
       <target type='serial' port='0'/>
       <alias name='serial0'/>
     <input type='tablet' bus='usb'>
       <alias name='input0'/>
     <input type='mouse' bus='ps2'/>
     <graphics type='vnc' port='5905' autoport='yes' listen='x.x.x.x'>
       <listen type='address' address='x.x.x.x'/>
       <model type='cirrus' vram='9216' heads='1'/>
       <alias name='video0'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x02' 
     <memballoon model='none'>
       <alias name='balloon0'/>

Here is the censored version of my CURL URL request:

On 03/26/2015 04:43 PM, Wido den Hollander wrote:
> Hash: SHA1
> On 03/26/2015 06:12 PM, bob wrote:
>> Hello, I am using a PHP API to cloudstack 4.4.2 - When I make the
>> call to deployVirtualMachine and attempt to pass the parm
>> details[0].networkrate = 1 it does not rate limit the network to
>> 1MB. What am I doing wrong?
> Can you check the XML definition of the guest on the hypervisor?
> $ virsh dumpxml i-VM-XXXX
> In the network section you should see a network throttle setting.
> If not, it might be that your Qemu or libvirt is to old. I'm not sure
> what versions you need.
>> It is using the default value from Global Settings:
>> and ignores my VM compute service
>> offering rate. How do I force it to use the rate defined by my api
>> call to deployVirtualMachine?
>> Here is my PHP code: //... $displayVM = "true"; // an optional
>> field, whether to the display the vm to the end user or not.
>> $hypervisor = "KVM"; //the hypervisor on which to deploy the
>> virtual machine
>> $vars = array( // Required by API call: 'serviceofferingid' =>
>> CUSTOM_COMPUTE_OFFERING, 'templateid'=>$templateId,
>> 'zoneid'=>ZONE_ID, // Optional but useful:
>> 'details[0].networkrate'=>1, // Network Throttling of 1MB/s not
>> working here... //            'networkrate'=>1,
>> 'account'=>$account, 'displayname'=>$displayName,
>> 'displayvm'=>$displayVM, 'domainid'=>$domainid, //ROOT_DOMAIN_ID,
>> 'hypervisor'=>$hypervisor, 'name'=>$name,
>> 'networkids'=>NETWORK_ID, ); //
>> //...
>> $deploy = $cloudstack->deployVirtualMachine($vars); // does curl
>> request...
>> Note: It will create the VM and runs fine with no errors
>> generated... However, when I download a 10 MB test file it will get
>> 10MB/s download, and does not limit it to 1MB/s. Also, when I use
>> the cloudstack interface to look at the Instance Details, I do not
>> see any rate limit set.
> Version: GnuPG v1
> tlJBpRviHkWl/IB5Dup86nDF6GjNYrwbRA0+YKn2E8UwgJ+lAz13Vkqg3eCLH3OK
> Na++WFMNePlR/MOYKRic0XuW+8YflKwKfxTs2OU96y5t3DqBuZzVpBKEKvxprTqv
> 5uhJZLnyoA1AZotg+oMAgD07SBtnFEIqlIxiP/K7UROPMnE0D8pUOVD4Z2Tdrh5p
> Rc7yNHU9XbLJjxuf1fpZkTmA6Htt+Qb4r3K4aOztmt6n7I1ov91HQSUQaYH3jQnJ
> t06apLb8Ip4w85HpfqupfVQAVF26swawi7ghuJ/BVvG+/EaY4nyyhoUPoM6Q42fW
> 6W8sfB3+cF0N4HF1EBTKDAYRcVolqZWILuvYIx1VmFEuJfSljg+X47ULI/keiuWX
> vcdagoS2eJCsVreym5S6lbd3jFjJibpcu+MUsT0Rb9M8hvdZ3b/x3+mHaXaAhErQ
> 4xOoZhbD+rbeBfD+WP6HOJRLvGsdPfSMJXxxdWz+xgIn4Odbc/eoV/zuVPGuHBSE
> e5JqqLuXRzQPmktrP0uxMPgyqUH/hjyW+6g4F5A3/siixjziI2NfvfEzJ1qGDtFw
> d3H56NFlcAPmD5/+Ldew
> =ii1N

View raw message