...
코드 블럭 | ||
---|---|---|
| ||
# lsb_release -a Distributor ID: Ubuntu Description: Ubuntu 20.04.6 LTS Release: 20.04 Codename: focal |
Images
코드 블럭 | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
| #
|
|
| |||||||||
/var/lib/libvirt/images
├── .cml
├── node-definitions
│ ├── cat8000v.yaml
│ ...
│ ├── alpine.yaml
│ ├── desktop.yaml
│ └── ubuntu.yaml
└── virl-base-images
├── cat8000v-17-13-01a
│ ├── c8000v-universalk9_8G_serial.17.13.01a.qcow2
│ └── cat8000v-17-13-01a.yaml
...
├── alpine-base-3-19-1
│ ├── alpine-base-3-19-1.qcow2
│ └── alpine-base-3-19-1.yaml
├── alpine-desktop-3-19-1
│ ├── alpine-desktop-3-19-1.qcow2
│ └── alpine-desktop-3-19-1.yaml
├── ubuntu-22-04-20240126
│ ├── jammy-server-cloudimg-amd64.img
│ └── ubuntu-22-04-20240126.yaml
└── server-tcl-14-0
├── server-tcl-14-0.yaml
└── tcl-14-0.qcow2 |
...
코드 블럭 | ||||||
---|---|---|---|---|---|---|
| ||||||
# generated 2023-12-19 # part of VIRL^2 # id: cat8000v-17-13-01a label: Cat 8000v 17.13.01a description: Cat 8000v 17.13.01a node_definition_id: cat8000v disk_image: c8000v-universalk9_8G_serial.17.13.01a.qcow2 read_only: true schema_version: 0.0.1 |
...
코드 블럭 | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
# Ubuntu 22.04 image definition (cloud image, using cloud-init) # generated 2024-01-26 # part of VIRL^2 # id: ubuntu-22-04-20240126 label: Ubuntu 22.04 - 26 Jan 2024 description: Ubuntu 22.04 - 26 Jan 2024 node_definition_id: ubuntu disk_image: jammy-server-cloudimg-amd64.img read_only: true schema_version: 0.0.1 |
코드 블럭 | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
# # Ubuntu node definition (cloud image, using cloud-init) # id: ubuntu sim: linux_native: driver: server libvirt_domain_driver: kvm disk_driver: virtio nic_driver: virtio ram: 2048 cpus: 1 data_volume: 0 boot_disk_size: 64 inherited: image: ram: true cpus: true cpu_limit: true data_volume: true boot_disk_size: true node: ram: true cpus: true cpu_limit: true data_volume: true boot_disk_size: true general: nature: server description: Ubuntu Cloud Init Platform read_only: true schema_version: 0.0.1 configuration: generator: driver: ubuntu provisioning: volume_name: cidata media_type: iso files: - name: meta-data content: | instance-id: ubuntu local-hostname: ubuntu editable: false - name: user-data content: | #cloud-config hostname: inserthostname-here manage_etc_hosts: True system_info: default_user: name: cisco password: cisco chpasswd: { expire: False } ssh_pwauth: True ssh_authorized_keys: - your-ssh-pubkey-line-goes-here editable: true device: interfaces: # 8 should be enough, they are called ens2, ens3, ... # however, those are PCI bus/slot numbers. I guess they are # not static. Depends what device goes before '2' physical: - ens2 - ens3 - ens4 - ens5 - ens6 - ens7 - ens8 - ens9 has_loopback_zero: false default_count: 1 serial_ports: 1 boot: timeout: 180 # seems that without proper meta-data the hostname is not # correctly set at initial boot. It is 'ubuntu'. Also, the # first line is not seen at first boot. Only at second # boot, the correct hostname plus the 'reached target' is # will be set / shown on the console. completed: - "Cloud-init target" - "Welcome to Ubuntu" - "running 'modules:final' at" pyats: os: linux ui: group: Others icon: server label: Ubuntu label_prefix: ubuntu- visible: true description: | Ubuntu Cloud Init Platform 2 GB DRAM, 1 vCPU (can be adjusted) ##### Configuration The Ubuntu image uses cloud-init YAML for configuration. Please ensure that you have a valid cloud-init configuration in the node's Edit Config pane in the Workbench. When you drop an Ubuntu node on the canvas in the Workbench, a very brief (but complete) skeleton for a cloud-init configuration is added to the node. The pre-configured default username on the VM image is ubuntu, but the initial config for the node overrides the default_user account to be cisco. To log into the node as with this default user account, ensure that the cloud-init config for the node either specifies a password with the top-level password field or provides at least one SSH public key with the top-level ssh_authorized_keys field. See [the cloud-init documentation](https://cloudinit.readthedocs.io/en/latest/topics/examples.html) for additional cloud-init examples. |
...
코드 블럭 | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
<domain type='kvm' id='2'>
<name>50e4385b-f762-42a1-9f3f-89bca3785ff1</name>
<uuid>50e4385b-f762-42a1-9f3f-89bca3785ff1</uuid>
<description>ubuntu-0: Lab at Mon 00:44 AM (ubuntu)</description>
<memory unit='KiB'>2097152</memory>
<currentMemory unit='KiB'>2097152</currentMemory>
<vcpu placement='auto'>1</vcpu>
<numatune>
<memory mode='strict' placement='auto'/>
</numatune>
<resource>
<partition>/machine</partition>
</resource>
<os>
<type arch='x86_64' machine='pc-i440fx-4.2'>hvm</type>
<boot dev='hd'/>
</os>
<features>
<acpi/>
</features>
<cpu mode='host-passthrough' check='none'/>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/bin/qemu-system-x86_64</emulator>
<disk type='file' device='disk'>
<driver name='qemu' type='qcow2' cache='writethrough'/>
<source file='/var/local/virl2/images/9688ac22-ad37-4cf3-aa06-2efe9d8c7786/50e4385b-f762-42a1-9f3f-89bca3785ff1/node0.img' index='2'>
<seclabel model='dac' relabel='no'/>
</source>
<backingStore type='file' index='3'>
<format type='qcow2'/>
<source file='/var/lib/libvirt/images/virl-base-images/ubuntu-22-04-20240126/jammy-server-cloudimg-amd64.img'>
<seclabel model='dac' relabel='no'/>
</source>
<backingStore/>
</backingStore>
<target dev='vda' bus='virtio'/>
<alias name='virtio-disk0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</disk>
<disk type='file' device='cdrom'>
<driver name='qemu' type='raw' cache='none'/>
<source file='/var/local/virl2/images/9688ac22-ad37-4cf3-aa06-2efe9d8c7786/50e4385b-f762-42a1-9f3f-89bca3785ff1/config.img' index='1'/>
<backingStore/>
<target dev='vdb' bus='ide'/>
<readonly/>
<alias name='ide0-0-1'/>
<address type='drive' controller='0' bus='0' target='0' unit='1'/>
</disk>
<controller type='usb' index='0' model='piix3-uhci'>
<alias name='usb'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
</controller>
<controller type='pci' index='0' model='pci-root'>
<alias name='pci.0'/>
</controller>
<controller type='ide' index='0'>
<alias name='ide'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
</controller>
<interface type='udp'>
<mac address='52:54:00:19:35:da'/>
<source address='127.0.0.1' port='21008'>
<local address='127.0.0.1' port='21009'/>
</source>
<model type='virtio'/>
<driver>
<host csum='off'/>
</driver>
<alias name='net0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
</interface>
<serial type='pty'>
<source path='/dev/pts/13'/>
<target type='isa-serial' port='0'>
<model name='isa-serial'/>
</target>
<alias name='serial0'/>
</serial>
<console type='pty' tty='/dev/pts/13'>
<source path='/dev/pts/13'/>
<target type='serial' port='0'/>
<alias name='serial0'/>
</console>
<input type='mouse' bus='ps2'>
<alias name='input0'/>
</input>
<input type='keyboard' bus='ps2'>
<alias name='input1'/>
</input>
<memballoon model='virtio'>
<alias name='balloon0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
</memballoon>
<rng model='virtio'>
<backend model='random'>/dev/urandom</backend>
<alias name='rng0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
</rng>
</devices>
<seclabel type='dynamic' model='apparmor' relabel='yes'>
<label>libvirt-50e4385b-f762-42a1-9f3f-89bca3785ff1</label>
<imagelabel>libvirt-50e4385b-f762-42a1-9f3f-89bca3785ff1</imagelabel>
</seclabel>
<seclabel type='dynamic' model='dac' relabel='yes'>
<label>+64055:+108</label>
<imagelabel>+64055:+108</imagelabel>
</seclabel>
</domain>
|
코드 블럭 |
---|
<disk type='file' device='disk'> <driver name='qemu' type='qcow2' cache='writethrough'/> <source file='/var/local/virl2/images/9688ac22-ad37-4cf3-aa06-2efe9d8c7786/86770ca2-685f-4c57-b215-350265c973c4/node0.img' index='2'> <seclabel model='dac' relabel='no'/> </source>d <backingStore type='file' index='3'> <format type='qcow2'/> <source file='/var/lib/libvirt/images/virl-base-images/cat8000v-17-13-01a/c8000v-universalk9_8G_serial.17.13.01a.qcow2'> <seclabel model='dac' relabel='no'/> </source> <backingStore/> </backingStore> <target dev='vda' bus='virtio'/> <alias name='virtio-disk0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/> </disk> |
코드 블럭 |
---|
# ls -alh /var/local/virl2/images/9688ac22-ad37-4cf3-aa06-2efe9d8c7786/86770ca2-685f-4c57-b215-350265c973c4/node0.img \
/var/lib/libvirt/images/virl-base-images/cat8000v-17-13-01a/c8000v-universalk9_8G_serial.17.13.01a.qcow2
-r--rw-r-- 1 libvirt-qemu virl2 1.9G Jun 23 23:35 /var/lib/libvirt/images/virl-base-images/cat8000v-17-13-01a/c8000v-universalk9_8G_serial.17.13.01a.qcow2
-rw-r--r-- 1 libvirt-qemu kvm 303M Aug 19 01:16 /var/local/virl2/images/9688ac22-ad37-4cf3-aa06-2efe9d8c7786/86770ca2-685f-4c57-b215-350265c973c4/node0.img |