部署KVM虚拟化平台

一、YUM安装KVM

yum groupinstall -y "GNOME Desktop" qemu-kvm qemu-kvm-tools virt-install qemu-img bridge-utils libvirt virt-manager

ln -sf /lib/systemd/system/graphical.target /etc/systemd/system/default.target

验证

cat /proc/cpuinfo | grep vmx

lsmod | grep kvm

systemctl start libvirtd

systemctl enable libvirtd

二、设置KVM网络

vim /etc/sysconfig/network-scripts/ifcfg-ens33

...

BRIDGE=br0

vim /etc/sysconfig/network-scripts/ifcfg-br0

TYPE=Bridge

NAME=br0

DEVICE=br0

ONBOOT=yes

IPADDR=192.168.107.200

NETMASK=255.255.255.0

GATEWAY=192.168.107.2

systemctl restart network

三、KVM管理

virt-manager

virsh -h

ls /etc/libvirt/qemu

virsh list -all

virsh shutdown test01

virsh start test01

virsh destroy test01

virsh create /etc/libvirt/qemu/test01.xml

virsh suspend test01

virsh resume test01

virsh autostart test01

virsh dumpxml test01 > /etc/libvirt/qemu/test02.xml

virsh undefine test01

virsh define test01.xml

virsh edit test01

文件管理

qemu-img info /data_kvm/store/test01.qcow2

qemu-img convert -f raw -O qcow2 /data_kvm/store/test01.img /data_kvm/store/test01.qcow2

virsh edit test01

yum -y install libguestfs-tools-c

virt-edit -a /data_kvm/store/test01.qcow2 /etc/resolv.conf

virt-df -h test01

virt-clone -o test01 -n test02 -f /data_kvm/store/test02.qcow2

快照

virsh snapshot-create test01

virsh snapshot-current test01

virsh snapshot-list test01

virsh snapshot-revert test01 1503494464

virsh snapshot-delete test01 1503494464

相关推荐
一枚正在学习的小白1 分钟前
prometheus监控redis
linux·运维·服务器·redis·prometheus
白帽子凯哥哥2 分钟前
Misc题目中图片隐写和流量分析的详细工具使用技巧
linux·运维·web安全·网络安全·docker·渗透测试
lzjava20243 分钟前
Python中的模块和包
linux·开发语言·python
DX_水位流量监测4 分钟前
城市易涝点水位雨量监测设备技术体系与实践应用
大数据·运维·服务器·网络·人工智能
一颗小树x8 分钟前
NVIDIA Jetson Orin 安装 Docker
运维·docker·容器·安装·jetson orin
大山同学9 分钟前
薄膜透光度原理
linux·运维·人工智能
lifewange15 分钟前
Linux 日志查看核心命令(动态跟踪 + 文件查阅,全覆盖工作常用)
linux·运维·服务器
dlhto15 分钟前
Kiro Remote SSH 无法连接远程服务器问题排查与解决
运维·服务器·ssh
JiMoKuangXiangQu19 分钟前
Linux 网络:RPS 简介
linux·网络·rps 和 rfs
Awkwardx26 分钟前
Linux网络编程—五种IO模型与非阻塞IO
linux·服务器·网络