VCS instance lifecycle
Actions performed on the VCS instances via portal or in the instance, such as create, stop, start, shut down, restart and delete, are closely related to instance states as well as instance resources, data, and billing. Actions also affects connection, image, load balancing, Auto Scaling, disk and other related services. In this document, we explain in detail the relationship between instance lifecycle, meanings, and billing of a VCS instance from its creation to its deletion.
- Actions and the transitions between VCS instance states:
- The relationship between instance state, state description and usage billing is shown in the following table:
Instance state | State description | Usage billing |
---|---|---|
Starting | Prepare to enter the Ready state.(1) When creating an instance: resources are allocated for instance initialization (2) When starting the instance in the Stopped state: the stopped instance is starting. (3) When starting the instance in the Shutdown state: the shutdown instance is starting. | Except (3) will be billed, (1) and (2) are not billed |
Ready | The initialization has been completed, and the instance can be connected and ready for use. | Billed |
Stopping | Instance resources are being released, preparing to enter in the Stopped state | Billed |
Stopped | Select STOP on the portal, and the instance enters the Stopped state (instance shutdown and computing resources have been released), and you can click start on portal again to re-allocate resources. | Not billed |
Shutdown | After executing the shutdown command in the instance, the instance enters the Shutdown state, and it can be restarted by selecting START on the portal. | Billed |
Queueing | The system is allocating resources . After obtaining the resources, the instance will enter Starting state. | Not billed |
Rebooting | The instance is in the process of rebooting and preparing to enter the Ready state. | Billed |
Deleting | The instance is in the process of being deleted and will be permanently deleted. | Billed until the instance is successfully deleted |
Create VCS instances
When you create a VCS instance, resources are allocated for the instance initialization. The instance enters the Starting
state, which is not ready for use.
When it enters Ready
state, you can perform the following actions:
- Connect to the instance
- Attach/detach the VDS data disks
- Create the instance image
- Assign/detach public IP
- Attach/detach the auto scaling and the load balancing
Stop a VCS instance
If you plan not to use the instance for a period of time and want to keep the resources, you can click STOP to shut down the instance and release resources. The instance will be in the Stopping
state and ready to change to the Stopped
state which the resources have been released. Under the Stopped
state, instance will no longer be billed.
- TWSC Portal
- TWCC CLI (TBD)
- Go to the VCS Instance Management page > select the instance > click STOP at the top.
- Or click next to the instance > click STOP.
- Or enter the VCS Instance Details page > click STOP at the top.
The operating restrictions after stopping are as follows.
- Connect and login
- Assign/detach public IP
- Attach/detach VDS Data Disk
- Create instance images
- Attach/detach Auto Scaling and Load Balancing Service
- Resources that will be released after the instance is stopped: GPU, CPU, vCPU, memory, Floating IP (New Floating IP will be acquired after the instance is started again).
- Resources that will be kept after the instance is stopped: OS disk, Data Disk, Auto Scaling, Load Balancing, Static IP. The above resources will be automatically attached back to the instance after the instance is started again.
- Except for the data in memory, which will be erased, all data stored in the instance will be reserved.
Please do not delete a VCS instance when it is in the Stopping
state, otherwise it will affect the system processing and cause and instance Error
.
Start a VCS instance (and reboot)
To resume and use a stopped instance, or to start an instance that has been shutdown, please click Start. The state of the instance will be Starting
in the process of reallocating resources, and prepare for entering the Ready
state again.
- TWSC Portal
- TWCC CLI (TBD)
- Go to the VCS Instance Management page > select the instance > click START at the top.
- Or click next to the instance > click START.
- Or enter the VCS Instance Details page > click START at the top.
Most stopped instances will be created on a new physical host when they are started again.
Restart a VCS instance
To reboot (turn off and then turn on) an instance in the Ready
state, please click Reboot. The state of the instance will be Rebooting
in the process of rebooting, and prepare for entering the Ready
state again.
- TWSC Portal
- TWCC CLI (TBD)
- Go to the VCS Instace Management page > select the instance > click REBOOT at the top.
- Or click next to the instance > click REBOOT.
- Or enter the VCS Instance Details page > click REBOOT at the top.
Unlike stopping instances, after rebooting the instances, except for erasing the memory data, resources are not released back to the resource pool (including floating IP), and the stored data are retained and can still be used after rebooting.
Shut down a VCS instance
After performing a shutdown, the instance will be in the Shutdown
state. In the Shutdown
state, the instance will continue to be billed.
TWSC portal and TWCC CLI do not support the shutdown function, please operate it in the instance:
- Linux instance: You can execute
sudo shutdown
orsudo poweroff -f
in the instance to shut it down - Windows instance: You can use
shutdown -s
, or click the shutdown button at the bottom left of the desktop to shut it down.
The operating restrictions after shutdown are as follows.
- Connect and login
- Assign/detach public IP
- Attach/detach VDS Data Disk
- Create instance images
- Attach/detach Auto Scaling and Load Balancing Service
Unlike stopping instances, after shutting down the instances, except for erasing the memory data, resources are not released back to the resource pool. The stored data are retained and can still be used after starting again.
Delete a VCS instance
To permanantly delete an instance and no longer use it again, please delete the instance.
Other considerations for deletion:
- The data in the operating system (boot) disk will also be permanently deleted. If you need to keep it, you can create an instance image.
- The data disk will be automatically unmounted and kept.
- TWSC Portal
- TWCC CLI
- Go to the VCS Instance Management page > click next to the instance > Click DELETE.
- Or go to the VCS Instance Details page > click DELETE at the top.
Command
twccli mk vcs -s # Instance's ID
twccli ls vcs # View result
Example
- Delete the VCS instance with ID
937651
, and check if it is deleted.
twccli rm vcs -s 937651
twccli ls vcs
- A user can only create and delete virtual computing entities 10 times in a minute.
- If Delete Protection is enabled, you cannot delete the resource directly, please disable it first and then delete it again.