libvirt 问题解决记录集
来源:互联网 发布:nodejs php 网站 编辑:程序博客网 时间:2024/06/04 23:26
本篇记录在使用libvirt的时候遇到的一些情况,即解决方法.
出现Permission denied
[root@localhost vm]# virsh start centos
error: Failed to start domain centos
error: internal error process exited while connecting to monitor: qemu-system-x86_64: -drive file=/home/d/shixun/vm/vdisk.img,if=none,id=drive-ide0-0-0,format=qcow2: could not open disk image /home/d/shixun/vm/vdisk.img: Permission denied
解决:/etc/libvirt/qemu.conf
# 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"
# Whether libvirt should dynamically change file ownership
# to match the configured user/group above. Defaults to 1.
# Set to 0 to disable file ownership changes.
dynamic_ownership = 0
我的这个没能解决问题
/etc/init.d/libvirtd restart 不管用
libvirt遇到死锁
在使用virsh对虚拟机进行动态迁移时,虚拟机没有开启.于是就去开启虚拟机,但是却发现无法运行.
Error starting domain: Timed out during operation: cannot acquire state change lock
libvirtError: Timed out during operation: cannot acquire state change lock
我进行了以下的步骤
virsh undefine centos
####Login as a root user and kill the libvirtd.
killall -9 libvirtd
rm /var/run/libvirtd.pid ##### Remove the libvirtd pid file.
/etc/init.d/libvirtd restart #### Restart libvirtd.
在尝试上面的操作后,不起作用.
修改一下的domain的xml文件中的name标签,给虚拟机改个名字,期间我还删除了domain的xml文件里的qemu:commandline
里面信息,重新define后就可以运行了.
迁移需要FQDN
在进行迁移的时候使用命令 virsh migrate –live ubuntu qemu+ssh://dest_ip/system
error: internal hostname on destination resolved to localhost, but migration requires an FQDN
解决:ssh进入到dest host机器,运行hostname domain 就好了.其中domian是一个域名.将接下来就可以进行迁移了.
启动nfs出现问题
启动NFS服务,出现问题
Failed to issue method call: Unit nfsserver.service failed to load: No such file or directory. See system logs and 'systemctl status nfsserver.service' for details.
解决:按照教程来就好了
# vim /etc/exports
/var/lib/libvirt/images *.example.com(rw,no_root_squash,sync)
# service nfs start
# mount -t nfs storage_host:/var/lib/libvirt/images /var/lib/libvirt/images
挂载nfs出现问题
当去mount远程的nfs服务器,出现问题了.
mount.nfs: access denied by server while mounting 211.87.***.53:/mnt/nfs
解决:原来发现,在/etc/exports中,没有将/mnt/nfs添加进去,只能将里面有的文件夹才能mount到本机来.
可以先umoutn /mnt/nfs ,然后在mount看看能否成功
virsh关闭虚拟机
virsh shutdown 关闭虚拟机没起作用
解决:需要在虚拟机里安装一些东西
yum install acpid
chkconfig acpid on
service acpid start
virsh无法使用ssh协议访问远程机器
当我去远程查询信息的时候,virsh -c qemu+ssh://211.87.***.88/system list
的时候出现了下面的问题.
error: failed to connect to the hypervisor
error: no valid connection
error: End of file while reading data: : Input/output error
查看日志 cat /var/log/secure | grep sshd
发现是我这里主动发出断开的.难道是检测到libvirtd有些问题导致的?
当时使用virt-manage可以查询到远程的信息.估计是sshd出现的问题把.
解决:我没有重新安装sshd,我是通过tcp协议进行迁移的,因为是做测试,所以没有考虑安全的问题.具体使用tcp进行迁移,查看virsh使用qemu+tcp访问远程libvirtd .
- libvirt 问题解决记录集
- libvirt 问题解决记录集
- (转载)libvirt 问题解决记录集
- libvirt 问题解决记录集(更新中)
- libvirt问题解决
- 学习libvirt-记录
- libvirt安装后virsh报错问题解决
- 问题解决,libvirt start img,Permission denied
- 问题解决记录
- 问题解决记录
- libvirt
- libvirt
- libvirt
- QT安装问题解决记录
- VMware安装问题解决记录
- 实验问题解决记录
- CentOS6.3 问题解决记录
- 问题解决方法记录
- JAVA爬取学校教务处课表
- android opengl es 总结
- [知了堂学习笔记] javascript BOM
- Android中WebView拿到当前的网址和上一页面的网址
- 使用Caffe对摄像机视频流中的目标进行识别
- libvirt 问题解决记录集
- CUDA并行排序(1)——双调排序(unsigned int型数据)
- Android逆向之旅---动态方式破解apk进阶篇(IDA调试so源码)
- 支付宝和微信支付时的MD5加密
- 语音的基本概念--译自CMU sphinx
- ajax form表单提交 input file中的文件
- 微信公众号开发(三)前端界面
- html5知识整理
- Course Schedule(leetcode 207)