Hi Marcus,

Using ipaddress and networkids worked for me as well.  The instance started up 
with the correct IP.

2012-08-13 13:50:49,219 INFO  [cloud.api.ApiServer] (catalina-exec-15:null) 
(userId=2 accountId=2 sessionId=null) 10.1.0.27 -- GET 
account=admin&apikey=dz8v8G3SrI6asE1fcWEn9_QTt3Gt13R0sH_bQrT4qqXQ0F8CqZPncc2kpD0u13BHdcMhCMZlz5KluYliG20JBw&command=deployVirtualMachine&diskofferingid=8a467380-9bf8-4eda-9ac5-0be1d05b0f92&displayname=instance3&domainid=b6c63586-95d1-400d-ae0a-bd0f7cd437a5&ipaddress=10.1.2.21&name=instance3&networkids=a48f993f-86c6-4499-b2f5-5d33ae82afa0&serviceofferingid=c61e1d9f-4ea1-4189-acdb-ebd62097daa9&signature=RHM6BTTUOT2ApQ0P3B6wrZEc8ck%3D&size=0&startvm=True&templateid=3588347d-d3e1-47b9-b830-dd45bfb151d6&zoneid=bc1c933d-bed1-4e10-b581-2a538bab9876
 200 <?xml version="1.0" encoding="ISO-8859-1"?><deployvirtualmachineresponse 
cloud-stack-version="3.0.3.2012-07-27T00:45:51Z"><id>eca3d6bd-d568-474b-80bc-a93292411dcd</id><jobid>231e33a8-4dcd-4f7b-b390-3af3539f12fc</jobid></deployvirtualmachineresponse>

-----Original Message-----
From: Marcus Sorensen [mailto:shadow...@gmail.com] 
Sent: Monday, August 13, 2012 12:57 PM
To: cloudstack-dev@incubator.apache.org
Subject: Re: iptonetworklist, networkids

I was able to get the iptonetwork list running by using curl with the -g 
option, so apparently it has to do with how it's parsing/encoding the URL.  
This will be sufficient for my purposes, however, I think there is a bug in the 
ipaddress in combination with networkids, as there's no such encoding problem 
there.  Basically it assigns the IP but the VM deploy fails with an unknown 
reason, and I can see that the NIC created got the specified IP but is not set 
as default for the VM.
If you would be so kind as to test that in your latest, then I'll create a bug 
report for that. Perhaps that can just be deprecated in favor of the 
iptonetworklist if someone needs a specific IP.

Thanks

On Mon, Aug 13, 2012 at 1:35 PM, Jason Bausewein <jason.bausew...@tier3.com> 
wrote:
> I just tested the iptonetworklist parameter using an advanced zone setup with 
> xenserver 6.
>
> I was able to specify the private IP using the iptonetworklist.   The 
> instance was assigned the correct IP and could access the internet ok.
>
> I am running off master, but I don't see why this would not work in 3.0.2.  
> I'm sorry I can't test with 3.0.2, I'm using my development environment.
>
> Jason
>
> -----Original Message-----
> From: Marcus Sorensen [mailto:shadow...@gmail.com]
> Sent: Monday, August 13, 2012 9:37 AM
> To: cloudstack-dev@incubator.apache.org
> Subject: Re: iptonetworklist, networkids
>
> Awesome, thanks.
>
> On Sun, Aug 12, 2012 at 12:16 AM, Jason Bausewein <jason.bausew...@tier3.com> 
> wrote:
>> Hi Marcus,  I could test it out on Monday and let you know the result.
>>
>> -----Original Message-----
>> From: Marcus Sorensen [mailto:shadow...@gmail.com]
>> Sent: Saturday, August 11, 2012 10:31 AM
>> To: cloudstack-dev@incubator.apache.org
>> Subject: Re: iptonetworklist, networkids
>>
>> Can anyone at least confirm for me if choosing your IP is supposed to work? 
>> I've tried it on both isolated and shared networks with the same result.
>>
>> Selecting the IP seems to really be the only way to rebuild an instance, no? 
>> Say we want to move it to another zone, restore from backup, or add a 
>> network interface. In all three of these we basically need to create a new 
>> instance from a template of the original and specify its original IP.
>>
>> On Fri, Aug 10, 2012 at 1:42 PM, Marcus Sorensen <shadow...@gmail.com> wrote:
>>> I should mention that if I remove 'ipaddress' from the networkids 
>>> version, then it works. That's the only thing that works, though.
>>>
>>> On Fri, Aug 10, 2012 at 1:24 PM, Marcus Sorensen <shadow...@gmail.com> 
>>> wrote:
>>>> Hi all,
>>>>   I'm testing the ability to specify an IP address to use, and have 
>>>> run into a few issues. I'm running 3.0.2 off of the website.
>>>>
>>>> If I use iptonetworklist,  I never even get the network I want. It 
>>>> creates a new private source nat network or uses the default one 
>>>> currently existing for the account. Doesn't complain though, it's 
>>>> as though it doesn't even see the parameters.
>>>>
>>>> If I use networkids, and specify an ipaddress, the resulting VM is 
>>>> in an error state. Looking at the VM, the resulting NIC is not set 
>>>> to default, and the job error code says "errortext Resource 
>>>> [Host:91] is
>>>> unreachable: Host 91: Unable to start instance due to null 
>>>> /errortext "
>>>>
>>>> Am I doing something wrong?
>>>>
>>>> Here is an example of iptonetworklist:
>>>>
>>>> ?php
>>>>
>>>> $curl_parameters = array(
>>>>  'command' => 'deployVirtualMachine',  'serviceofferingid' => 
>>>> '13ccbfab-66f5-4be3-86bf-d2d7bc67f117',
>>>>  'templateid' => '3556a6f7-c3e1-46d4-ad73-1e7b3c721d87',
>>>>  'zoneid' => '5f8e5844-f744-43fc-bacf-e316a65eab15',
>>>>  'displayname' => 'marcustestb',
>>>>  'name' => 'marcustestb',
>>>>  'iptonetworklist[0].ip' => '67.11.4.232', 
>>>> 'iptonetworklist[0].networkid' => '4564ca5f-2711-45b2-a2f4-9f2a20d97ce1'
>>>> );
>>>>
>>>> $curl_options = array(
>>>>   CURLOPT_URL  => "http://localhost:8096/client/api?";.
>>>> http_build_query($curl_parameters),
>>>>   CURLOPT_HTTP_VERSION => 1.0,
>>>>   CURLOPT_RETURNTRANSFER => true,
>>>>   CURLOPT_HEADER => false
>>>> );
>>>>
>>>> $curl = curl_init();
>>>> curl_setopt_array( $curl, $curl_options); $result = 
>>>> curl_exec($curl);
>>>>
>>>> if ( $error = curl_error($curl) )
>>>> echo 'ERROR: ',$error;
>>>>
>>>> curl_close($curl);
>>>> print $result;
>>>> ?
>>>>
>>>>
>>>>
>>>> and my example of networkids:
>>>>
>>>> ?php
>>>>
>>>> $curl_parameters = array(
>>>>  'command' => 'deployVirtualMachine',  'serviceofferingid' => 
>>>> '13ccbfab-66f5-4be3-86bf-d2d7bc67f117',
>>>>  'templateid' => '3556a6f7-c3e1-46d4-ad73-1e7b3c721d87',
>>>>  'zoneid' => '5f8e5844-f744-43fc-bacf-e316a65eab15',
>>>>  'displayname' => 'marcustestb',
>>>>  'name' => 'marcustestb',
>>>>  'ipaddress' => '67.11.4.232',
>>>>  'networkids' => '4564ca5f-2711-45b2-a2f4-9f2a20d97ce1'
>>>> );
>>>>
>>>> $curl_options = array(
>>>>   CURLOPT_URL  => "http://localhost:8096/client/api?";.
>>>> http_build_query($curl_parameters),
>>>>   CURLOPT_HTTP_VERSION => 1.0,
>>>>   CURLOPT_RETURNTRANSFER => true,
>>>>   CURLOPT_HEADER => false
>>>> );
>>>>
>>>> $curl = curl_init();
>>>> curl_setopt_array( $curl, $curl_options); $result = 
>>>> curl_exec($curl);
>>>>
>>>> if ( $error = curl_error($curl) )
>>>> echo 'ERROR: ',$error;
>>>>
>>>> curl_close($curl);
>>>> print $result;
>>>> ?

Reply via email to