当前位置:网站首页>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
边栏推荐
- kettle实验
- Is Zhongyan futures safe and reliable?
- Principle of synchronized implementation
- Operation not allowed for a result set of type resultset TYPE_ FORWARD_ ONLY. Explain in detail
- 小女孩行走
- [in-depth good article] detailed explanation of Flink SQL streaming batch integration technology (I)
- Download and install bashdb
- Go language learning notes - exception handling | go language from scratch
- DJ music management software pioneer DJ rekordbox
- Chapter VIII project stakeholder management of information system project manager summary
猜你喜欢
653. Sum of two IV - input BST
Kettle实验 (三)
Buuctf [actf2020 freshman competition] include1
LeetCode_ DFS_ Medium_ 1254. Count the number of closed islands
Brush classic topics
npm报错 :operation not permitted, mkdir ‘C: \Program Files \node js \node_ cache _ cacache’
Detailed explanation of delete, truncate and drop principles in MySQL database
NLLLoss+log_ SoftMax=CE_ Loss
Mini - exercice MySQL (seulement pour les débutants, pas pour les non - débutants)
112. Path sum
随机推荐
3、 6 [Verilog HDL] gate level modeling of basic knowledge
The crawler returns null when parsing with XPath. The reason why the crawler cannot get the corresponding element and the solution
小女孩行走
Write down the post order traversal of the ~ binary tree
Notes on xctf questions
Go language learning notes - structure | go language from scratch
kettle庖丁解牛第14篇之JSON输入
Thread scheduling (priority)
How does kubernetes use harbor to pull private images
《數字電子技術基礎》3.1 門電路概述、3.2 半導體二極管門電路
小程序报错:Cannot read property 'currentTarget' of undefined
#yyds干货盘点#ubuntu18.0.4安装mysql并解决ERROR 1698: Access denied for user ''root''@''localhost''
501. Mode in binary search tree
OpenCV中的图像处理 —— 轮廓入门+轮廓特征
How to read excel table to database
Canary publishing using ingress
Summary of common concepts and problems of linear algebra in postgraduate entrance examination
Kettle experiment (III)
Kettle实验
SAP 101K 411k inventory change