[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-API] XEN-XAPI - API Specification documentation



That's a pain that the api isn't fully documented.  Coming back to my
original question: I have a third party application (cloudstack) that
is receiving an error when communicating when xen using xapi.  I am
able to capture the calls that the application is making to xen, but
it seems as though there isn't a way for me to manually verify the
values being populated by the application so that I can determine the
root cause of my error.

At this point, it probably makes sense for me to re-post my question -
rather than asking for the API documentation, I'll focus on the
particular issue that I have.

Many thanks,

Chris



On Thu, Apr 3, 2014 at 10:57 PM, David Bomba <turbo124@xxxxxxxxx> wrote:
> I've had a look back through and it looks like they have cleaned up the docs
> to match the new style.
>
> Regardless, we use something like this to create the VM shell using
> VM.create
>
>
>
>  $aVM_cfg = array(
>                    "name_label"=> "$vm_name",
>                    "name_description"=>"$vm_description",
>                    "user_version"=> "300",
>                    "affinity"=>NULL,
>                    "is_a_template"=> false,
>                    "auto_power_on"=> true,
>     //                "memory_dynamic_max"=>"$memory",
>     //                "memory_static_max"=>"$memory",
>                     "memory_static_min" => "$memory",
>                    "memory_static_max" => "$memory",
>                    "memory_dynamic_min" => "$memory",
>                    "memory_dynamic_max" => "$memory",
>                    "VCPUs_params" => array(""=>""),
>                    "VCPUs_max" => "$cpu",
>                     "VCPUs_at_startup"=>"$cpu",
>                     "actions_after_shutdown" => "destroy",
>                    "actions_after_reboot" => "restart",
>                    "actions_after_crash" => "restart",
>                     'PV_bootloader' => 'pygrub',
>                    "PV_bootloader_args" => "$pv_boot_args",
>                     'PV_kernel' => '',
>                    "PV_args" => "$pv_args",
>                    'PV_legacy_args'=>'',
>                    'HVM_boot_policy'=>'',
>                    'HVM_boot_params'=>array(''=>''),
>                    'platform'=>
> array('nx'=>'FALSE','acpi'=>'true','apic'=>'true','pae'=>'true','viridian'=>'true'),
>                    'other_config'=> array(''=>''),
>                    'recommendations'=>'',
>                    'PV_ramdisk' => '',
>                     "HVM_boot" => "",
>                    "platform_std_VGA" => false,
>                    "platform_serial" => "",
>                    "platform_localtime" => false,
>                    "platform_clock_offset" => false,
>                    "platform_enable_audio" => false,
>                    "PCI_bus"=> ""
>                        );
>
>
>                     $new_vm_shell = VM.create($aVM_cfg);
>
>
> This returns an object reference which can then be further used to create
> VIF's / attach VBDs etc etc.
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> On 4 April 2014 08:21, chris snow <chsnow123@xxxxxxxxx> wrote:
>>
>> Hi David, do you have a link you could share?
>>
>> I've just looked through some of the older docs and couldn't find any
>> more details for a VM.create method.
>>
>> Many thanks,
>>
>> Chris
>>
>> On Thu, Apr 3, 2014 at 10:13 PM, David Bomba <turbo124@xxxxxxxxx> wrote:
>> > VM.create is definitely a valid constructor to create a VM, there is
>> > some
>> > assumed knowledge in the later API documentation, which is prefaced
>> > briefly
>> > at the bottom of the main page.
>> >
>> >  In the old 6.0 documentation these constructors are fleshed out in
>> > detail a
>> > little more.
>> >
>> >
>> > On 4 April 2014 08:05, Olivier Lambert <lambert.olivier@xxxxxxxxx>
>> > wrote:
>> >>
>> >> I'm not a CloudStack expert, I can't tell. But I do know XenServer,
>> >> Xe-CLI and documentation talk about cloning then provisioning as the
>> >> way to create a new VM. Otherwise, XAPI doc tells that every class had
>> >> a constructor (usually called "create")[1]. That's why it's possible
>> >> VM.create exists, but it's not documented at all (or I missed it
>> >> too).[2]
>> >>
>> >>
>> >> That's why for Xen Orchestra, we choose to documented way.
>> >>
>> >> [1]: http://docs.vmd.citrix.com/XenServer/6.2.0/1.0/en_gb/api in
>> >> "Classes, Fields and Messages" paragraph
>> >> [2]: Maybe some XAPI people here can enlighten us?
>> >>
>> >> On Thu, Apr 3, 2014 at 10:41 PM, chris snow <chsnow123@xxxxxxxxx>
>> >> wrote:
>> >> > Hi Olivier,
>> >> >
>> >> > As can be seen in my gist, the XMLRPC method is:
>> >> > <methodName>VM.create</methodName>
>> >> >
>> >> > Are you saying that call gets mapped by the xen-xapi to a VM.clone
>> >> > call?
>> >> > If
>> >> > so, is there somewhere that documents the mappings from xmlrpc to
>> >> > other
>> >> > api
>> >> > calls?
>> >> >
>> >> > Btw, the gists are just some of the calls I captured between
>> >> > CloudStack
>> >> > and
>> >> > xen.
>> >> >
>> >> > Many thanks,
>> >> >
>> >> > Chris
>> >> >
>> >> > On 3 Apr 2014 21:30, "Olivier Lambert" <lambert.olivier@xxxxxxxxx>
>> >> > wrote:
>> >> >>
>> >> >> Hi Chris,
>> >> >>
>> >> >> You don't create directly a VM, you clone a template, then provision
>> >> >> it. Please take a look on Xen Orchestra project, we are exposing
>> >> >> XAPI
>> >> >> to the Web, there is a lot of examples of how to connect to the XAPI
>> >> >> (https://github.com/vatesfr/xo-server/)
>> >> >>
>> >> >> On Thu, Apr 3, 2014 at 8:31 PM, chris snow <chsnow123@xxxxxxxxx>
>> >> >> wrote:
>> >> >> > Hi Oliver, I hadn't seen the docs at that link - thank you.
>> >> >> >
>> >> >> > I was expecting to find a create method in the VM class [1], but
>> >> >> > there
>> >> >> > doesn't appear to be one defined, except on the Overview page?
>> >> >> > Where
>> >> >> > can I find what parameters VM.create accepts?
>> >> >> >
>> >> >> > Many thanks,
>> >> >> >
>> >> >> > Chris
>> >> >> >
>> >> >> > ---
>> >> >> > [1] http://docs.vmd.citrix.com/XenServer/6.2.0/1.0/en_gb/api/?c=VM
>> >> >> >
>> >> >> >
>> >> >> > On Thu, Apr 3, 2014 at 6:46 PM, Olivier Lambert
>> >> >> > <lambert.olivier@xxxxxxxxx> wrote:
>> >> >> >> Hi,
>> >> >> >>
>> >> >> >> Did you check here:
>> >> >> >> http://docs.vmd.citrix.com/XenServer/6.2.0/1.0/en_gb/api/ ?
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > --
>> >> >> > Check out my professional profile and connect with me on LinkedIn.
>> >> >> > http://lnkd.in/cw5k69
>> >> >
>> >> >
>> >> > _______________________________________________
>> >> > Xen-api mailing list
>> >> > Xen-api@xxxxxxxxxxxxx
>> >> > http://lists.xen.org/cgi-bin/mailman/listinfo/xen-api
>> >> >
>> >>
>> >> _______________________________________________
>> >> Xen-api mailing list
>> >> Xen-api@xxxxxxxxxxxxx
>> >> http://lists.xen.org/cgi-bin/mailman/listinfo/xen-api
>> >
>> >
>>
>>
>>
>> --
>> Check out my professional profile and connect with me on LinkedIn.
>> http://lnkd.in/cw5k69
>>
>> _______________________________________________
>> Xen-api mailing list
>> Xen-api@xxxxxxxxxxxxx
>> http://lists.xen.org/cgi-bin/mailman/listinfo/xen-api
>
>

_______________________________________________
Xen-api mailing list
Xen-api@xxxxxxxxxxxxx
http://lists.xen.org/cgi-bin/mailman/listinfo/xen-api


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.