Skip to main content

Best practices to create a VCS instance image

You can create TWSC VCS instance image in a variety of situations, but before creating, please perform the following tasks to ensure that the image will be effectively obtained:

  • Create an instance image after shutting down your instance. If the state of the instance is Ready and I/O is still available, it will take longer to create, so shutting down before creating the image will ensure a reasonable creation time.
  • If you have configured auto mount data disks to your instance, it is suggested to add "nofail" option after the configuration command before creating an image to ensure that the instance restored by the image can be started and connected normally.

How to shut down instances?

  • After connecting to your VCS instance via SSH, you can use the shutdown command to shut down the instance.
sudo shutdown
  • After shutdown is complete, the instance will be in the shutdown state.

info

For the relationship between instance state and billing, please refer to VCS instance lifecycle.


How to add the nofail option?

  • If you have configured auto mount data disks to your instance in the file /etc/fstab (e.g., /dev/vdb /mnt ext4 defaults)

  • Please add nofail after the original settings to avoid errors in mounting the data disks, causing the instance created with the image to fail to be started and connected normally. (e.g., ,nofail,x-systemd.device-timeout=1m)