Manage Virtual Server Disks

Virtual server storage is provided by disks. A disk is a partition of a data store that is allocated to a specific virtual server. Disks can be assigned as standard or swap disks (there are no swap disks for Windows-based templates). They can also be set as primary (that is, the disk from which an OS will boot).

Managing disks for the entire cloud is handled through the Control Panel's Settings menu. Disks for individual virtual servers are managed through the Control Panel's Virtual Servers menu, where you can:

Do not create multiple partitions on one disk for virtual servers. OnApp Control Panel supports only one partition per disk. In cases when you change disk partition, the CP might loose control of such a disk and the VS associated with it. If required, create additional disks instead.


Add Disks to Virtual Servers



Adding a disk to a virtual server will require that VS should be rebooted. If a VS is running when you try to add a new disk to it, you'll be asked to confirm the reboot. To add a disk to a virtual server:

  1. Go to your Control Panel's Virtual Servers menu.
  2. Click a VS's label to open its details screen.
  3. Click the Storage tab > Disks.
  4. Click the "+" button  or the Create Disk button.
  5. Fill in the details:

    • Specify disk label.
    • Choose the data store to create a disk on from the drop-down list.
    • Move the slider to the right to specify the desired disk size.

      • The disk size should not exceed 2 TB when a new disk is added. You can later resize the disk if you need it to be larger than 2 TB.
      • Resizing disks to a value larger than 2 TB is not supported for Windows VSs and all VSs on KVM.
      • OnApp provides support only for the MS-DOS partition table. If your disk size exceeds 2 TB, the MS-DOS partition table can be changed to GUID Partition Table (GPT) from inside a virtual server and extended to more than 2 TB. However, such disks will be partially manageable by OnApp and the subsequent resizing operations will not be supported anymore and could lead to data loss.

    • Move the Hot Attach slider to the right if you want to enable the hot adding of a disk. In this case, a virtual server is not stopped when the disk is added.

      To run hot attach, a virtual server template should support VirtIO virtualization. The hot attach option is available only on KVM compute resources based on CentOS 6.x/7.x for virtual servers with VirtIO support.

    • Move the Swap Space slider to the right if this disk is swap space.
    • Move the Require Format Disk slider to the right if this disk requires formatting.

    • Move the Mounted slider to the right if the disk should be added to Linux or FreeBSD FSTAB (for Linux/FreeBSD virtual servers).

    • Specify its mount point. The maximum length of a Mount Point is 256 characters. Spaces are not allowed. No more than one slash is allowed. If the mount point is not specified the default mount point will be used:  

      /mnt/onapp-disk-#{disk.identifier}
    • Indicate the file system  - ext3, ext4 or xfs - for Linux based VS.
  6. Click the Add Disk button to finish.

Restrictions:

  • If you choose a Solidfire data store, the minimum disk size will be regulated by Solidfire Data Store Zone settings.
  • If virtual server and the Control Panel server belong to different networks, the hot attach transaction will fail.
  • If an additional disk has been created without the Require format disk option and formatted/partitioned in another way, resize disk action may work incorrectly. Use the Require format disk option when creating an additional disk, otherwise, use disk resize option at your own risk.
  • Make sure to enable Require format disk option when you add a new VS disk. Otherwise taking normal backups for your additional disk might fail.
  • To be able to take incremental backups for virtual server’s disk, you must mount this disk to FSTAB (either Linux or FreeBSD) and specify the proper mount point manually.
  • You cannot back up Swap disks.
  • When you add a new disk to a virtual server, it automatically becomes available to that server.



Edit Virtual Server Disks



Primary and Swap disks

For primary and swap (Linux, FreeBSD) disks you can only change the label and size.
You can resize the disks when you need. The resize will fail if your current usage is greater than the new size you request. Note that any changes to the disk size will lead to a reboot of your VS.

To change the disk size:

  1. Go to your Control Panel > Virtual Servers menu.
  2. Make sure your virtual server is powered off and click the VS label.
  3. Click the Storage tab > Disks.
  4. Click the Actions button next to the target disk and then click Edit.
  5. You can edit the disk label and size in GB.
  6. Click the Save Disk button. 
  • It is recommended to take a backup of a virtual server before editing the VS disk. In case of any issues during the VS disk editing, you will be able to restore the VS from the backup.
  • You cannot resize a disk that uses GUID Partition Table (GPT).
  • You cannot decrease the size of the Integrated Storage data store disks.
  • You cannot decrease the disk size for Windows-based and FreeBSD-based virtual servers. Only the increase disk size option is available. 
  • You cannot resize the primary disk for FreeBSD-based virtual servers. 
  • Decreasing disk size for Linux-based virtual servers may lead to filesystem inconsistencies. Make sure you have current backups before proceeding.
  • If the disk file system can not be detected (disk has more than one partition or some special partition table/file system), you can only increase disk physical volume size.
  • If you start the disk resize and then decide to cancel it, there may be complications such as the file system corruption.

New disks

For new disks - those which were added after the virtual server was created - you can edit the following:

Linux Windows FreeBSD
  • Label
  • Label
  • Label
  • Size
  • Size
  • Size
  • Require format 
  • Require format 
  • Require format
  • Mounted

  • Mounted
  • Mount point

  • Mount point
  • File system




Migrate Virtual Server Disks



OnApp allows hot and cold migration of virtual server disks:

  • Hot migration - the migration of disks between compute resources that share common data stores (or data store zones)
  • Cold migration - the migration of disks between compute resources with local storage or across compute zones

You can migrate disks of your virtual servers to other data stores, which are allocated to the same Compute resource. Unlike VS migration – disk migration requires the reboot of the VS (despite the template it is based on).

  • The hot migration will work only when the VS is running on CentOs 7 KVM compute resources, and they can be migrated only to CentOs 7 KVM compute resources.
  • The hot migration option appears only if the VS is online and your Quick Emulator (QEMU) version is later than 2.6

To migrate a disk:

  1. Go to your Control Panel's Virtual Servers menu.
  2. Click the label of your virtual server to open its details screen.
  3. Click the Storage tab > Disks.
  4. Click the Actions button next to the disk you want to move to another data store, then click the Migrate button.
  5. On the screen that appears, select the following options: 

    • Type - select the cold or hot migration type

    • Data store - select the target data store to migrate the disk

  6. Click the Start Migrate button. 


  • It is recommended to take a backup of a virtual server before migrating the VS disk. In case of any issues during VS disk migration, you will be able to restore the VS from the backup.
  • You can only migrate disks to data stores in data store zones assigned to your bucket. 
  • You cannot migrate a disk to a data store with less capacity than the disk size.
  • Integrated Storage disks cannot be migrated if they have snaphots.
  • If you move an 850GB disk between aggregates with 10GB actual usage, the 'dd' image of the local volume manager will take 850GB space, because the entire local volume manager is copied, includingzero 'dspace which may not be able to be recovered.
  • If required, you can change the block size which is used during disk migration at Control Panel > Settings > Configuration by editing the Block Size (MB) parameter.



Assign Disk to VS



You can temporarily assign a disk to another virtual server that has the same data store in use. The disk will be attached to the target VS, but it is necessary to reboot the target VS and mount the disk manually to make it available. Later you can re-assign the disk back to the primary VS at any appropriate moment.

  • Ensure that the Assign any disk to VS/Assign own disk to VS permissions are on before assigning disk to another VS. For more information refer to the List of all OnApp Permissions section of this guide.
  • Assigning disk functionality is not applicable for swap disks.
  • The target VS owner should be the same as for the source VS.

  • Both target and source VSs cannot be deleted as soon as the disk is assigned to a new VS. To delete target and source VSs, as well as the disk, it is required to re-assign a disk to a  source VS.


To assign a disk to another VS:

  1. Go to your Control Panel's Virtual Servers menu.
  2. Click the label of a virtual server to open its details screen.
  3. Click the Storage tab > Disks.
  4. Click the Actions button next to the disk you want to assign to another VS, then click the Assign to VS button.
  5. On the screen that appears, select a target VS from a drop-down box.

  6. Click Assign. 

    Be aware, that the source VS will be automatically powered off after assigning a disk to another VS.

To re-assign the disk back to the primary VS:

  1. Go to your Control Panel's Virtual Servers menu.
  2. Click the label of a virtual server to open its details screen.
  3. Click the Storage tab > Disks.
  4. Click the Actions button next to the disk you want to reassign to source VS, then click the Assign back button. Confirm the action.

    If the target VS is running on XEN compute resource, it will be automatically powered off after re-assigning a disk back to the source VS.

Delete Virtual Server Disks



To delete a disk:

  1. Go to your Control Panel's Virtual Servers menu.
  2. Make sure your virtual server is powered off, then click its label to open its details screen.
  3. Click the Storage -> Disks tab.
  4. Click the Actions button next to the disk you want to delete, then click Delete.
  5. In the pop-up window, move the Force Reboot slider to the right, then select the VS shutdown type.
  6. Move the Required Startup slider to the right to start up the VS automatically after the network is rebuilt.

    Steps 5 and 6 apply to disks of VSs that are on.

  7. Click the Destroy Disk button.

This will schedule the "destroy disk" transaction.