Purchase
https://learningnetworkstore.cisco.com/cisco-modeling-labs-personal/
Download
https://learningnetworkstore.cisco.com → My Account → My Orders → Click Download → Redirected to https://software.cisco.com
- cml2_p_2.7.1-20_amd64-25-iso.zip (1515.70 MB)
- cml2_p_2.7.1-20_amd64-25.ova (893.48 MB)
- refplat_p-20240623-fcs-iso.zip (11643.11 MB)
Install
Import cml2_xxx.ova to your hypervisor
Configure network
Access Cockpit Web - https://<YOUR_IP>:9090/
Patch
firewalld
CML2 uses firewalld as firewall.
<?xml version="1.0" encoding="utf-8"?> <zone target="ACCEPT"> <short>Trusted</short> <source address="192.168.0.0/24"/> <service name="ssh"/> <service name="dhcpv6-client"/> <service name="http"/> <service name="https"/> <port port="1122" protocol="tcp"/> <port port="2222" protocol="tcp"/> <port port="9090" protocol="tcp"/> </zone>
# vi /etc/firewalld/zones/public.xml # vi /etc/firewalld/zones/trusted.xml # firewall-cmd --reload # firewall-cmd --get-active-zones public interfaces: bridge0 enp1s0 trusted sources: 192.168.0.0/24
sshd
# vi /etc/ssh/sshd_config Port 2222 # vi /etc/passwd root:x:0:0:root:/root:/bin/bash # mkdir -p /root/.ssh # chmod 700 /root/.ssh # touch /root/.ssh/authorized_keys # chmod 600 /root/.ssh/authorized_keys # vi /root/.ssh/authorized_keys Add your ssh pubkey # systemctl enable --now ssh
qemu-guest-agent
# apt update # apt install qemu-guest-agent # systemctl start qemu-guest-agent # systemctl enable qemu-guest-agent.service
Expand Disk
Expand disk on hypervisor, then following commands
# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 60G 0 disk ├─sda1 8:1 0 512M 0 part /boot/efi └─sda2 8:2 0 31.5G 0 part ├─vg00-lv_root 253:0 0 10G 0 lvm / └─vg00-lv_var 253:1 0 21.5G 0 lvm /var # growpart /dev/sda 2 CHANGED: partition=2 start=1050624 old: size=66058207 end=67108831 new: size=124778463 end=125829087 # lsblk /dev/sda2 NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda2 8:2 0 59.5G 0 part ├─vg00-lv_root 253:0 0 10G 0 lvm / └─vg00-lv_var 253:1 0 21.5G 0 lvm /var # pvresize /dev/sda2 Physical volume "/dev/sda2" changed 1 physical volume(s) resized or updated # pvdisplay --- Physical volume --- PV Name /dev/sda2 VG Name vg00 PV Size <59.50 GiB / not usable 1.98 MiB # lvextend -l +100%FREE /dev/vg00/lv_var Size of logical volume vg00/lv_var changed from <21.50 GiB (5503 extents) to <49.50 GiB (12671 extents). Logical volume vg00/lv_var successfully resized. # resize2fs /dev/vg00/lv_var Filesystem at /dev/vg00/lv_var is mounted on /var; on-line resizing required old_desc_blocks = 3, new_desc_blocks = 7 The filesystem on /dev/vg00/lv_var is now 12975104 (4k) blocks long. # df -h /var Filesystem Size Used Avail Use% Mounted on /dev/mapper/vg00-lv_var 49G 17G 31G 35% /var
Import Images from refplat ISO ⭐
refplat iso : 13GB of Virtual Appliacnes
Import refplat_xxx.iso to your hypervisor and import to VM.
Access - https://<YOUR_IP>:9090/virl2/maintenance
Click - Copy Refplat ISO
# lsblk /dev/sr0 NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sr0 11:0 1 12.8G 0 rom # mount | grep sr /dev/sr0 on /tmp/refplat_iso type iso9660 (ro,relatime,nojoliet,check=s,map=n,blocksize=2048,iocharset=utf8) # ps auxf \_ /bin/bash /usr/share/cockpit/virl2/copy-refplat-iso-to-disk.sh \_ /bin/bash /usr/share/cockpit/virl2/copy-refplat-iso-to-disk.sh | \_ rsync -ahvzAX --partial --chown=libvirt-qemu:virl2 --chmod=g+w,Da+rx,Fa+r /tmp/refplat_iso/ /var/lib/libvirt/images | \_ rsync -ahvzAX --partial --chown=libvirt-qemu:virl2 --chmod=g+w,Da+rx,Fa+r /tmp/refplat_iso/ /var/lib/libvirt/images | \_ rsync -ahvzAX --partial --chown=libvirt-qemu:virl2 --chmod=g+w,Da+rx,Fa+r /tmp/refplat_iso/ /var/lib/libvirt/images \_ /bin/bash /usr/share/cockpit/virl2/copy-refplat-iso-to-disk.sh \_ sudo /usr/share/cockpit/virl2/manage-compute.sh --log-stdin setup/virl2-copy-refplat-iso-to-disk.log \_ /bin/bash /usr/share/cockpit/virl2/manage-compute.sh --log-stdin setup/virl2-copy-refplat-iso-to-disk.log \_ tee -a /var/log/virl2/setup/virl2-copy-refplat-iso-to-disk.log
Import Custom Images
https://github.com/CiscoDevNet/cml-community
https://github.com/ciscops/cml-custom-images
IP 변경
https://developer.cisco.com/docs/modeling-labs/editing-the-management-ip-address-via-the-console/
GitHub
https://github.com/CiscoDevNet/virl2-client
https://developer.cisco.com/docs/virl2-client/
https://github.com/CiscoDevNet/cml-community
https://github.com/WojciechowskiPiotr/CMLNetKit
Manual
https://developer.cisco.com/docs/modeling-labs/
https://learningnetwork.cisco.com/s/topic/0TO3i00000094ZjGAI/cisco-modeling-labs-personal-community