Install EVE-NG in ESXI

安装EVE NG

直接从官网选择OVF的Image下载,通过ESXI新建虚拟机时,拖拽OVF和VMDK两个文件进去;安装完后配置CPU/Memory/硬盘等,并且在CPU中打开嵌套虚拟化的设置;

配置EVE NG

安装完后,进去按照提示配置,完成配置启动后发现没有IP,怀疑是我的服务器不能访问外网的原因,因此手动配置IP以及调整SSH的端口:

root@eve-ng:~# lsb_release -a 
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.7 LTS
Release:        16.04
Codename:       xenial

root@eve-ng:~# dpkg -l eve-ng
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                    Version          Architecture     Description
+++-=======================-================-================-===================================================
ii  eve-ng                  2.0.3-112        amd64            A new generation software for networking labs.
root@eve-ng:~# more /etc/network/interfaces
......
# The primary network interface
iface eth0 inet manual
auto pnet0
iface pnet0 inet static
    bridge_ports eth0
    bridge_stp off
    address 172.16.211.154
    netmask 255.255.255.0
    gateway 172.16.211.1

更新SSH端口后重启进程

root@eve-ng:~# /etc/init.d/ssh restart

备份文件

我之所以重新安装,就是因为改了一些参数导致点击创建node没任何反应,感觉EVE 还是很脆弱的,所以重新安装后第一件事就是先备份文件;备份操作可以参考这里:How to backup content of EVE-NG

/opt/unetlab/addons/
/opt/unetlab/tmp/
/opt/unetlab/labs/
/opt/unetlab/evedb.gz
/opt/unetlab/html/templates/
/opt/unetlab/html/images/
/opt/unetlab/html/includes/config.yml
/opt/unetlab/html/includes/custom_templates.yml

添加定制Image-qcow2

建议参考“EVE-Comm-Book-1.11-2021.pdf”中的12.3,讲的很详细,可以去官网查阅:

https://www.eve-ng.net/index.php/documentation/community-cookbook/

添加定制Image-ISO

建议参考官网的文章,如下:

https://www.eve-ng.net/index.php/documentation/howtos/howto-create-own-windows-host-on-the-eve/

保存现有Image变动的配置

当对Linux Server做了很多变动后(如地址分配,软件安装,调试等),重启这个节点,变动不会消失;但如果想在其他拓扑中调用这个image,所有变动都被初始化了,那么是否有方法把变动的配置提交给原始镜像,下次再调用时就不用再次重复配置了呢?答案当然是“有的”;

其实很简单,默认EVE会把image放在一个特定目录下 /opt/unetlab/addons/qemu/xxxx/”,当lab启动后,会从这里拷贝image到临时目录,例如“/opt/unetlab/tmp/1/76a357d5-7484-41a2-856c-a0bcfe66fac0/29”,此时对image的操作,配置变更,都只会改变这个临时文件,即使设备重启,这些配置仍然会保留,除非wipe了设备,相当于格式化,重新拷贝一个新的image,所有配置就会没了,那么如何把改变的配置提交给原始的image?其实一条命令即可,注意执行commit需要先把设备关闭

root@eve-ng:/opt/unetlab/tmp/1/76a357d5-7484-41a2-856c-a0bcfe66fac0/29# qemu-img info hda.qcow2   
image: hda.qcow2
file format: qcow2
virtual size: 100G (107374182400 bytes)
disk size: 4.2G
cluster_size: 65536
backing file: /opt/unetlab/addons/qemu/linux-centos7/hda.qcow2
Format specific information:
    compat: 1.1
    lazy refcounts: false
    refcount bits: 16
    corrupt: false
root@eve-ng:/opt/unetlab/tmp/1/76a357d5-7484-41a2-856c-a0bcfe66fac0/29# qemu-img commit hda.qcow2 
Image committed.
root@eve-ng:/opt/unetlab/tmp/1/76a357d5-7484-41a2-856c-a0bcfe66fac0/29# qemu-img info hda.qcow2 
image: hda.qcow2
file format: qcow2
virtual size: 100G (107374182400 bytes)
disk size: 260K
cluster_size: 65536
backing file: /opt/unetlab/addons/qemu/linux-centos7/hda.qcow2
Format specific information:
    compat: 1.1
    lazy refcounts: false
    refcount bits: 16
    corrupt: false
root@eve-ng:/opt/unetlab/tmp/1/76a357d5-7484-41a2-856c-a0bcfe66fac0/29# ls -l
total 264
-rw-rw-r-- 1 root unl 262144 Aug 10 23:01 hda.qcow2
-rw-rw-r-- 1 root unl    122 Aug 10 22:59 wrapper.txt
本文出自 Frank's Blog

版权声明:


本文链接:Install EVE-NG in ESXI
版权声明:本文为原创文章,仅代表个人观点,版权归 Frank Zhao 所有,转载时请注明本文出处及文章链接
你可以留言,或者trackback 从你的网站

留言哦

blonde teen swallows load.xxx videos