79 Commits

Author SHA1 Message Date
Nicolas Vazquez
3c2af55d81 vmware: allow configuring appliances on the VM instance wizard when OVF properties are available (#3271)
Problem: In Vmware, appliances that have options that are required to be answered before deployments are configurable through vSphere vCenter user interface but it is not possible from the CloudStack user interface.

Root cause: CloudStack does not handle vApp configuration options during deployments if the appliance contains configurable options. These configurations are mandatory for VM deployment from the appliance on Vmware vSphere vCenter. As shown in the image below, Vmware detects there are mandatory configurations that the administrator must set before deploy the VM from the appliance (in red on the image below):

Solution:
On template registration, after it is downloaded to secondary storage, the OVF file is examined and OVF properties are extracted from the file when available.
OVF properties extracted from templates after being downloaded to secondary storage are stored on the new table 'template_ovf_properties'.
A new optional section is added to the VM deployment wizard in the UI:
If the selected template does not contain OVF properties, then the optional section is not displayed on the wizard.
If the selected template contains OVF properties, then the optional new section is displayed. Each OVF property is displayed and the user must complete every property before proceeding to the next section.
If any configuration property is empty, then a dialog is displayed indicating that there are empty properties which must be set before proceeding
image
The specific OVF properties set on deployment are stored on the 'user_vm_details' table with the prefix: 'ovfproperties-'.
The VM is configured with the vApp configuration section containing the values that the user provided on the wizard.
2019-08-09 16:14:46 +05:30
Paul Angus
e15c3112e4
Merge pull request #3248 from shapeblue/storage-offering-domains-zones
Enable service offerings to be scoped to domain(s) and zone(s)
2019-07-16 10:25:35 +01:00
Anurag Awasthi
9e6ee7c63e server: Add support for new heuristics based VM Deployement for admins (#3454)
Currently an admin can choose which host a VM is to be started on.
They should be able to 'override' the allocation algorthm to a greater
or lesser extent at will, and be able to choose the pod, cluster or host
that they wish a new VM to be deployed in.

DeployVirtualMachine API has been extended with additional, optional
parameters podid and clusterid that will be passed to and used in the
deployment planner, when selecting a viable host. If the user supplies
a pod, a suitable host in the given pod will be selected. If the user
supplies a cluster, a suitable host in the given cluster will be selected.

Based on the parameter supplied and on passing validation, the VM will
then be deployed on the selected host, cluster or pod.
2019-07-13 12:52:48 +05:30
Abhishek Kumar
d2e40c98a1 ui: filter offerings for zone while listing
Signed-off-by: Abhishek Kumar <abhishek.kumar@shapeblue.com>
2019-06-19 18:03:15 +05:30
Abhishek Kumar
c85b3e597a server: ability to create disk offerings for domain(s) and zone(s)
Allows creating storage offerings associated with particular domain(s) and zone(s). In create disk/storage offfering form UI, a mult-select control has been addded to select desired zone(s) and domain select element has been made multi-select.
createDiskOffering API has been modified to allow passing list of domain and zone IDs with keys domainids and zoneids respectively. These lists are stored in DB in cloud.disk_offering_details table with 'domainids' and 'zoneids' key as string of comma separated list of IDs. Response for create, update and list disk offering APIs will return domainids, domainnames, zoneids and zonenames in details object of offering.
listDiskOfferings API has been modified to allow passing zoneid to return only offerings which are associated with the zone.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2019-05-24 09:56:23 +05:30
Abhishek Kumar
2020bfb6a3 server: allows compute offering with or without constraints (#3245)
Problem: Custom compute offering does not allow setting min and max values for CPU and VRAM for custom VMs.

Root Cause: Custom compute offerings cannot be created with a given range of CPU number and memory instead it allows only fixed values.

Solution: createServiceOffering API has been modified to allow setting a defined range for CPU number and memory. Also, UI form for compute offering creation is provided with a new field named 'compute offering type’ with values - Fixed, Custom Constrained, Custom Constrained. It will allow the creation of compute offerings either with a fixed CPU speed and memory for fixed compute offering, or with a range of CPU number and memory for custom constrained compute offering or without predefined CPU number, CPU speed and memory for custom unconstrained compute offering.

To allow the user to set CPU number, CPU speed and memory during VM deployment, UI form for VM deployment has been modified to provide controls to change these values. These controls are depicted in screenshots below for custom constrained and custom unconstrained compute offering types.

Sample API calls using cmk to create a constrained service offering and deploying a VM using it,

create serviceoffering name=Constrained displaytext=Constrained customized=true mincpunumber=2 maxcpunumber=4 cpuspeed=400 minmemory=256 maxmemory=1024

deploy virtualmachine displayname=ConstrainedVM serviceofferingid=60f3e500-6559-40b2-9a61-2192891c2bd6 templateid=8e0f4a3e-601b-11e9-9df4-a0afbd4a2d60 zoneid=9612a0c6-ed28-4fae-9a48-6eb207af29e3 details[0].cpuNumber=3 details[0].memory=800

Signed-off-by: Abhishek Kumar <abhishek.kumar@shapeblue.com>
2019-05-23 11:47:53 +05:30
dahn
f6ecac42ac ui: reverse character replacements (#3260)
In the cloudstack UI fields get '<', '>' and '&' replaced by xml-entities
these are generic for all fields and hurt us in the case of userdata
this fix calls the existing method to reverse character replacements.
it also removes the ccs class that pretends to prevent special chars

Fixes #3202
2019-05-23 11:20:42 +05:30
Rohit Yadav
ca17b6a126 Merge branch '4.11': Fixes #2666 conditional template filter (#2669)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2018-05-24 13:01:23 +05:30
dahn
2fad5bea31 ui: Fixes #2666 conditional template filter (#2669)
This fixes issue of warning when deploying vm as non-root admin user account.
2018-05-24 12:59:57 +05:30
Rafael Weingärtner
5d9ae35506 Remove 'todb' in favor of 'encodeURIComponent'. (#2572)
While executing the find/replace, I found some blocks of duplicated code. Therefore, I extracted the duplicated part to an utils file, and then removed the duplicated blocks.
2018-04-16 13:44:27 +02:00
Abhinandan Prateek
64832fd70a CLOUDSTACK-4757: Support OVA files with multiple disks for templates (#2146)
CloudStack volumes and templates are one single virtual disk in case of XenServer/XCP and KVM hypervisors since the files used for templates and volumes are virtual disks (VHD, QCOW2). However, VMware volumes and templates are in OVA format, which are archives that can contain a complete VM including multiple VMDKs and other files such as ISOs. And currently, Cloudstack only supports Template creation based on OVA files containing a single disk. If a user creates a template from a OVA file containing more than 1 disk and launches an instance using this template, only the first disk is attached to the new instance and other disks are ignored.
Similarly with uploaded volumes, attaching an uploaded volume that contains multiple disks to a VM will result in only one VMDK to being attached to the VM.

FS: https://cwiki.apache.org/confluence/display/CLOUDSTACK/Support+OVA+files+containing+multiple+disks

This behavior needs to be improved in VMWare to support OVA files with multiple disks for both uploaded volumes and templates. i.e. If a user creates a template from a OVA file containing more than 1 disk and launches an instance using this template, the first disk should be attached to the new instance as the ROOT disk and volumes should be created based on other VMDK disks in the OVA file and should be attached to the instance.

Signed-off-by: Abhinandan Prateek <abhinandan.prateek@shapeblue.com>
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2018-01-10 22:10:41 +05:30
Remi Bergsma
333957f00f Merge release branch 4.6 to 4.7
* 4.6:
  CLOUDSTACK-6181: Add 'root disk size' field in instance wizard for KVM templates
2016-01-28 13:31:26 +01:00
Wei Zhou
3822be5a5c CLOUDSTACK-6181: Add 'root disk size' field in instance wizard for KVM templates
This commit includes three changes:
(1) Revert commit 13bf1ec5da9891eca98ef5dab61bf74b6db9530b to show the 'root disk size' field
(2) Set the default value from '1' to empty. This also changes the default value of customized service offerings from '1' to empty.
(3) show 'root disk size' field only when users choose a KVM template, as cloudstack supports deployvm with rootdisksize on KVM only.
2016-01-27 23:30:22 +01:00
Remi Bergsma
1056f3cb9b Merge pull request #937 from autotraderuk/sec-group-sorting
CLOUDSTACK-8976 - Sorting of security groupsSimple change to sort the security groups in alphabetical order within the instance creation wizard.
This makes it much easier to find a security group when the user is presented with a long list.

* pr/937:
  Sorting of security groups

Signed-off-by: Remi Bergsma <github@remi.nl>
2015-12-04 20:21:18 +01:00
Wei Zhou
552c08f0b4 [UI] change alert to ui dialog in response of instance wizard 2015-11-06 13:49:32 +01:00
atrbgithub
ff7a5bbd9b Sorting of security groups 2015-10-16 21:13:51 +01:00
Kevin Dierkx
471a02d6a4 Removed leading tabs from ui/scripts/*.js 2015-08-07 11:58:13 +02:00
Kevin Dierkx
2bdbaf453e Removed trailing whitespace from ui/scripts/*.js 2015-08-07 11:25:15 +02:00
Jessica Wang
ff62ccc13e CLOUDSTACK-8075: UI > Instances menu > Add Instance > Select template/ISO > "shared" tab > select a shared template, click Next button => fix error "unable to find matched template object". 2014-12-17 11:00:10 -08:00
Jessica Wang
1a8c85a7a8 CLOUDSTACK-8075: UI > Instances menu > Add Instance > Select template/ISO > add a new tab "shared" which will list shared templates/ISOs when being clicked. 2014-12-16 16:16:53 -08:00
Brian Federle
5f9e0fcd7e CLOUDSTACK-8075: Front-end support for shared templates/ISOs 2014-12-16 14:53:20 -08:00
Wei Zhou
19e99848c8 CLOUDSTACK-7882: SSH Keypair Creation/Selection in UI
Thanks Ilia Shakitko for the porting and testing.
2014-12-12 14:30:34 +01:00
Jean-Francois Vincent
068e508e3b Add the Userdata setting to the UI on VM creation step 2014-12-09 11:32:49 +01:00
Jessica Wang
f2fe127901 CLOUDSTACK-8023: UI > VM wizard > network > trigger event handler of event "cloudStack.module.instanceWizard.network.dataProvider" to get networkObjsToPopulate if module is enabled. 2014-12-08 17:13:09 -08:00
Jessica Wang
774394792e CLOUDSTACK-8023: UI > VM wizard > service offering > trigger event handler of event "cloudStack.module.instanceWizard.serviceOffering.dataProvider" to get serviceOfferingObjs if module is enabled. 2014-12-04 16:26:41 -08:00
Wei Zhou
ce2b2a1fc7 Deploy vm to specified host through Infrastructure -> Hosts -> <Select one> -> View Instances -> Add Instance 2014-12-01 14:47:06 +01:00
Jessica Wang
e92f429463 CLOUDSTACK-7910: UI > Instance Wizard > declare serviceOfferingObjs before using it. 2014-11-13 16:26:09 -08:00
Jessica Wang
d3af2de730 CLOUDSTACK-7661: UI > VM Wizard > Keyboard Language > send new parameter keyboard to deployVirtualMachine API call. 2014-10-08 15:02:16 -07:00
Jessica Wang
d0da107b7f CLOUDSTACK-7497: UI > VM Wizard > select template > reset local variable before retrieving selected template object. 2014-09-16 13:21:01 -07:00
Gabor Apati-Nagy
9f38fd6c9f CLOUDSTACK-6725: [OVS][UI] vm deployment wizard does not show all available zones in a region while deploying vm in a Regionlevel vpc 2014-09-11 12:00:42 -07:00
Gabor Apati-Nagy
3077510838 CLOUDSTACK-6722: [OVS][UI] Network created with StretchedL2Subnet is not available for vm deployement in other zones 2014-09-11 11:56:46 -07:00
Brian Federle
e8e496187c Instance wizard: Add 'deployVirtualMachine' event hook
For UI plugin development, add new event
'cloudStack.deployVirtualMachine'

-- This passes the wizard form data and all parameters that will be
   passed to deployVirtualMachine; allows plugin to extend data to pass
   additonal data automatically (i.e, custom form fields)
2014-08-26 13:37:11 -07:00
Brian Federle
e812b7551d Remove commented-out-code 2014-04-03 14:00:24 -07:00
Brian Federle
a82a1299ec WIP: Instance wizard UI: Support multi-disk offerings
Adds front-end support to instance wizard UI for service offerings
supporting multiple disks.

The UI changes will show if a list 'multipleDisks: []' is passed with
the disk offering data options.
2014-04-02 16:28:15 -07:00
Gabor Apati-Nagy
883d7f17f7 Value of Global parameter "custom.diskoffering.size.min" is not reflected in UI during new instance creation.
Added fields to /api and /server classes for CustomDiskOfferingMinSize
to be available in CapabilitiesResponse. Fixed UI code in Instance
Wizard to have this config value as the minimum selectable option when
we are in custom disk size mode.
2014-04-01 10:57:36 -07:00
Mike Tutkowski
d55c4dd804 CLOUDSTACK-6170 2014-03-14 23:47:20 -06:00
Mike Tutkowski
c427e8db1c CLOUDSTACK-6170 2014-03-07 15:38:50 -07:00
Jessica Wang
d71483f771 BUG-ID: CS-19426: UI > VPC > VM Wizard > change to send ipToNetworkList parameter instead of networkIds parameter to deployVM API.
Reviewed-by: Brian
2014-03-03 11:49:42 -08:00
Brian Federle
0d688fec73 VM wizard: Add specify IP field when in VPC flow 2014-03-03 10:52:53 -08:00
Jessica Wang
d5dc6aab61 CLOUDSTACK-6190: UI > VM Wizard > select network step > support specifying IP Address for every network. Change to use ipToNetworkList parameter instead of networkIds parameter of deployVM API. 2014-02-28 14:58:18 -08:00
Brian Federle
13bf1ec5da Disable root disk size field -- not supported in backend 2014-02-10 11:53:07 -08:00
Jessica Wang
3f359bb641 CLOUDSTACK-5889: UI > VM Wizard > corresonding UI change for new change of deployVirtualMachine API (that customparameter parameter has been renamed) 2014-01-16 14:02:11 -08:00
Jessica Wang
2cbaf04b97 CLOUDSTACK-4738: UI > VM Wizard > deployVM API has been changed to take in one new parameter CUSTOM_PARAMETERS instead of 3 parameters CPU_NUMBER/CPU_SPEED/MEMORY. Here is corresponding UI change. 2013-12-03 13:12:46 -08:00
Jessica Wang
856703cc1c CLOUDSTACK-4758: UI > Instance Wizard > (1) pass cpuNumber, cpuSpeed, memory to API when custom area is shown (i.e. when selected compute offering is dynamic).
(2) pass rootDiskSize to API when custom area is shown (i.e. when selected item in step 2 is a template).
2013-10-31 13:56:42 -07:00
Jessica Wang
1d1f585079 CLOUDSTACK-4758: UI > VM wizard > step 2 > show Root Disk Size field when listing is templates, hide Root Disk Size field when listing is ISOs. 2013-10-29 15:22:10 -07:00
Brian Federle
f0a8aa7f5e CLOUDSTACK-4738: VM wizard: Add custom fields for compute offering 2013-10-29 13:29:13 -07:00
Brian Federle
1f0dd7cc36 CLOUDSTACK-4931: Instance wizard: use fn to hide/show template root size 2013-10-23 09:58:38 -07:00
Brian Federle
43b18025e3 CLOUDSTACK-4758: Add 'root disk size' field
Add 'root disk size' slider to instance wizard UI, under select
template/iso, if the selected template's size is able to be customized.
2013-10-22 11:45:18 -07:00
Jessica Wang
fc202bcfdd CLOUDSTACK-4302: UI > VM wizard > affinity group step > if selected zone is dedicated, pre-select ExplicitDedication affinity group and make it non-editable. 2013-08-14 17:47:44 -07:00
Brian Federle
7d89418475 CLOUDSTACK-4302: Instance wizard: Selected affinity group is readonly
If adding an instance from affinity group VM list view, make that
affinity group non-editable in 'select affinity group' step to keep
context.
2013-08-13 14:36:28 -07:00