EVE-NG 仿真虚拟环境是一种新兴的虚拟无缝仿真平台,可以满足当今 IT 世界的需求。无客户端管理将使 EVE-NG 成为企业工程师的最佳选择,而不受企业安全策略的影响,因为它可以在完全隔离的环境中运行。
镜像制作#
准备环境#
| 说明 | 类型 | 描述 |
|---|---|---|
| eve-ng | 企业版、社区版 | eve-ng环境 |
| ISO | ISO | 镜像文件(Ubuntu、Debian、RockyLinux等) |
制作镜像#
准备环节#
本次制作以ubuntu 22.04.5为例,对于其他发行版同样适用。
- 创建目录: 路径
/opt/unetlab/addons/qemu
cd /opt/unetlab/addons/qemu
# 创建目录;名字按照eve-ng要求
mkdir linux-ubuntu-22.04.5
- 上传镜像文件;重命名为
cdrom.iso
root@eve-ng:/opt/unetlab/addons/qemu/linux-ubuntu-22.04.5# ls -ltr
total 5601436
-rw-r--r-- 1 root unl 3598123008 Nov 1 13:27 virtioa.qcow2
-rw-r--r-- 1 root root 2136926208 Nov 3 02:56 cdrom.iso
- 创建
virtioa.qcow2文件
qemu-img create -f qcow2 virtioa.qcow2 50G
安装环节#
浏览器打开
eve-ngWEB UI添加新的实验室

- 打开新实验室,并添加节点,选择之前创建的目录名字;保存

启动阶段,并双击节点打开console;按照Linux正常引导进行安装
安装完成后,自定义一些配置
- 开启
rootSSH 登录 - 关闭防火墙
- 开启
配置完成;关闭节点
转换镜像#
- 打开实验室,记住实验ID

- 转换镜像
- 一个实验室有多个节点时,请根据需求选择对应的
节点ID目录
cd /opt/unetlab/tmp/0/{实验ID}/{节点ID}
- 转换
virtioa.qcow2
qemu-img convert -O qcow2 virtioa.qcow2 virtiob.qcow2
- 拷贝镜像
# 1. 建议提前删除镜像
rm -rf /opt/unetlab/addons/qemu/linux-ubuntu-22.04.5/virtioa.qcow2
# 2. 拷贝镜像
cp virtiob.qcow2 /opt/unetlab/addons/qemu/linux-ubuntu-22.04.5/virtioa.qcow2
- 修复权限
/opt/unetlab/wrappers/unl_wrapper -a fixpermissions
删除实验室
创建新实验室,选择镜像;启动节点。愉快的做实验吧
其他类型#
选择节点时,如果看不到镜像,请在此处复制一个模版/opt/unetlab/html/templates/intel,根据需求修改即可。
iStoreOS#
创建iStoreOS镜像,本人在此处复制linux模版进行修改。
- description
- name
root@eve-ng:/opt/unetlab/html/templates/intel# cat istoreos.yml
# Copyright (c) 2016, Andrea Dainese
# Copyright (c) 2018, Alain Degreffe
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of the UNetLab Ltd nor the name of EVE-NG Ltd nor the
# names of its contributors may be used to endorse or promote products
# derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
---
type: qemu
description: iStoreOS
name: iStoreOS
cpulimit: 1
icon: Server-2D-Linux-S.svg
cpu: 1
ram: 1024
ethernet: 1
console: vnc
shutdown: 1
qemu_arch: x86_64
qemu_version: 2.12.0
qemu_nic: virtio-net-pci
qemu_options: -machine type=pc,accel=kvm -vga std -usbdevice tablet -boot order=cd -cpu host
...


