RHEL学习 - 各种问题集合
1.关闭subscription Manager
不会导致redhat.repo的经常生成
找到subscription-manage的配置文件/etc/yum/pluginconf.d/subscription-manager.conf
[main] enabled=0
2.文件删除
- 删除大小为0的文件
find ./ -name "*" -type f -size 0c | xargs -n 1 rm -f
- 删除大小小于5K的文件
find ./ -size -5k -exec rm {} \;
- 删除大于50M的文件
find ./ -size +50M -exec rm {} \;
3. 安装KVM
dnf install qemu-kvm qemu-img libvirt virt-install libvirt-client
4.启动虚拟机发生的问题
qemu-kvm: could not open disk image ' ': Permission denied
修改 /etc/libvirt/qemu.conf, 把user和group的root打开
# The user for QEMU processes run by the system instance. It can be # specified as a user name or as a user id. The qemu driver will try to # parse this value first as a name and then, if the name doesn't exist, # as a user id. # # Since a sequence of digits is a valid user name, a leading plus sign # can be used to ensure that a user id will not be interpreted as a user # name. # # Some examples of valid values are: # # user = "qemu" # A user named "qemu" # user = "+0" # Super user (uid=0) # user = "100" # A user named "100" or a user with uid=100 # user = "root" # The group for QEMU processes run by the system instance. It can be # specified in a similar way to user. group = "root"
然后
service libvirtd restart
5.虚拟机操作
启动虚拟机
virt-install --connect qemu:///system -n fcos -r 2048 --os-variant=fedora31 --import --graphics=none --disk size=10,backing_store=/root/fedora-coreos-32.20200726.3.1-qemu.x86_64.qcow2 --qemu-commandline="-fw_cfg name=opt/com.coreos/config,file=/root/example-ignition.ign"
列出虚拟机
[root@localhost .ssh]# virsh list Id Name State ---------------------------------------------------- 1 fcos running
停止
[root@localhost .ssh]# virsh shutdown fcos Domain fcos is being shutdown [root@localhost .ssh]# virsh list --all Id Name State ---------------------------------------------------- - fcos shut off
重新启动
virsh --connect qemu:///system start fcos
标签:
Linux
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 地球OL攻略 —— 某应届生求职总结
· 提示词工程——AI应用必不可少的技术
· Open-Sora 2.0 重磅开源!
· 周边上新:园子的第一款马克杯温暖上架
2016-03-15 采用Apache作为WebLogic Server集群的负载均衡器