QEMU version 2.6.2 or later is required to install and launch vESR.
A virtual machine can be created in several ways.
To launch vESR, you can use the ready-made .qcow2 image from the files supplied with vESR and run the following command:
qemu-system-x86_64 --enable-kvm -cpu host -smp 4 -m 4G -nic tap,ifname=gi1 <disk_name>.qcow2 |
Note that in this case the ISO image is already pre-installed on the QCow2 disk and has fixed characteristics, which can be checked with the following command:
pc@ubuntu:~$ qemu-img info <disk_name>.qcow2
image: <disk_name>.qcow2
file format: qcow2
virtual size: 400 MiB (419430400 bytes)
disk size: 284 MiB
cluster_size: 65536
Format specific information:
compat: 1.1
compression type: zlib
lazy refcounts: false
refcount bits: 16
corrupt: false
extended l2: false
Child node '/file':
filename: <disk_name>.qcow2
protocol type: file
file length: 284 MiB (297730048 bytes)
disk size: 284 MiB |
The next vESR installation steps are detailed in the vESR installation process section.
After installing vESR, proceed to the Connecting network interfaces section.
The following example describes how to create a QCow2 disk image file and attach it in the host operating system.
To create a disk image file, run the following command:
qemu-img create -f qcow2 -o size=<disk_size>M <disk_name>.qcow2 |
Example output after running the command:
|
To start the vESR installation, run the following command:
qemu-system-x86_64 --enable-kvm -cpu <CPU> -smp <CPU_count> -m <RAM_size>G -nic tap,ifname=gi1 <disk_name>.qcow2 -boot d -cdrom <ISO_image_name> |
where:
--enable-kvm — enables full KVM virtualization support;
-cpu — selects the available CPU;
-smp — enables SMP system emulation with n CPUs;
-m — selects the virtual RAM size;
-nic — network adapter settings;
-boot — boot device selection. The value d specifies CD-ROM;
-cdrom — selects the ISO image file.
|
The next vESR installation steps are detailed in the vESR installation process section.
After installation, remove the ISO from the virtual drive. To do this:
Subsequent vESR launches must be performed without specifying the ISO.
|
To connect a network interface, start vESR on QEMU with the network adapter settings -nic tap,ifname=gi1 (if several network interfaces are required, specify all of them, for example, -nic tap,ifname=gi1 -nic tap,ifname=gi2). On the host device, bring the created interface UP and assign an IP address.
Launching vESR with a single network interface:
Bringing the created interface UP and assigning an IP address:
Configure the IP addressing on vESR and verify IP connectivity.
vESR now has direct IP connectivity with the host, enabling Telnet and SSH access to vESR, as well as vESR firmware updates, file uploads, and file downloads. |
The settings in this section are optional and do not affect system operation. |
To connect the vESR serial port to a host pty, add the following option to the QEMU emulator launch command:
-serial pty |
After running the command, a line with the pty number to which the output is redirected will appear:
char device redirected to /dev/pts/3 (label serial0) |
Command to connect to the pty using minicom:
minicom -D /dev/pts/3 |
Alternatively, the vESR serial port can be connected to a pipe in the host file system. To do this, add the following option:
-serial unix:/tmp/vesr-qemu,server,nowait |
Command to connect to the pipe using minicom:
minicom -D unix#/tmp/vesr-qemu |