REVEN in QEMU-based hypervisors
Here are the specific steps to import the pre-installed REVEN's qcow2 disk on QEMU-based hypervisors: either QEMU, virt-manager or Proxmox.
Before proceeding to the following steps, please make sure you read the general steps to install REVEN in a VM first.
Creating and configuring the VM
QEMU (command-line)
Here are are some basic guidelines for manual command-line usage.
- First create a secondary disk to hold the REVEN data:
qemu-img create -f qcow2 reven_data.qcow2 1TThis creates a 1TB disk, feel free to adapt this value to your needs. Please note that the space won't be taken by the virtual disk upon creation, it will only grow with the REVEN usage. - Second, you can start the VM:
qemu-system-x86_64 -enable-kvm -cpu host -smp 8 -m 16G -hda reven-2.11.0-free-mecha-buster.qcow2 -hdb reven_data.qcow2-enable-kvm -cpu hostwill enable VM acceleration along with nested virtualization-smp 8is the number of cores given to the VM-m 16Gis the RAM amount-hda reven-2.11.0-free-mecha-buster.qcow2is the first disk, which must be the shipped REVEN one-hdb reven_data.qcow2is the second disk, which must be the created data one
Please note QEMU's default network configuration will not allow you to reach the REVEN interface, meaning this command-line as-is won't work for real deployments.
QEMU provides multiple solutions to choose from, depending on your configuration. Please look at QEMU's documentation for more information, this page is a good starting point.
QEMU (virt-manager)
Virt Manager is QEMU-based, so you can use the qcow2 package to create a REVEN VM. Here are some basic guidelines to create your REVEN VM.
- Enter the
New Virtual Machinewindow. - Choose the
Import existing disk imageoption, and ensure thex86_64architecture is selected. - Select the
reven-2.X.Y-[...].qcow2image from one of your pools.Generic Linux 2020is suitable for the operating system option. - Set the RAM amount and CPU core number regarding your configuration and REVEN's requirements.
- Set a name to your REVEN VM, along with a suitable network configuration for you case. Keep in mind that the REVEN VM will try to get an IP address with DHCP. Also check
Customize configuration before install. - In the configuration window, find the created
VirtIOdisk, and change it toSATA. - In that same window, click
Add Hardware,Storage, and create a REVEN's data storage disk. Again, this disk must be on aSATAbus type. See REVEN's requirements for the recommended size. - Still in that window, in the
CPUssection, please ensure theCopy host CPU configurationoption is checked, so that you have nested virtualization active.
The VM is now ready.
QEMU (Proxmox)
Proxmox is also QEMU-based, so you can use the qcow2 package. Here are some basic guidelines to create
your REVEN VM.
- Start by uploading your REVEN VM disk to the Proxmox host. You can store the disk pretty much anywhere as we will import it later.
/tmpis a possible choice. - While the upload is on-going, let's create the VM: enter the
Create VMmenu in the Proxmox web UI. - In the
Generalstep, customize anything as you want. - In the
OSstep, selectDo not use any media, and ensure the guest OS is Linux with a recent kernel. - In the
Systemstep, the default are good, but adapting them is possible. - In the
Diskstep, leave only one disk for now, we will customize the disk configuration later. - In the
CPUstep, set the CPU core number regarding your configuration and REVEN's requirements. - In the
Memorystep, set the RAM amount accordingly. - In the
Networkstep, configure an interface suitable for your configuration. Keep in mind that the REVEN VM will try to get an IP address with DHCP. - In the
Confirmstep, ensure theStart after createdoption is unchecked, because we need to have a proper disk configuration before launch. - Now that the VM has been created through the web UI, please note its ID (usually 100 for the first VM in a host).
- Get a shell on the Proxmox host. SSH is a good choice, but a console access does the job too. Run the following two
commands with the VM ID you got previously (100 in the example):
qm importdisk 100 path/to/reven-2.X.Y-[...].qcow2 local -format qcow2qm set 100 --cpu host
- Now get back to the web UI for final configuration. Select the VM and go to its
Hardwaremenu. - Select the hard disk created by the wizard and detach it.
- Select the
Unused Disk 0, which is the disk you imported with the command line, and attach it as the firstSCSIdisk. - Select the
Unused Disk 1, which is the disk created by the wizard, and attach it too as a secondSCSIdisk. It's important that the REVEN disk is first, because it will be exposed as/dev/sda, whereas this second disk, that will be used for the REVEN data, will be exposed as/dev/sdb. - Once this second data disk has been re-attached, you can grow it to a reasonable size for the REVEN data, such as 1TB (see REVEN's requirements)
- Finally go to the
Optionsmenu of your REVEN VM, and update theBoot orderoption to leave only the first disk (the REVEN disk) marked as enabled.
Your VM is now ready, proceed to the next step. Keep in mind that in order to see the VM's screen, you must go to the Console menu.
Booting it up
Your REVEN VM is now properly configured, you can go back to the general steps to install REVEN in a VM to boot it up.