Use KVM technology to create a virtual machine with a Yum source, and be able to connect to the extranet

Source: Internet
Author: User

The first step is to mount the local CD ISO image file to the local FTP directory
Echo/etc/fstab

/root/桌面/ZF-100/nsd/xx/lisi/CLOUD/1/CentOS7-1708.iso   /var/ftp/centos7/   iso9660  defaults 0  0

The second step installs the software required to install the KVM

' Yum-y install QEMU-KVM libvirt-daemon libvirt-client Libvirt-daemon-driver-qemu '

Step three Create a new image file
cd/var/lib/libvirt/images/
QEMU-IMG create-f Format disk path size
Qemu-img create-f qcow2 nsd.img 10G #创建指定大小
can be set casually
Fourth step using Virsh management technology to create a virtual network card (call DNSMASQ to provide DNS, DHCP and other functions)
Echo/etc/libvirt/qemu/networks/vbr.xml
<network>
<name>vbr</name>
<bridge name= "VBR"/>
<forward mode= "Nat"/>
<ip address= "192.168.1.254" netmask= "255.255.255.0" >
<dhcp>
<range start= "192.168.1.100" end= "192.168.1.200"/>
</dhcp>
</ip>
</network>
virsh#
Net-define Vbr.xml Creating a virtual network
Net-start VBR to start a virtual network
Net-autostart VBR Set VBR virtual network on Start
Fifth step Virt-manager Installing the virtual machine
0.1 start Virt-manager software, select New virtual machine
0.2 Select the network installation source
Ftp://192.168.1.254/centos7
0.3 Click to generate a virtual machine
Select Custom Storage/var/lib/libvirt/images/nsd.img #刚才创建的镜像文件
0.4 Network Select a custom VBR
0.5 software Select Minimal, close KDUMP
– Select Manual Partitioning
0.6 use the standard partition format to divide only one root partition
0.7 opening the installation system

Use KVM technology to create a virtual machine with a Yum source, and be able to connect to the extranet

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.