Configuring ephemeral disk support (VMware)
Using the IBM® Cloud Manager with OpenStack command-line interface, you can add ephemeral disks during the deployment process of a virtual machine.
About this task
Example
- Method 1: Specify the "--ephemeral" option when you create a flavor. For example, nova flavor-create –ephemeral SIZE_GB FLAVOR_NAME auto RAM DISK VCPUS. Then, deploy a virtual machine with this flavor. For example, nova boot –flavor FALVOR_ID –image IMAGE INSTANCE_NAME.
- Method 2: Specify the block device information when you deploy a virtual machine, "--block-device" option with detailed keys and values. For example, nova boot –flavor FALVOR_ID –image IMAGE -block-device source=blank, dest=local, format=ext4, size=2, bus=ide, type=disk INSTANCE_NAME. The flavor that is used in this situation also needs a flavor with ephemeral, such as the flavor used in step 1.
You can also add disks when you resize the virtual machine.
You can choose to resize a virtual machine from no-ephemeral-disk status
to with-ephemeral-disk status. Likewise, you can
resize a virtual machine from with-ephemeral-disk status
to no-ephemeral-disk status. For example:
- Deploy a virtual machine with no ephemeral disk:
- Create a flavor without ephemeral disk.
nova flavor-create SIZE_GB FLAVOR_NAME auto RAM DISK VCPUS - Check the flavor that is created. The ephemeral is "0" in
the list.
nova flavor-show FLAVOR_ID - Deploy the virtual machine.
nova boot –flavor FLAVOR_ID –image IMAGE_ID INSTANCE_NAME
- Create a flavor without ephemeral disk.
- Resize a virtual machine from no-ephemeral-disk status
to with-ephemeral-disk status:
- Create a flavor with ephemeral disk.
nova flavor-create –ephemeral SIZE_GB FLAVOR_NAME auto RAM DISK VCPUS - Resize the virtual machine that is created in last step to an
ephemeral disk.
nova resize INSTANCE_NAME
- Create a flavor with ephemeral disk.
- Confirm the resize operation in the previous step.
nova resize-confirm INSTANCE_NAME - Check that the instance changed to one with ephemeral disk. Use
the following command to see that the flavor details changed to the
size you specified (SIZE_GB).
nova show INSTANCE_NAME
Note:
- If you use block device information, multiple ephemeral disks are supported.
- You can add ephemeral disks to virtual machine disks (VMDK) or when you deploy image templates.
- You can resize one ephemeral disk only.
Restriction: After the ephemeral disk
is attached to the VM, you must create partitions and format the file
system (such as ext3) before the disks can be used
to store data.