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 1T
This 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 host
will enable VM acceleration along with nested virtualization-smp 8
is the number of cores given to the VM-m 16G
is the RAM amount-hda reven-2.11.0-free-mecha-buster.qcow2
is the first disk, which must be the shipped REVEN one-hdb reven_data.qcow2
is 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 Machine
window. - Choose the
Import existing disk image
option, and ensure thex86_64
architecture is selected. - Select the
reven-2.X.Y-[...].qcow2
image from one of your pools.Generic Linux 2020
is 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
VirtIO
disk, 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 aSATA
bus type. See REVEN's requirements for the recommended size. - Still in that window, in the
CPUs
section, please ensure theCopy host CPU configuration
option 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.
/tmp
is a possible choice. - While the upload is on-going, let's create the VM: enter the
Create VM
menu in the Proxmox web UI. - In the
General
step, customize anything as you want. - In the
OS
step, selectDo not use any media
, and ensure the guest OS is Linux with a recent kernel. - In the
System
step, the default are good, but adapting them is possible. - In the
Disk
step, leave only one disk for now, we will customize the disk configuration later. - In the
CPU
step, set the CPU core number regarding your configuration and REVEN's requirements. - In the
Memory
step, set the RAM amount accordingly. - In the
Network
step, 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
Confirm
step, ensure theStart after created
option 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 qcow2
qm set 100 --cpu host
- Now get back to the web UI for final configuration. Select the VM and go to its
Hardware
menu. - 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 firstSCSI
disk. - Select the
Unused Disk 1
, which is the disk created by the wizard, and attach it too as a secondSCSI
disk. 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
Options
menu of your REVEN VM, and update theBoot order
option 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.