apache / cloudstack

Apache CloudStack is an opensource Infrastructure as a Service (IaaS) cloud computing platform
https://cloudstack.apache.org/
Apache License 2.0
2.05k stars 1.1k forks source link

UI - Unable to create VM from ISO with custom disk offering #6447

Closed zap51 closed 2 years ago

zap51 commented 2 years ago
ISSUE TYPE
COMPONENT NAME
UI
CLOUDSTACK VERSION
4.17.0.0
CONFIGURATION
KVM, Advanced zone with no security groups
Primary Storage - RBD
Secondary Storage - NFS
OS / ENVIRONMENT
Management - Ubuntu Server 20.04; Hypervisor nodes - Ubuntu Server 20.04 LTS
Hypervisor - KVM
SUMMARY

UI throws the below error when trying to create a VM from the ISO, and only when selecting the "Custom" disk offering.

image

STEPS TO REPRODUCE
  1. Download any ISO into the secondary storage.

image

  1. Create a Virtual Machine from the ISO and choose disk offering with "Custom Disk Size".

image

image

  1. Select any other details like Networks, SSH Key pairs etc., and click "Launch Instance".

image

  1. The error appears in the notification section.

image

The Disk Offering specifications is the below.

image

EXPECTED RESULTS
The Virtual Machine to get created with user-specified disk size.
ACTUAL RESULTS

Threw

VM Creation failed. Volume size: -1GB is out of allowed range. Max: 1024 Min:1

image

boring-cyborg[bot] commented 2 years ago

Thanks for opening your first issue here! Be sure to follow the issue template!

nvazquez commented 2 years ago

Hi @zap51 - can you please try through the API specifying the rootdisksize parameter as well?

Example in cloudmonkey:

> deploy virtualmachine networkids=<NETWORKID> templateid=<ISOID> serviceofferingid=<OFFERINGID> diskofferingid=<CUSTOM_OFFERING_ID> zoneid=<ZONEID> hypervisor=<HW> size=<SIZE> rootdisksize=<SIZE>
zap51 commented 2 years ago

Hi @zap51 - can you please try through the API specifying the rootdisksize parameter as well?

Example in cloudmonkey:

> deploy virtualmachine networkids=<NETWORKID> templateid=<ISOID> serviceofferingid=<OFFERINGID> diskofferingid=<CUSTOM_OFFERING_ID> zoneid=<ZONEID> hypervisor=<HW> size=<SIZE> rootdisksize=<SIZE>

Sure @nvazquez. Will try this and post the results.

zap51 commented 2 years ago

@nvazquez The results through the API are below and is successful.

(cs-4.17.0.0) 🐱 > deploy virtualmachine networkids=bb0ab32f-b6a3-4f6a-a613-ad3e9bb1ef48 templateid=efd8c38f-36f4-48e1-9f81-84ae8e5801df serviceofferingid=232f42ef-3844-4b10-ab27-9656a56bc35a diskofferingid=c13cde39-351d-4e41-bd6e-75d432689666 zoneid=d5601a3e-ad22-4c60-af71-a5d6d03106ec hypervisor=KVM size=6 rootdisksize=6
{
  "virtualmachine": {
    "account": "admin",
    "affinitygroup": [],
    "cpunumber": 1,
    "cpuspeed": 1000,
    "created": "2022-06-08T18:21:19+0000",
    "details": {
      "rootdisksize": "6"
    },
    "diskofferingid": "c13cde39-351d-4e41-bd6e-75d432689666",
    "diskofferingname": "Custom",
    "displayname": "VM-39ba2f9e-2687-4d4c-bb2c-f0b2f52c6102",
    "displayvm": true,
    "domain": "ROOT",
    "domainid": "7b078fde-e698-11ec-b1ed-aa0844d5f780",
    "guestosid": "7b12be68-e698-11ec-b1ed-aa0844d5f780",
    "haenable": false,
    "hasannotations": false,
    "hostid": "8904c92b-f4c9-4800-b74e-08119a184468",
    "hostname": "cs-2",
    "hypervisor": "KVM",
    "id": "39ba2f9e-2687-4d4c-bb2c-f0b2f52c6102",
    "instancename": "i-2-50-VM",
    "isdynamicallyscalable": false,
    "isodisplaytext": "Endeavour OS ISO",
    "isoid": "efd8c38f-36f4-48e1-9f81-84ae8e5801df",
    "isoname": "Endeavour OS ISO",
    "jobid": "6fa5d761-2432-462d-aec4-46f97a2a0fd3",
    "jobstatus": 0,
    "lastupdated": "2022-06-08T18:21:25+0000",
    "memory": 1024,
    "name": "VM-39ba2f9e-2687-4d4c-bb2c-f0b2f52c6102",
    "nic": [
      {
        "broadcasturi": "vxlan://700005",
        "deviceid": "0",
        "extradhcpoption": [],
        "gateway": "172.16.5.1",
        "id": "a2ac399e-de54-4473-9a73-64fc3cfb30e9",
        "ipaddress": "172.16.5.86",
        "isdefault": true,
        "isolationuri": "vxlan://700005",
        "macaddress": "02:00:01:bc:00:06",
        "netmask": "255.255.255.0",
        "networkid": "bb0ab32f-b6a3-4f6a-a613-ad3e9bb1ef48",
        "networkname": "net",
        "secondaryip": [],
        "traffictype": "Guest",
        "type": "Isolated"
      }
    ],
    "osdisplayname": "Other Linux (64-bit)",
    "ostypeid": "7b12be68-e698-11ec-b1ed-aa0844d5f780",
    "passwordenabled": false,
    "pooltype": "RBD",
    "receivedbytes": 0,
    "rootdeviceid": 0,
    "rootdevicetype": "ROOT",
    "securitygroup": [],
    "sentbytes": 0,
    "serviceofferingid": "232f42ef-3844-4b10-ab27-9656a56bc35a",
    "serviceofferingname": "Medium Instance",
    "state": "Running",
    "tags": [],
    "templatedisplaytext": "Endeavour OS ISO",
    "templateid": "efd8c38f-36f4-48e1-9f81-84ae8e5801df",
    "templatename": "Endeavour OS ISO",
    "userid": "8ddf2175-e698-11ec-b1ed-aa0844d5f780",
    "username": "admin",
    "zoneid": "d5601a3e-ad22-4c60-af71-a5d6d03106ec",
    "zonename": "hpe-ec3"
  }
}

image

nvazquez commented 2 years ago

@zap51 thanks for confirming it, that is a workaround from the API. Another workaround from the UI is creating a fixed disk offering matching the expected disk size. This UI issue for custom disk offerings will be addressed on 4.17.1

zap51 commented 2 years ago

@nvazquez Thanks!