当前位置:网站首页>KVM installation and deployment
KVM installation and deployment
2022-04-23 09:21:00 【King_ nul】
KVM Installation and deployment
One 、 Create a new virtual machine first , Good configuration ip Address , Close the firewall and selinux
# close selinux
[root@tools ~]# getenforce
Permissive
# Turn off firewall
[root@tools ~]# systemctl stop firewalld && systemctl disable firewalld
Removed symlink /etc/systemd/system/multi-user.target.wants/firewalld.service.
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
# To configure ip Address
[root@tools ~]# tail -4 /etc/sysconfig/network-scripts/ifcfg-ens33
IPADDR=192.168.2.13
PREFIX=24
GATEWAY=192.168.2.2
DNS1=114.114.114.114
Two 、 To configure yum
# Move yum.repos.d All the documents under to media in
[root@tools ~]# mv /etc/yum.repos.d/* /media/ | ll /etc/yum.repos.d/
total 0
# Required for transmission yum Mount and make documents repo Source
[root@tools ~]# mv kvm_yum /opt/
[root@tools ~]# ll /opt/
total 0
drwxr-xr-x. 5 root root 53 Apr 6 12:44 kvm_yum
# Make yum Source
[root@tools ~]# vim /etc/yum.repos.d/kvm.repo
[root@tools ~]# head -n 6 /etc/yum.repos.d/kvm.repo
[kvm]
name=kvm
baseurl=file:///opt/kvm_yum
gpgcheck=0
enabled=1
# Verification source
[root@tools ~]# yum repolist
Loaded plugins: fastestmirror
Determining fastest mirrors
kvm | 3.6 kB 00:00:00
(1/2): kvm/group_gz | 166 kB 00:00:00
(2/2): kvm/primary_db | 3.1 MB 00:00:00
repo id repo name status
kvm kvm 4,021
repolist: 4,021
3、 ... and 、 install kvm Software and tools and start the virtual machine
usage: qemu-kvm [options] [disk_image]
'disk_image' is a raw hard disk image for IDE hard disk 0
# Software to install
[root@tools ~]# yum -y install qemu-kvm openssl libvirt
# start-up libvirt service
[root@tools ~]# systemctl start libvirtd
# Give the file executable rights
[root@tools ~]# chmod +x qemu-ifup-NAT.txt
[root@tools ~]# ll
-rw-r--r--. 1 root root 13287936 Apr 6 12:43 cirros-0.3.3-x86_64-disk.img
-rwxr-xr-x. 1 root root 2094 Apr 6 12:43 qemu-ifup-NAT.txt
# Establish a soft connection , Connect kvm The source file
[root@tools ~]# ln -s /usr/libexec/qemu-kvm /usr/bin/qemu-kvm
[root@tools ~]# ll -d /usr/bin/qemu-kvm
lrwxrwxrwx. 1 root root 21 Apr 6 13:14 /usr/bin/qemu-kvm -> /usr/libexec/qemu-kvm
# start-up kvm Program , Start virtual machine
[root@tools ~]# qemu-kvm -m 1024 -drive file=/root/cirros-0.3.3-x86_64.img,if=virtio -net nic,model=virtio -net tap,script=/root/qemu-ifup-NAT.txt -nographic -vnc :1
____ ____ ____
/ __/ __ ____ ____ / __ \/ __/
/ /__ / // __// __// /_/ /\ \
\___//_//_/ /_/ \____/___/
http://cirros-cloud.net
login as 'cirros' user. default password: 'cubswin:)'. use 'sudo' for root.
cirros login: cirros
Password:
$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 52:54:00:12:34:56 brd ff:ff:ff:ff:ff:ff
inet 192.168.122.76/24 brd 192.168.122.255 scope global eth0
inet6 fe80::5054:ff:fe12:3456/64 scope link
valid_lft forever preferred_lft forever
版权声明
本文为[King_ nul]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230629527258.html
边栏推荐
- js 原型链的深入
- Give the method of instantiating the object to the new object
- web页面如何渲染
- Applet error: should have URL attribute when using navigateto, redirectto or switchtab
- Single sign on SSO
- Summary of common concepts and problems of linear algebra in postgraduate entrance examination
- 三、6【Verilog HDL】基础知识之门级建模
- Machine learning (VI) -- Bayesian classifier
- 108. 将有序数组转换为二叉搜索树
- Open services in the bottom bar of idea
猜你喜欢

《信息系统项目管理师总结》第八章 项目干系人管理

A must see wechat applet development guide 1 - basic knowledge

Chapter VIII project stakeholder management of information system project manager summary

The most concerned occupations after 00: civil servants ranked second. What was the first?

NLLLoss+log_ SoftMax=CE_ Loss

Kettle experiment (III)

LeetCode_ DFS_ Medium_ 1254. Count the number of closed islands

Go language learning notes - slice, map | go language from scratch

Detailed explanation of delete, truncate and drop principles in MySQL database

数据清洗 ETL 工具Kettle的安装
随机推荐
Failed to download esp32 program, prompting timeout
机器学习(六)——贝叶斯分类器
ALV树(LL LR RL RR)插入删除
Technological innovation in government affairs in the construction of Digital Government
kettle庖丁解牛第14篇之JSON输入
【读书笔记】《Verilog数字系统设计教程》 第5章 条件语句、循环语句和块语句(附思考题答案)
Withholding agent
Thread scheduling (priority)
[geek challenge 2019] havefun1
三、6【Verilog HDL】基础知识之门级建模
Pctp test experience sharing
資源打包關系依賴樹
2D 01 Backpack
Applet error: cannot read property'currenttarget'of undefined
Go language self-study series | golang structure as function parameter
基于ThinkPHP5版本TRC20-资金归集解决方案
Learn FPGA (from Verilog to HLS)
Wechat applet catchtap = "todetail" event problem
501. 二叉搜索树中的众数
112. Path sum