Steps to install the image file on the Cisco virtual machine

The first step: install centos on vmware

Install the vmware virtual machine on your laptop or computer, and then the disk memory is allocated according to the internal memory provided by cisco. The most important thing is for the partition of the disk:
when partitioning the disk, choose a single file format to provide a choice of pictures ,For reference.
Insert picture description here
Select a single file according to the above prompts.
Then install the centos operating system and redhat operating system on the virtual machine.
After the system is installed, you can build some of your own applications in the system. Or some protocol information.

After packaging, restart centos, and then make the following corresponding settings for centos through the terminal:

First: Set the boot start:
systemctl enable [email protected]
Second: Start the service:
systemctl start [email protected]
Third: View the service startup status: (running is the running status)
systemctl status serial- [email protected]

Turn off the firewall: the
command is as follows:
systemctl disable firewalld To
stop the firewall:
systemctl stop firewalld

systemctl is-enabled firewalld

systemctl is-active firewalld

Resetting the mirror boot is mainly to pave the way for the newly configured network card.

Modify the location of the folder vim /etc/default/grub

Add the following field information in the following field information:
This method is added in centos:
GRUB_CMDLINE_LINUX="net.ifnames=0 biosdevname=0"

Re-configure after adding:
grub2-mkconfig -o /boot/grub2/grub.cfg

Then restart the server: reboot

Step 2: Package the installed operating system

The packaging method installation is prompted as follows:
1. Select the largest file in the directory of the centos system you installed, with a file suffix of vmdk:
For example: CentOS_XXX.vmdk is about 1G.
2. Pack this file in another system:
You can drag this file to another centos through scp and ftp tools for packing operation.

To install two commands on the new centos to make an image file.

Installation command: yum -y install qemu-guest-agent
yum-y install qemu-utils

Create a new directory in centos and put CentOS_XXX.vmdk in the newly created directory.

Then create a new file package.yaml in this directory as long as the content of this file matches the cisco server.
The configuration example is as follows:

(The following Chinese font is to introduce some of the information written roughly, and you can write it according to your own situation.)
########################## ########################## #################################################################################################################################################################################################################### ###############
descriptor-schema-version: “2.3”

info:
name: "Applying Commands"
description: "Described Application"
version: "1.0"
author-link: "Your own URL or something"
author-name: "centos Systems"

app:

Indicate app type (vm, paas, lxc etc.,)

type: vm
cpuarch: “x86_64”
resources:
profile: custom
cpu: 2000
memory: 1024
disk: 5
vcpu: 2

network:
  -
    interface-name: eth0
  -
    interface-name: eth1
  -
    interface-name: eth2

(This location is the name of centos network card configuration in)
the Startup:
Disks:
-
target-dev: "HDC"
File: "CentOS_XXX.qcow2"
################### ######################The
third step. We can package a qcow2 mirror file through the command.

**4. Finally, we provide a command through cisco: **ioxclient, package qowt into a rar. compressed file, there are two files stored in the butcher file, one configuration file is a yaml file and one is a compressed package.

Download ioxclient URL:
https://developer.cisco.com/docs/iox/#downloads

Among them, you can choose linux or windows, which depends on your situation.

The method to install ioxclient under centos is as follows:

Copy the downloaded ioxclient executable file to the /usr/local/bin directory and give ioxclient executable permissions:
the command is as follows: chmod +x ioxclient

Step 4. The method of making qcow2 is as follows:

ioxclient package --name myAppname.
(Note: Don’t forget the dot at the end represents the current directory)

5. Finally,
we install the packaged centos_XXX.rar into the Cisco virtual machine, and we can use it.

For the cisco installation steps, please check the cisco official website and follow the instructions on the official website.

Guess you like

Origin blog.csdn.net/weixin_44881103/article/details/103753707