Re: cloudstack 4.4.2 - VM network rate limit - has no effect

2015-03-27 Thread bob
I've also tried to use the parameter: iptonetworklist[0].networkrate, 
again it will deploy the VM with the proper networkid but the rate limit 
is not working.


'iptonetworklist[0].networkid'=>'e1ad63e6-923e-4ad2-b447-33d742c5360e',
'iptonetworklist[0].networkrate'=>1, // Network Throttling not working

On 03/27/2015 12:52 PM, bob wrote:

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-
output:


  i-2-123-VM
  7555205e-c18d-48c7-bfdf-3a7461e637ee
  CentOS 5.5 (64-bit)
  524288
  524288
  1
  
500
  
  
hvm


  
  



  
  
  
  
  destroy
  restart
  destroy
  
/usr/libexec/qemu-kvm

  
  file='/mnt/dfbbd8a2-2c79-3183-8149-25899d9b1191/27473b1d-c29e-44af-b5d1-0452c1104870'/>

  
  
  function='0x0'/>



  
  
  
  
  


  
  function='0x2'/>



  
  function='0x1'/>



  
  
  


  
  
  
  
  function='0x0'/>



  
  
  


  
  
  


  



  


  
  
  function='0x0'/>

    

  

  


Here is the censored version of my CURL URL request:
http://serverip:8080/client/api?account=bob&apikey=MYAPIKEY...&command=deployVirtualMachine&details[0].cpuNumber=1&details[0].cpuSpeed=500&details[0].memory=512&details[0].networkrate=1&displayname=testing&displayvm=true&domainid=a7f31400-9c32-11e4-82e0-50e549354a3e&expires=2015-03-27T12%3A18%3A49-0400&hypervisor=KVM&name=testing&networkids=a2353a3b-073e-47d6-8090-3032432e3077&response=json&rootdisksize=50&serviceofferingid=4cb3c5a5-cc02-4450-a026-f538dc575b5e&signatureVersion=3&templateid=a84da8b6-9c32-11e4-82e0-50e549354a3e&zoneid=8c95e4d9-c49e-4275-8c35-2af258a27898&signature=SIGNATURE... 



On 03/26/2015 04:43 PM, Wido den Hollander wrote:

-BEGIN PGP SIGNED MESSAGE-
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-

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:
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.

-BEGIN PGP SIGNATURE-
Version: GnuPG v1

iQIcBAEBAgAGBQJVFG93AAoJEAGbWC3bPspCc5UP/2/JDa7PHsDoaoOCYQlOPYaT
tlJBpRviHkWl/IB5Dup86nDF6GjNYrwbRA0+YKn2E8UwgJ+lAz13Vkqg3eCLH3OK
Na++WFMNePlR/MOYKRic0XuW+8YflKwKfxTs2OU96y5t3DqBuZzVpBKEKvxprTqv
5uhJZLnyoA1AZotg+oMAgD07SBtnFEIqlIxiP/K7UROPMnE0D8pUOVD4Z2Tdrh5p
Rc7yNHU9XbLJjxuf1fpZkTmA6Htt+Qb4r3K4aOztmt6n7I1ov91HQSUQaYH3jQnJ
t06apLb8Ip4w85HpfqupfVQAVF26swawi7ghuJ/BVvG+/EaY4nyyhoUPoM6Q42fW
YusLbfCWaOM8yB0Hr0TjGBPAXzuIKcI1j4KxX13WONBMTNqn34TYanxXDD2UhYZE
6W8sfB3+cF0N4HF1EBTKDAYRcVolqZWILuvYIx1VmFEuJfSljg+X47ULI/keiuWX
vcdagoS2eJCsVreym5S6lbd3jFjJibpcu+MUsT0Rb9M8hvdZ3b/x3+mHaXaAhErQ
4xOoZhbD+rbeBfD+WP6HOJRLvGsdPfSMJXxxdWz+xgIn4Odbc/eoV/zuVPGuHBSE
e5JqqLuXRzQPmktrP0uxMPgyqUH/hjyW+6g4F5A3/siixjziI2NfvfEzJ1qGDtFw
d3H56NFlcAPmD5/+Ldew
=ii1N
-END PGP SIGNATURE-







Re: cloudstack 4.4.2 - VM network rate limit - has no effect

2015-03-27 Thread bob

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-
output:


  i-2-123-VM
  7555205e-c18d-48c7-bfdf-3a7461e637ee
  CentOS 5.5 (64-bit)
  524288
  524288
  1
  
500
  
  
hvm


  
  



  
  
  
  
  destroy
  restart
  destroy
  
/usr/libexec/qemu-kvm

  
  file='/mnt/dfbbd8a2-2c79-3183-8149-25899d9b1191/27473b1d-c29e-44af-b5d1-0452c1104870'/>

  
  
  function='0x0'/>



  
  
  
  
  


  
  function='0x2'/>



  
  function='0x1'/>



  
  
  


  
  
  
  
  function='0x0'/>



  
  
  


  
  
  


  



  


  
  
  function='0x0'/>



  

  


Here is the censored version of my CURL URL request:
http://serverip:8080/client/api?account=bob&apikey=MYAPIKEY...&command=deployVirtualMachine&details[0].cpuNumber=1&details[0].cpuSpeed=500&details[0].memory=512&details[0].networkrate=1&displayname=testing&displayvm=true&domainid=a7f31400-9c32-11e4-82e0-50e549354a3e&expires=2015-03-27T12%3A18%3A49-0400&hypervisor=KVM&name=testing&networkids=a2353a3b-073e-47d6-8090-3032432e3077&response=json&rootdisksize=50&serviceofferingid=4cb3c5a5-cc02-4450-a026-f538dc575b5e&signatureVersion=3&templateid=a84da8b6-9c32-11e4-82e0-50e549354a3e&zoneid=8c95e4d9-c49e-4275-8c35-2af258a27898&signature=SIGNATURE...

On 03/26/2015 04:43 PM, Wido den Hollander wrote:

-BEGIN PGP SIGNED MESSAGE-
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-

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:
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.

-BEGIN PGP SIGNATURE-
Version: GnuPG v1

iQIcBAEBAgAGBQJVFG93AAoJEAGbWC3bPspCc5UP/2/JDa7PHsDoaoOCYQlOPYaT
tlJBpRviHkWl/IB5Dup86nDF6GjNYrwbRA0+YKn2E8UwgJ+lAz13Vkqg3eCLH3OK
Na++WFMNePlR/MOYKRic0XuW+8YflKwKfxTs2OU96y5t3DqBuZzVpBKEKvxprTqv
5uhJZLnyoA1AZotg+oMAgD07SBtnFEIqlIxiP/K7UROPMnE0D8pUOVD4Z2Tdrh5p
Rc7yNHU9XbLJjxuf1fpZkTmA6Htt+Qb4r3K4aOztmt6n7I1ov91HQSUQaYH3jQnJ
t06apLb8Ip4w85HpfqupfVQAVF26swawi7ghuJ/BVvG+/EaY4nyyhoUPoM6Q42fW
YusLbfCWaOM8yB0Hr0TjGBPAXzuIKcI1j4KxX13WONBMTNqn34TYanxXDD2UhYZE
6W8sfB3+cF0N4HF1EBTKDAYRcVolqZWILuvYIx1VmFEuJfSljg+X47ULI/keiuWX
vcdagoS2eJCsVreym5S6lbd3jFjJibpcu+MUsT0Rb9M8hvdZ3b/x3+mHaXaAhErQ
4xOoZhbD+rbeBfD+WP6HOJRLvGsdPfSMJXxxdWz+xgIn4Odbc/eoV/zuVPGuHBSE
e5JqqLuXRzQPmktrP0uxMPgyqUH/hjyW+6g4F5A3/siixjziI2NfvfEzJ1qGDtFw
d3H56NFlcAPmD5/+Ldew
=ii1N
-END PGP SIGNATURE-





cloudstack 4.4.2 - VM network rate limit - has no effect

2015-03-26 Thread bob
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.