You can mount an ISO image to a virtual machine (VM). For example, you may need this to install your own operating system (OS). The ISO image can be uploaded from a public URL or a local computer.

If you install an OS on a VM from an ISO image, the following will not be available:

  • editing the password;
  • creating anonymized images;
  • running scripts.

To back up such a VM correctly, enter Virtual machines → select the VM → menu → VM parameters Fine-tuning settings Resources and limitsPartition to expansion and specify the partition where the root file system is located.

ISO images management

To connect an ISO image:

  1. Enter Virtual machines → select the VM →   menu → Mount ISO-image.
  2. Select a method for uploading the image:
    • Local file — select the image file in iso format on your local computer;
    • Image URL — enter the URL where the ISO image is available. The image can be available via HTTP(S) or FTP.
  3. If you are using an image from a local file, you can choose not to boot a VM from this image after connecting. To do this, disable the option Boot virtual machine from the ISO
  4. Specify Tags for the connected OS if this VM needs to run scripts. The script will run on the VM if at least one of its tags matches the OS tag.
  5. Click Upload image. If this is the first ISO image to be attached to this VM, it will be rebooted. After uploading, you can connect to the VM via VNC or SPICE. 

    To view the image upload process, click on the VM status. The upload indicator will open in the drawer. In this drawer, you can Cancel the download.

    If the ISO image is uploading from a local computer, the upload will be interrupted when the page is refreshed or closed in a browser.

To disconnect an ISO image:

  1. Enter Virtual machines → select the VM →   menu → Unmount ISO-image.
  2. Enable the OS has been reinstalled option if you have installed the OS from this ISO image.
  3.  Click Disconnect and restart. VMmanager will disconnect the ISO image and delete it. If the OS from the image was installed correctly, VMmanager will reboot the VM with the new operating system.

Upload manager

You can monitor and manage the process of uploading ISO images via the upload manager. To do this, click the icon in the right-hand menu.

Possible actions:

  • Cancel — cancel the image upload;

  • Delete — delete the upload record from the list;

  • Remove the completed uploads — delete all entries of completed uploads from the list.

Work logic

Access restrictions

Uploading an ISO image from a local computer may fail if the platform restricts access to users from certain IP addresses. To allow users to upload ISO images from a local computer, enable access to the platform from IP address in the user group settings. Read more in the Restricting user access to the platform.

Keeping ISO images

ISO image files are uploaded to a directory for storing images and backups in the cluster storage. By default, this is the /image directory. During the upload process, the file will have the extension .iso.part. When the download is successful, the extension changes to .iso. If a critical error occurs during the download, the partially downloaded image file will be deleted.

After disconnecting the ISO image, its file will be deleted.

Connecting and disconnecting ISO images

VMmanager uses iPXE technology to connect an ISO image. This technology allows you to download only the necessary files during the installation process rather than downloading the entire image. The first time an ISO image is connected to a VM, a virtual CD drive is added to the VM's configuration file. The VM will be rebooted to update the configuration. The next time you connect and disconnect ISO images, the VM will not be rebooted. Connecting and disconnecting images will emulate inserting and removing media from the virtual CD drive.

If the option Boot virtual machine from the ISO is enabled when connecting an image, the VM will be rebooted from the virtual CD drive. If the option is disabled, the ISO image will be mounted as an additional disk of the VM.

If an ISO image is connected to the VM, all disk operations (migration, backups) will be blocked.

When ISO image is disabled, the virtual CD drive will remain in the VM configuration, but will not be used as a boot source.

Mounting ISO images

If the OS configuration on the VM is set to auto-mount disks, the connected ISO image will be mounted automatically.

To mount an ISO image manually:

  1. Connect to the VM via SSH.
  2. Define the path to the virtual CD drive device:

    lshw | grep cdrom
  3. Execute the command:

    mount <path_to_cdrom> /mnt

    <path_to_cdrom> — path to the virtual CD drive device. For example, /dev/cdrom

Setting the maximum size of an ISO image

The platform administrator can connect ISO images of any size to the VM. By default, users and advanced users can connect ISO images with a maximum size of 8 GB. To change this value, in the right menu, click the icon → System information tab →image2020-2-11_11-5-49.png icon next to Max. size of ISO to upload parameter → enter the required size in GB.

You can also change the maximum size of ISO images via the API:

  1. Get the authorization token:
    curl -k -X POST -H "accept: application/json" -H "Content-Type: application/json" '' -d '{"email": "admin_email", "password": "admin_pass"}'
    CODE — domain name or IP address of the server with the platform

    admin_email — platform administrator's email

    admin_pass — platform administrator's password

    In response, you will get the message in the form:

    Example of response in JSON

      "confirmed": true,
      "expires_at": null,
      "id": "6",
      "token": "4-e9726dd9-61d9-2940-add3-914851d2cb8a"

    Save the received token value.

  2. Execute the API request:

    curl -k -H "x-xsrf-token: <token>" -X POST "" -d '{"value":"<max_size>"}'

    <token> — authorization token — domain name or IP address of the server with the platform

    <max_size> — maximum ISO image size in MB

Useful tips

Related topics: