Uso básico

Getting Help

List available commands

rnl-virt -h|--help

Information about disk commands

rnl-virt disk -h|--help

Information about switch commands

rnl-virt switch -h|--help

Information about virtual machine commands

rnl-virt vm -h|--help

Help about a specific command

rnl-virt <section> <command> -h|--help

Creating and managing a virtual switch

Create a virtual switch

Run the command

rnl-virt switch create <name of switch>

The name should be simple, with only letters or numbers.

Create a virtual hub

Run the command

rnl-virt switch create <name of switch> --hub

Enter the console of a virtual switch or hub

Run the command

rnl-virt switch manage <name of switch or hub>

This will open a command prompt where you can run commands for the virtual switch.

The commands can be found on the VDE documentation.

Shutdown a virtual switch or hub

Open a command promp for the virtual switch, and in it, run the command shutdown.

$ rnl-virt switch manage <name of switch>
VDE switch V2.3.2
(C) Virtual Square Team (coord. R. Davoli) 2005,2006,2007 - GPLv2

vde[/run/user/1234567/rnl-virt/net/name]: shutdown

$

Creating and managing a virtual machine

Create the hard drive

Run the command

rnl-virt disk create <name of disk> <template>

The template should be any of the ones listed by the command rnl-virt disk list-templates.

A new file called <name of disk>.qcow2 will be created in the current folder.

To change the folder, pass the --path <folder to use> argument.

Create the virtual machine

Run the command

rnl-virt vm create <name of vm> <template> <path to disk>

The template should be any of the ones listed by the command rnl-virt vm list-templates. If you’re in the same folder where you created the disk, the path to disk should be <name of disk>.qcow2.

This creates a VM without networking. To create a network with basic connectivity to the outside, add the argument --nat. To create the VM with a connection to the virtual switch or hub, add the argument --switch <name of switch or hub>. To add multiple switches or hubs, list all the names, split by spaces.

To add to the VM an interface to network with other VMs running in other workstations, add the argument --tap.

To mount an ISO as a CD inside the virtual machine, add the argument --cdrom <name of ISO>. The ISO can be one from a list provided by the command rnl-virt vm list-cds or a full path to an ISO file.

For example, to create a virtual machine with name example1 based on the SSof template, disk example1 in the current folder, connected only to the Internet, run the commands:

rnl-virt disk create example1 SSof
rnl-virt vm create example1 SSof example1.qcow2 --nat

To create a virtual machine with name example2 based on the SIRS template, disk example2 in the current folder, connected to two switches switch1 and switch2, a hub hub1 and the ISO cd.iso, run the commands:

rnl-virt disk create example2 SIRS
rnl-virt vm create example2 SIRS example2.qcow2 --cdrom cd.iso --switch switch1 switch2 hub1

Mount an ISO to a virtual machine without CDs inserted

To insert a virtual CD to the virtual machine, if it has no CDs yet, run the command

rnl-virt vm insert-cd <name of vm> <name of iso>

The ISO can be one from a list provided by the command rnl-virt vm list-cds or a full path to an ISO file.

Eject an ISO mounted on a virtual machine

To eject a virtual CD on the virtual machine, run the command

rnl-virt vm eject <name of vm>

Start and open the virtual machine

To start the virtual machine, run the command

rnl-virt vm start <name>

To open its screen, run the command

rnl-virt vm open <name>

Shut down the virtual machine

To command a VM to close by itself, either do it from the VM itself, or run the command

rnl-virt vm close <name>

To force a VM to shutdown, run the command

rnl-virt vm close <name> --force

This might cause data in the VM to be lost. Run at your own risk.