Creating a new VM from an ISO

You can create a VM in Reven to record scenarios by installing an operating system from an ISO.

The Project Manager does not guide you through all steps required for this operation.

Therefore, in conjunction with using the VM import Wizard, you will also need to run commands via a terminal in the Docker container Reven is running on.

IMPORTANT:

  • This page will assume you are familiar with how to import a VM in Reven.
  • To issue docker commands on the esReven server, your system user will need either bea sudoer or belong to the docker group.

To create a new VM from an ISO, please follow the procedure below:

  1. On the esReven server,
    1. Find the ID of the Reven container:
      • docker ps
    2. Create a directory to store the ISO in the Reven container:
      • docker exec <eshard/reven2... container id> mkdir /VMs/ISO
    3. Copy the operating system ISO file to that directory:
      • docker cp <path_to>/<ISO_file> <eshard/reven2... container id>:/VMs/ISO
    4. Set the directory and ISO owner to reven:reven
      • docker exec <eshard/reven2... container id> chown -R reven:reven /VMs/ISO
  2. Open a terminal in Reven container:
    1. Open a shell on the docker:
      • docker exec -it <eshard/reven2... container id> /bin/bash
    2. Switch to the reven user:
      • su - reven
    3. Go to the /VMs directory:
      • cd /VMs
  3. From the terminal in the docker container:
    1. Create an empty VM disk:
      • qemu-img create -f qcow2 myimage.qcow2 80G
      • NOTE: You should adapt the name and size of the disk to your requirements.
  4. From the Project Manager VM import Wizard
    1. Import the VM disk as described in previous sections.
    2. When asked to create a disk snapshot, do so (even if this disk is still empty). Write the name down, we will refer to it as root.
    3. The first time the Wizard requests you start the VM:
      1. Check "Override custom options",
      2. Enter the custom option -cdrom "/VMs/ISO/<ISO_file>",
      3. Click on "Start" to start the VM.
    4. If the VM does not show up, use the link "Show in browser". Your ISO file will take precedence in the boot as expected.
    5. Install the operating system on the VM.
    6. Once the operating system is installed, shut the VM down with ACPI.
    7. Leave the Wizard open at this step.
  5. From the terminal in the docker container:
    1. At this point:
      • The base disk of the VM is empty.
      • The OS has been installed to the first disk snapshot.
      • Instead we want the base disk to contain the vanilla installation, and later use the first snapshot to lighten the VM further.
      • Hence, "commit" all changes to the base image using the command:
        • qemu-img commit /VMs/myimage.qcow2.snapshots/root.qcow2
    2. Exit the Docker container terminal.
      1. exit
      2. exit
  6. Back to the Project Manager VM import Wizard
    1. You might get a warning on this page, in which case simply click on the "Refresh" button.
    2. Uncheck "Override custom options".
    3. Click on "Save Settings".

You are now back into the normal workflow: you can stay at this step to perform the necessary operations to make your VM lighter on root by disabling unnecessary services (see Guest Configuration), then continue on to create the first live snapshot and finish the Wizard.

You now have a ready-to-use VM! You can head over to Scenario to record scenarios and more.