Uso avançado

Using an advanced or graphical interface to manage VMs

rnl-virt is a simplified frontend to using libvirt with volatile configurations. Many more things are possible besides the ones allowed by rnl-virt itself.

rnl-virt allows launching more advanced frontends to libvirt, the command line virsh and the graphical interface virt-manager.

To run these and have access to the more advanced options provided by these it is possible to run

rnl-virt virsh
rnl-virt manager

Storing the virtual machine data permanently

Instead of using rnl-virt and having to re-create the virtual machines every log-in, you can optionally use libvirt in a normal user session, which will store the virtual machine information in the user’s home.

To do so, you can run the libvirt clients virsh and virt-manager directly, with the appropriate connection path:

virsh -c qemu:///session
virt-manager -c qemu:///session

You can also use the templates stored in /var/lib/rnl-virt/vm/templates/ to create virtual machines.

To create a VM with VDE networking, you need to replace {qemu_args} with:

<qemu:arg value='-netdev' />
<qemu:arg value='vde,id=<yourid>,sock=<path to vde socket>' />
<qemu:arg value='-device' />
<qemu:arg value='e1000,netdev=<yourid>' />

To add the tap interface, you need to replace {net_args} with:

<interface type='ethernet'>
    <target dev='rnltap' />
    <script path='<path to a dummy script>' />

The dummy script is a hack which is run before attaching and after dis-attaching the network to the virtual machine. It needs to be an executable script which does nothing. A suitable example would be:

exit 0

Do have in mind that although the VM information will be saved, created switches will not, and using this approach might require re-creating the same switches on every launch or moving/copying virtual machine disks from place to place.

Manually creating VDE switches

Everything done with the switch commands of rnl-virt can be manually done using vde_switch to create the switches and vdeterm to access the switch’s management console.

Disk management

The qemu-img command can be used to create and manipulate disks.

The rnl-virt disk command uses qemu-img to create a disk file in format qcow2. This format has support for differential disks, snapshots, among other things.

The master disks are in /var/lib/rnl-virt/disk/templates, and can be copied and used directly, or used as masters for differential disks.