Virtual machine ref_code API
Virtual machine ref_code
is the metadata attribute to get the details of the virtual machine from hypervisor. This feature is
supported for the IBM® i and AIX® operating systems.
ref_code
update for IBM i
operating system is only supported for virtual machines on a NovaLink host.Rest API for ref_code metadata
Method | URI | Description |
---|---|---|
POST |
|
Updates the virtual machine |
GET |
|
Fetches updated metadata attribute of the virtual machine. |
Update metadata
This operation updates the metadata attribute of the virtual machine.
Request URI
POST https://<powervc
ip>/powervc/openstack/compute/v2.1/<tenant id>/servers/<server
id>/metadata
- Normal response code: OK (200)
- Error response code: Bad Request (400®), Forbidden (403), Not Found(404), Server Error (500)
Name | Style | Type | Description |
---|---|---|---|
|
body |
Boolean |
Update the |
{
"metadata": {
"powervc:vm_refcode_required": "true"
}
}
Name | Style | Type | Description |
---|---|---|---|
|
body |
Boolean |
Updates the |
|
body |
string |
Returns hostname of the virtual machine deployed. |
{
"metadata": {
"powervc:vm_refcode_required": "true",
"original_host": "9109RMD_1031CAT",
}
}
Get ref_code metadata for a virtual machine
This operation fetches updated metadata attribute of the virtual machine.
Request URI
GET: https://<powervc ip>/powervc/openstack/compute/v2.1/<tenant
id>/servers/<server id>/metadata
- Normal response code: OK (200)
- Error response code: Bad Request (400), Forbidden (403), Not Found(404), Server Error (500)
Name | Style | Type | Description |
---|---|---|---|
|
body |
Hexadecimal |
Updates Hexadecimal value. |
|
body |
string |
Shows state of the virtual machine. |
|
body |
string |
Timestamp for the ref_code |
powervc:vm_refcode_required |
body |
Boolean |
Updated ref_code parameter with |
{
"metadata": {
"powervc:vm_refcode": "000e",
"powervc:vm_led_code": "Surr_rebooting__________________",
"powervc:vm_refcode_query_ts": "20201014052153955450",
"powervc:vm_refcode_required": "true",
}
}