Skip to main content
NetApp virtualization solutions

Storage migration of VMs between storage classes in OpenShift Virtualization

Contributors banum-netapp

In OpenShift Virtualization, you can migrate a virtual machine's (VM) disks to a different storage class directly through the web console without deleting the VM. This process allows you to move either the entire VM storage or specific volumes.

The following steps outline how to migrate a VM's storage class:

  1. Ensure that the target storage class is properly configured and available in your OpenShift cluster. This includes having the necessary storage backend (e.g., NetApp ONTAP) set up and accessible.

    Show example

    trident backend configuration

    Storage Class configuration

  2. In the OpenShift Container Platform web console, navigate to the Virtualization perspective and select the VM you want to migrate.

    Show example

    VM

    VM disks

    VM and disks using OC CLI

  3. Click Actions→Migrate→Migrate Storage. Select the volumes to migrate and the target storage class, then click Migrate. The migration process will start and you can monitor the progress in the Events tab of the VM. Once the migration is complete, the VM's disks will be using the new storage class.

    Show example

    Migrate Storage

    Select Volumes

    Select Storage Class

    Migrate VM Storage

    Migration in progress

  4. After the migration is complete, you can verify that the VM's disks are now using the new storage class by checking the VM's details in the web console or using the OpenShift CLI.

    Show example

    Verify Storage Class

    Verify all objects using OC CLI

    ONTAP Volume name using OC CLI before migration

    Volume in ONTAP backend before migration

    nas-economy Volume after migration

    nas-economy qtree name in ONTAP backend after migration

    nas-economy qtree in ONTAP backend after migration