cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bob <b...@sectorlink.com>
Subject cloudstack 4.4.2 - VM network rate limit - has no effect
Date Thu, 26 Mar 2015 17:12:41 GMT
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?

It is using the default value from Global Settings: 
vm.network.throttling.rate 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,
         ); // https://github.com/jasonhancock/cloudstack-api-extension
//...
$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.

Mime
View raw message