Steps to share Linux integration components required for Hyper-V CentOS installation

Time:2021-10-23
The steps are as follows:
First, you need kernel devel and GCC
My is a 64 bit CentOS and requires adjtimex rpm to ensure time accuracy
Because there is no network, you have to install from the CD. To set Yum’s repo to disc
therefore
# cd /etc/yum.repo.d

1

Two repos

There are two repos in CentOS
Centos-base.repo and centos-media.repo
Base.repo is an online update repo
Media.repo is the input device repo
Change the name of centos-base.repo to make the system skip the repo
# mv CentOS-Base.repo  CentOS-Base.repo.bk
Set the repo source, set the baseurl to the CD-ROM directory / MNT / CDROM, and enabled to 1 for startup
# vim CentOS-Media.repo

2

vim CentOS-Media.repo

Change to

3

Change to

Load the CentOS disk into the drive of this virtual machine

Then mount to the directory

# mkdir /mnt/cdrom
# mount /dev/cdrom /mnt/cdrom

4

Mount to directory

Installing the kernel devel Suite

# yum install kernel-devel -y

Install the GCC kit when finished

# yum install gcc -y

The adjtimex rpm is also required for 64 bit systems

# rpm –ivh /mnt/cdrom/Centos/adjtimex-1.20-2.1.x86_64.rpm

Then umount the original installation disc

# umount /mnt/cdrom 

Put Microsoft’s official website in Hyper-V controller

Linux Integration Services v2.1 for Windows Server 2008 Hyper-V R2

Address:http://www.microsoft.com/downloads/details.aspx?displaylang=zh-tw&FamilyID=eee39325-898b-4522-9b4c-f4b5b9b64551

The extracted ISO is loaded into the optical drive

then

# mount -t  iso9660  /dev/cdrom  /mnt/cdrom

# cp /mnt/cdrom/* /opt/linux -R

Then install it

# cd /opt/linux_ic_v21_rtm

# make

# make install

Last restart
# reboot
Once configured, you can take a look

5

Ifconfig look

The names are ifcfg-eth0, ifcfg-eth1… If you have one CentOS network card IP, there is only one ifcfg-eth0 file. If you have two or more CentOS network card IP, there will be ifcfg-eth1, ifcfg-eth2 and other files.

File structure:

    DEVICE=eth0  // Indicate the device name bootproto = static / / startup type   DHCP,,,, dcph or static   Automatic and manual broadcast = 192.168.1.255  // Broadcast address hwaddr = 00:06:5b: Fe: DF: 7C / / hardware MAC address IPADDR = 192.168.0.2 / / IP address netmask = 255.255.255.0    // Subnet mask network = 192.168.0.1      // Network address onboot = yes   // Start application type = Ethernet      // Network type

1  vim /etc/sysconfig/network-scripts/ifcfg-teh0

2. Start service network restart

The DNS server information command for CentOS network card editing host: VIM / etc / resolv.conf

Recommended Today

Crash tracking journey of IOS development (I)

Preface: Recently, I encountered a crash blood disaster caused by crash in daily development. In a release in early May, the crash rate of the app developed by the author was directly increased from one thousand to nearly two thousand. At that time, the project leader just needed to report the relevant situation of project […]