Assigning volumes to virtual machines

After you create a volume, you can assign it to a virtual machine.

Before you begin

You must be assigned System level, Cloud group administration role with permission to View all cloud resources (Read-only permission) to complete these steps.

About this task

Complete the following procedure from the console. Note that a volume can be assigned to only one virtual machine at a time.
Important:
  • You cannot attach a volume to a virtual machine if a snapshot is in place. You must first delete the snapshot.
  • In most cases, snapshots can be created while volumes are attached.

Procedure

  1. Click Patterns > Manage > Virtual Machines.
  2. From the list of available virtual machines, select the one to which you want to assign the volume.
  3. In the Volume section, select the volume from the menu list.
  4. Click the refresh icon to see when the volume is successfully assigned.
    Note: Block volume attached to a virtual machine in a pattern instance is sometimes not discovered. To discover the attached block volume, do these steps:
    1. Log in to the virtual machine.
    2. Rescan the SCSI bus to see the device with the following command:
      echo "- - -" > /sys/class/scsi_host/host<x>/scan
      You must run this command for all host directories under /sys/class/scsi_host/.

      After the rescan, a new device is seen under /dev/sd<n> (for example, /dev/sdb).

    3. Manually run the mount, unmount, or the refresh script commands, which are at plugin.com.ibm.maestro.agent/plugin/parts/agent/scripts/AGENT.