7.5 attach Command

Use the --attach command to attach a disk image to a guest.

Syntax

vm_maker --attach --disk-image image_name --domain guest_name [ --no-reflink ]

Options

  • --disk-image: The name of the disk image you want to attach.

    • If you specify a disk image name that is not a fully-qualified file name (for example, shared.img), then the shared disk image must already exist in /EXAVMIMAGES on the KVM host. In this case, the shared disk image file is copied into the guest-specific directory at /EXAVMIMAGES/GuestImages/guest_name. By default, a reflink copy is created in the guest-specific directory, which references the shared image file in /EXAVMIMAGES. To attach a shared disk image file without using a reflink, add the --no-reflink option. In this case, the image file in the guest-specific directory is a discrete copy of the image file in /EXAVMIMAGES.

    • If you specify a fully-qualified disk image name in a guest-specific directory (for example, /EXAVMIMAGES/GuestImages/guest01.example.com/pv2_vgexadb.img), then the disk image file must already exist in the specified location. In this case, the disk image file can only be attached to the guest identified in the file path (for example, guest01.example.com), and no additional copy occurs.

  • --domain: The name of the guest.
  • --no-reflink: Use this option to create a discrete copy in the guest-specific image directory of the shared image file (not a reflink). This option is ignored for non-shared image files.

Usage Notes

  • A KVM guest can have a maximum of 112 disks attached.