Hi Mike, all, While we discuss and update the apidocs on the website that Daan has referred in previous reply. You can use cmk [1] to sync and get latest APIs discovered for your CloudStack env and use the "<api name> -h" to get latest docs. For example:
> deploy virtualmachine -h deployVirtualMachine: Creates and automatically starts a virtual machine based on a service offering, disk offering, and template. This API is asynchronous. Required params: serviceofferingid, templateid, zoneid, API Params Type Description ========== ==== =========== account string an optional account for the virtual machi ne. Must be used with domainId. affinitygroupids list comma separated list of affinity groups i d that are going to be applied to the vi rtual machine. Mutually exclusive with a ffinitygroupnames parameter affinitygroupnames list comma separated list of affinity groups n ames that are going to be applied to the virtual machine.Mutually exclusive with affinitygroupids parameter bootintosetup boolean Boot into hardware setup or not (ignored if startVm = false, only valid for vmwar e) bootmode string Boot Mode [Legacy] or [Secure] Applicable when Boot Type Selected is UEFI, otherw ise Legacy only for BIOS. Not applicable with VMware, as we honour what is defin ed in the template. boottype string Guest VM Boot option either custom[UEFI] or default boot [BIOS]. Not applicable w ith VMware, as we honour what is defined in the template. clusterid uuid destination Cluster ID to deploy the VM t o - parameter available for root admin o nly copyimagetags boolean if true the image tags (if any) will be c opied to the VM, default value is false customid string an optional field, in case you want to se t a custom id to the resource. Allowed t o Root Admins only datadiskofferinglist map datadisk template to disk-offering mappin g; an optional parameter used to create additional data disks from datadisk temp lates; can't be specified with diskOffer ingId parameter deploymentplanner string Deployment planner to use for vm allocati on. Available to ROOT admin only details map used to specify the custom parameters. 'e xtraconfig' is not allowed to be passed in details dhcpoptionsnetworklist map DHCP options which are passed to the VM o n start up Example: dhcpoptionsnetworkli st[0].dhcp:114=url&dhcpoptionsetworklist [0].networkid=networkid&dhcpoptionsetwor klist[0].dhcp:66=www.test.com diskofferingid uuid the ID of the disk offering for the virtu al machine. If the template is of ISO fo rmat, the diskOfferingId is for the root disk volume. Otherwise this parameter i s used to indicate the offering for the data disk volume. If the templateId para meter passed is from a Template object, the diskOfferingId refers to a DATA Disk Volume created. If the templateId param eter passed is from an ISO object, the d iskOfferingId refers to a ROOT Disk Volu me created. displayname string an optional user generated name for the v irtual machine displayvm boolean an optional field, whether to the display the vm to the end user or not. domainid uuid an optional domainId for the virtual mach ine. If the account parameter is used, d omainId must also be used. extraconfig string an optional URL encoded string that can b e passed to the virtual machine upon suc cessful deployment group string an optional group for the virtual machine hostid uuid destination Host ID to deploy the VM to - parameter available for root admin only hypervisor string the hypervisor on which to deploy the vir tual machine. The parameter is required and respected only when hypervisor info is not set on the ISO/Template passed to the call ip6address string the ipv6 address for default vm's network ipaddress string the ip address for default vm's network iptonetworklist map ip to network mapping. Can't be specified with networkIds parameter. Example: ipt onetworklist[0].ip=10.10.10.11&iptonetwo rklist[0].ipv6=fc00:1234:5678::abcd&ipto networklist[0].networkid=uuid&iptonetwor klist[0].mac=aa:bb:cc:dd:ee::ff - reques ts to use ip 10.10.10.11 in network id=u uid keyboard string an optional keyboard device type for the virtual machine. valid value can be one of de,de-ch,es,fi,fr,fr-be,fr-ch,is,it,j p,nl-be,no,pt,uk,us keypair string name of the ssh key pair used to login to the virtual machine macaddress string the mac address for default vm's network name string host name for the virtual machine networkids list list of network ids used by virtual machi ne. Can't be specified with ipToNetworkL ist parameter nicnetworklist map VMware only: used to specify network mapp ing of a vApp VMware template registered "as-is". Example nicnetworklist[0].ip=N ic-101&nicnetworklist[0].network=uuid podid uuid destination Pod ID to deploy the VM to - parameter available for root admin only projectid uuid Deploy vm for the project properties map used to specify the vApp properties. rootdisksize long Optional field to resize root disk on dep loy. Value is in GB. Only applies to tem plate-based deployments. Analogous to de tails[0].rootdisksize, which takes prece dence over this parameter if both are pr ovided securitygroupids list comma separated list of security groups i d that going to be applied to the virtua l machine. Should be passed only when vm is created from a zone with Basic Netwo rk support. Mutually exclusive with secu ritygroupnames parameter securitygroupnames list comma separated list of security groups n ames that going to be applied to the vir tual machine. Should be passed only when vm is created from a zone with Basic Ne twork support. Mutually exclusive with s ecuritygroupids parameter serviceofferingid uuid the ID of the service offering for the vi rtual machine size long the arbitrary size for the DATADISK volum e. Mutually exclusive with diskOfferingI d startvm boolean true if start vm after creating; defaulte d to true if not specified templateid uuid the ID of the template for the virtual ma chine userdata string an optional binary data that can be sent to the virtual machine upon a successful deployment. This binary data must be ba se64 encoded before adding it to the req uest. Using HTTP GET (via querystring), you can send up to 2KB of data after bas e64 encoding. Using HTTP POST(via POST b ody), you can send up to 32K of data aft er base64 encoding. zoneid uuid availability zone for the virtual machine [1] https://github.com/apache/cloudstack-cloudmonkey Regards. ________________________________ From: Daan Hoogland <daan.hoogl...@gmail.com> Sent: Thursday, October 14, 2021 12:25 To: Corey, Mike <mike.co...@sap.com> Cc: us...@cloudstack.apache.org <us...@cloudstack.apache.org>; dev@cloudstack.apache.org <dev@cloudstack.apache.org> Subject: Re: API Command Question for "networkids" I just checked the API description and I have been a bit misleading. The deployAsIs parameter is issued during template registration, not at deploytime. Look at the code for RegisterTemplateCmd. it is not described in https://cloudstack.apache.org/api/apidocs-4.15/apis/registerTemplate.html because it was introduced in 4.15.1 and the page describes 4.15.0. Normally we don't allow for API changes for minor versions but in this case it was a needed bug-fix. On Wed, Oct 13, 2021 at 9:30 PM Corey, Mike <mike.co...@sap.com> wrote: > Daan and others, > > Do you have an example of using the API "deployasis" parameter with VMware > deployment? > > Our developer colleague is having trouble finding a solution. > > Thanks! > > Mike > > -----Original Message----- > From: Corey, Mike <mike.co...@sap.com.INVALID> > Sent: Monday, October 4, 2021 12:31 PM > To: daan.hoogl...@gmail.com; us...@cloudstack.apache.org; > dev@cloudstack.apache.org > Subject: [CAUTION] RE: API Command Question for "networkids" > > Daan, > > I see from the documentation that this is a new API for ACS 4.15. Do you > have an example command line that I should inject this "deployasis" flag? > > Thanks! > > Mike > > -----Original Message----- > From: Daan Hoogland <daan.hoogl...@gmail.com> > Sent: Friday, October 1, 2021 11:18 AM > To: users <us...@cloudstack.apache.org> > Cc: dev@cloudstack.apache.org > Subject: Re: API Command Question for "networkids" > > Mike the old (your portal's) way should still work, on vmware you might > want to call it with `deployasis=false` > > On Fri, Oct 1, 2021 at 5:01 PM Corey, Mike <mike.co...@sap.com.invalid> > wrote: > > > That is one thing that caused me to raise this question. It isn't in the > > API documentation, but found in the ACS logs when a VM is created via > > CloudStack UI or API call from self-service portal. Our developer is > > porting over the code that works from the Self-Service portal deploying a > > VM to XenServer hypervisor. However, that same code does not configure > the > > network device correctly when deploying to VMware hypervisor. > > > > Example from ACS UI: > > > > > > > cmdEventType":"VM.CREATE","startvm":"true","nicnetworklist[0].network":"170d544c-ea5f-4627-98be-29202480aa4c","serviceofferingid":"eb796444-dec6-4b48-9552-de9a792a5b71","response":"json","ctxUserId":"6","displayname":"NetworkTest","name":"NetworkTest" > > > > Example from Self-Service API: > > > > > > > "cmdEventType":"VM.CREATE","networkids":"170d544c-ea5f-4627-98be-29202480aa4c","serviceofferingid":"fc57b518-b3d0-468c-8b2e-1704c88d763e","response":"json","ctxUserId":"8","displayname":"TVMNSQ000046" > > > > > > -----Original Message----- > > From: Daan Hoogland <daan.hoogl...@gmail.com> > > Sent: Friday, October 1, 2021 9:15 AM > > To: users <us...@cloudstack.apache.org> > > Cc: dev@cloudstack.apache.org > > Subject: Re: API Command Question for "networkids" > > > > Mike, I don't recognise the commands you talk about, `networkids` and > > `nicnetworklist`. Can you give links to APIs in [1], please? There are > some > > API that are not generic over hypervisors, but these should be well > > documented and really only very few. > > > > [1] https://cloudstack.apache.org/api/apidocs-4.15/ > > > > On Fri, Oct 1, 2021 at 2:27 PM Corey, Mike <mike.co...@sap.com.invalid> > > wrote: > > > > > Hello - sending again in hopes of getting some feedback on the API > > > question. > > > > > > Thanks! > > > > > > Mike > > > > > > From: Corey, Mike <mike.co...@sap.com.INVALID> > > > Sent: Monday, September 27, 2021 12:18 PM > > > To: dev@cloudstack.apache.org; us...@cloudstack.apache.org > > > Subject: [CAUTION] API Command Question for "networkids" > > > > > > Hi, > > > > > > Our self-service portal developers found that they cannot "port" code > > from > > > the current landscape running on XenServer with the new VMWare > landscape > > > recently built. There are some APIs that look to have changed and/or > are > > > specific to VMware hypervisors. > > > > > > The two APIs in question are the "networkids" and "nicnetworklist" > > > commands. The command API "networkids" works from the self-service > > portal > > > when deploying to XenServer; however that same line of code does NOT > > > configure the correct network settings (assigns to wrong guest network) > > > when deploying to a VMware hypervisor. > > > > > > Digging into the logs we found that when deploying a VM from the ACS UI > > to > > > VMware, the command "nicnetworklist" is now used when deploying to > VMware > > > hypervisor. > > > > > > 1 - Is there API command that is "hypervisor-agnostic" or can be used > > > against both XenServer and VMware? > > > 2 - The VMware API references a NIC ID of "8" > > > ("nicnetworklist[0].nic":"8",). Is this arbitrary or will each ACS > > > management server (or region, or zone) use a different ID? > > > > > > * This could be a problem if our self-service services multiple > > > regions/zones. > > > 3 - Is there a global setting or other hidden setting that can be set > so > > > that ONE API Command works against both XenServer and VMware? > > > > > > Many thanks! > > > > > > Mike > > > > > > > > > > > > > > > > > > Mike Corey > > > > > > Technology Senior Consultant, IT CS CTW Operation & Virtualization > > Service > > > US > > > > > > SAP AMERICA, INC. 3999 West Chester Pike, Newtown Square, 19073 United > > > States > > > > > > T +1 610 661 0905, M +1 484 274 2658, E mike.co...@sap.com<mailto: > > > mike.co...@sap.com> > > > > > > > > > [cid:image003.png@01D7B399.B29A8C00] > > > > > > > > > > > > > -- > > Daan > > > > > -- > Daan > -- Daan