osc compute server resize
Resizes a server.
Specify the resize
action in the request body.
Preconditions
You can only resize a server when its status is ACTIVE
or SHUTOFF
.
If the server is locked, you must have administrator privileges to resize the server.
Asynchronous Postconditions
A successfully resized server shows a VERIFY_RESIZE
status and finished
migration status. If the cloud has configured the resize_confirm_window option of the Compute service to a positive value, the Compute service automatically confirms the resize operation after the configured interval.
Normal response codes: 202
Error response codes: badRequest(400), unauthorized(401), forbidden(403), itemNotFound(404), conflict(409)
Usage: osc compute server resize [OPTIONS] --flavor-ref <FLAVOR_REF> <ID>
Arguments:
<ID>
— id parameter for /v2.1/servers/{id}/action API
Options:
-
--flavor-ref <FLAVOR_REF>
— The flavor ID for resizing the server. The size of the disk in the flavor being resized to must be greater than or equal to the size of the disk in the current flavor.If a specified flavor ID is the same as the current one of the server, the request returns a
Bad Request (400)
response code. -
--os-dcf-disk-config <OS_DCF_DISK_CONFIG>
— Controls how the API partitions the disk when you create, rebuild, or resize servers. A server inherits theOS-DCF:diskConfig
value from the image from which it was created, and an image inherits theOS-DCF:diskConfig
value from the server from which it was created. To override the inherited setting, you can include this attribute in the request body of a server create, rebuild, or resize request. If theOS-DCF:diskConfig
value for an image isMANUAL
, you cannot create a server from that image and set itsOS-DCF:diskConfig
value toAUTO
. A valid value is:AUTO
. The API builds the server with a single partition the size of the target flavor disk. The API automatically adjusts the file system to fit the entire partition. -MANUAL
. The API builds the server by using whatever partition scheme and file system is in the source image. If the target flavor disk is larger, the API does not partition the remaining disk space.
Possible values:
auto
,manual