Deploy VMs without volumes
Starting PowerVC 2.2.0, you can deploy virtual machines (VMs) without any boot volumes on an HMC or NovaLink host that provides you the capability to reserve compute properties. You can use the existing server create API along with additional properties to create the VM without volumes.
Create an image without any volume by using the image create API or from the PowerVC GUI. After the image is created, use the existing server create API to pass the image reference that points to the empty image.
Existing server create API
| Method | URI | Description |
|---|---|---|
|
POST |
|
Creates a server. |
Example of request body.
{
"server": {
"name": "Empty-Novalink-VM",
"imageRef": "9e032c7c-d2cd-46a7-be64-e8c011ea158d",
"availability_zone": ":9xxxxx9_1xxxxx",
# "flavorRef": <flavor id> # this or "flavor" can be passed
"flavor": {
"extra_specs": {
"powervm:min_vcpu": "1",
"powervm:proc_units": "1.00",
"powervm:max_vcpu": "2",
"powervm:max_mem": "10240",
"powervm:dedicated_proc": false,
"powervm:min_proc_units": "0.10",
"powervm:shared_proc_pool_name": "DefaultPool",
"powervm:uncapped": true,
"powervm:max_proc_units": "2.00",
"powervm:storage_connectivity_group": "55fe0531-7670-4a5b-ba82-699083b3bfdf",
"powervm:shared_weight": 128,
"powervm:ame_expansion_factor": "0.0",
"powervm:min_mem": "1024",
"powervm:availability_priority": 127,
"powervm:srr_capability": false
},
"ram": "1024",
"vcpus": "1",
"disk": "0"
},
"networks": [
{
"uuid": "3025be7e-de1c-4eda-be6d-938cac4acd68",
"fixed_ip": "9.114.x.x"
}
],
"max_count": 1,
"metadata": {
"dro_enabled": "False",
"arr_enabled": "False",
"attach_iso": "True" # if false, no ip configuration
}
}
}
Important:
- The block device mapping parameter is not passed in this server create API.
- The attach_iso parameter that is introduced in PowerVC 2.2.0 is an optional parameter. This deploys the VM, configures the IP, and loads the cloud-init package when the value is True. If the value is False, the IP is not configured. The default value is True.
- To avoid creating a virtual optical device, make sure to update the attach_iso parameter to False in the metadata attribute of the server create API request body.
Example of response body.
{
"server": {
"id": "1880e91d-df71-4720-a372-42a702b87798",
"links": [
{
"rel": "self",
"href": "https://9.x.x.x:8774/v2.1/0483974ff22140beb4c2934b58535a4a/servers/1880e91d-df71-4720-a372-42a702b87798"
},
{
"rel": "bookmark",
"href": "https://9.x.x.x:8774/0483974ff22140beb4c2934b58535a4a/servers/1880e91d-df71-4720-a372-42a702b87798"
}
],
"OS-DCF:diskConfig": "MANUAL",
"security_groups": [
{
"name": "default"
}
]
}
}
Response code
- Success: Accepted (202)
- Failure: Bad Request (400), Forbidden (403), Not Found (404)
Server details API
| Method | URI | Description |
|---|---|---|
|
GET |
/v2.1/<project-id>/servers/<server-id> |
Show server details. |
Example of response body.
{
"server": {
"id": "1880e91d-df71-4720-a372-42a702b87798",
"name": "Empty-Novalink-VM",
"status": "SHUTOFF",
"tenant_id": "0483974ff22140beb4c2934b58535a4a",
"user_id": "58ab90aa79234e51b4a2371eddee6445",
"metadata": {
"dro_enabled": "False",
"arr_enabled": "False",
"attach_iso": "true",
"no_volumes": "True",
"original_host": "9xxxxR9_13xxxxX",
"move_pin_vm": "false",
"powervc:vm_refcode": "time_stamp=09/13/2023 08:38:33,refcode=00000000"
},
"hostId": "26addd7256fa8fd988eec77dae75c2f382400ce021c723a73965ce54",
"image": {
"id": "9e032c7c-d2cd-46a7-be64-e8c011ea158d",
"links": [
{
"rel": "bookmark",
"href": "https://9.114.x.x:8774/0483974ff22140beb4c2934b58535a4a/images/9e032c7c-d2cd-46a7-be64-e8c011ea158d"
}
]
},
"flavor": {
"id": "874c54191310916df878f92381d91548",
"links": [
{
"rel": "bookmark",
"href": "https://9.x.x.x:8774/0483974ff22140beb4c2934b58535a4a/flavors/874c54191310916df878f92381d91548"
}
]
},
"created": "2023-09-13T08:38:38Z",
"updated": "2023-09-13T08:57:58Z",
"addresses": {
"net-2227": [
{
"version": 4,
"addr": "9.x.x.x",
"OS-EXT-IPS:type": "fixed",
"OS-EXT-IPS-MAC:mac_addr": "fa:99:93:53:f9:20"
}
]
},
"accessIPv4": "",
"accessIPv6": "",
"links": [
{
"rel": "self",
"href": "https://9.x.x.x:8774/v2.1/0483974ff22140beb4c2934b58535a4a/servers/1880e91d-df71-4720-a372-42a702b87798"
},
{
"rel": "bookmark",
"href": "https://9.x.x.x:8774/0483974ff22140beb4c2934b58535a4a/servers/1880e91d-df71-4720-a372-42a702b87798"
}
],
"OS-DCF:diskConfig": "MANUAL",
"OS-EXT-AZ:availability_zone": "Default Group",
"config_drive": "",
"key_name": null,
"OS-SRV-USG:launched_at": "2023-09-13T08:38:45.000000",
"OS-SRV-USG:terminated_at": null,
"OS-EXT-SRV-ATTR:host": "9xxxR9_13xxxX",
"OS-EXT-SRV-ATTR:instance_name": "Empty-Novalin-1880e91d-00000033",
"OS-EXT-SRV-ATTR:hypervisor_hostname": "90xxx9_1xxxAX",
"OS-EXT-SRV-ATTR:reservation_id": "r-ay47zgk8",
"OS-EXT-SRV-ATTR:launch_index": 0,
"OS-EXT-SRV-ATTR:hostname": "empty-novalink-vm",
"OS-EXT-SRV-ATTR:kernel_id": "",
"OS-EXT-SRV-ATTR:ramdisk_id": "",
"OS-EXT-SRV-ATTR:root_device_name": "/dev/sda",
"OS-EXT-SRV-ATTR:user_data": null,
"OS-EXT-STS:task_state": null,
"OS-EXT-STS:vm_state": "stopped",
"OS-EXT-STS:power_state": 4,
"os-extended-volumes:volumes_attached": [],
"host_status": "UP",
"locked": false,
"description": null,
"cpus": 1,
"root_gb": 0,
"ephemeral_gb": 0,
"launched_at": "2023-09-13T08:38:45.000000",
"vcpu_mode": "shared",
"vcpus": "1.00",
"min_vcpus": "0.10",
"max_vcpus": "2.00",
"min_cpus": 1,
"max_cpus": 2,
"avail_priority": 127,
"dedicated_sharing_mode": "",
"uncapped": true,
"shared_weight": 128,
"memory_mode": "dedicated",
"memory_mb": 1024,
"min_memory_mb": 1024,
"max_memory_mb": 10240,
"cpu_utilization": 0.0,
"memory_utilization": 0.0,
"vm_pg_in_rate": 0,
"vm_pg_out_rate": 0,
"vm_pg_swap_in_rate": 0,
"vm_pg_swap_out_rate": 0,
"desired_compatibility_mode": "default",
"current_compatibility_mode": "POWER9_Base",
"operating_system": "0.0.0.0.0.0",
"enable_lpar_metric": "false",
"srr_capability": false,
"ame_expansion_factor": 0.0,
"ppt_ratio": "1:4096",
"secure_boot": 0,
"persistent_mem_vol": {
"max_pmem_vols": 4
},
"srr_state": null,
"shared_proc_pool_name": null,
"shared_proc_pool_display_name": null,
"health_status": {
"id": "1880e91d-df71-4720-a372-42a702b87798",
"health_value": "OK",
"updated_at": "2023-09-13T08:58:57.930433",
"value_reason": []
},
"compliance_status": [
{
"status": "compliant",
"category": "resource.allocation"
}
],
"endianness": "big-endian",
"os_distro": "aix",
"storage_connectivity_group_id": "1234e91d-df56-7891-a123-22a333b12345"
}
}
Important: After the empty VM is deployed, the VM is in SHUT OFF status.
Response code
- Success: OK (200)
- Failure: Bad Request (400), Forbidden (403), Not Found (404)