技术标签: KVM KVM Migrate Virsh
ERROR1:
背景:虚拟机的镜像文件放在nfs服务器的共享文件夹中,源主机将共享目录挂载到本机的/mnt/nfs文件夹中,镜像文件为vdisk.img,当源主机启动虚拟机时报如下错误:
[root@qinshang mnt]# virsh start vdisk
error: Failed to start domain vdisk
error: 内部错误 Process exited while reading console log output: char device redirected to /dev/pts/1
qemu-system-x86_64: -drive file=/mnt/nfs/vdisk.img,if=none,id=drive-ide0-0-0,format=qcow2: could not open disk image /mnt/nfs/vdisk.img: Permission denied
Analytics:
SELinux is preventing /usr/bin/qemu-system-x86_64 from open access on the file /mnt/nfs/vdisk.img.
Soution:
If you want to allow confined virtual guests to manage nfs files.Then you must tell SELinux about this by enabling the 'virt_use_nfs' boolean.You can read 'virt_selinux' man page for more details.
Do
setsebool -P virt_use_nfs 1
If you believe that qemu-system-x86_64 should be allowed open access on the vdisk.img file by default.
Then you should report this as a bug.You can generate a local policy module to allow this access.
Do allow this access for now by executing:
grep qemu-system-x86 /var/log/audit/audit.log | audit2allow -M mypol
semodule -i mypol.pp
ERROR2:
背景:有时候查看挂载nfs共享文件的目录的时候,会出现 stale file handle错误,错误原因这里就不解释了,有兴趣的话,可以访问以下网址:
Solution2:
先用umount -f /mnt/nfs/命令,如果还不奏效的话,再用umount -l /mnt/nfs/命令,如果依然不奏效的话,多敲几下这些命令,再不行的话,关掉nfs服务器,然后重新启动,接着再重新挂载即可解决!
ERROR3:
背景:运行virsh start centos(此处为具体的虚拟机名字)时候,会出现以下错误
error: Failed to reconnect to the hypervisor
error: no valid connection
error: Failed to connect socket to '/usr/local/var/run/libvirt/libvirt-sock': No such file or directory
Solution3:
ln -s /var/run/libvirt/libvirt-sock /usr/local/var/run/libvirt/libvirt-sock
ERROR4:
背景:运行virsh命令的时候,显示以下错误
error: failed to connect to the hypervisor
error: no valid connection
error: Failed to connect socket to '/usr/local/var/run/libvirt/libvirt-sock': Connection refused
分析:
ibvirtd is not running, or running but waiting on '/var/run/libvirt/libvirt-sock' where your virsh is try to look up'/usr/local/var/run/libvirt/libvirt-sock'
Solution4:
先运行libvirtd -d , 如果virsh命令能用的话,说明libvirtd已经启动,如果这时候打开virtual manager来管理虚拟机报错的话,再运行命令 systemctl restart libvirtd.service 即可解决!
这时候运行 ps aux | grep libvirtd 查看libvirtd进程的时候可以看到以下结果
暂时先到这,有发现新的问题会再补充
int DepthCamera::exec_cmd_using_popen(char const* cmd, QStringList& res_vec){if (cmd == NULL){printf(“popen cmd is NULL\n”);return 1;}char tmp[1024];FILE* fp = popen(cmd, “r”);if (NULL ==..._linux脚本exec_cmd
转载请注明出处,保留原帖地址及作者署名.Url:http://blog.csdn.net/ysy441088327/article/details/7392842#replyAuthor:余书懿为了达到 iPhone 与 Android 实现音频互通. 那么Mp3格式的音频文件再好不过了.至于能够转换成Amr 是最好,10秒 的 一个Amr文件 只有5K左右_lamejs转mp3
#include<iostream>using namespace std;int main() { int i ; for (i = 6;; i++) { int m = i; if (m % 5 != 1) continue; m = m - 1; m = m * 4 / 5; if (m % 5 != 2) continue; m ...
一、JS 拖拽的实现实例代码:拖拽jshtml, body {overflow:hidden;}body, div, {margin:0;padding:0;}body {color:#fff;font:12px/2 Arial;}p {padding:0 10px;margin-top:10px;}span {color:#ff0;padding-left:5px;}#box {position...
本质上,webpack是一个现代JavaScript应用程序的静态模块打包器(module bundler)。当webpack处理应用程序时,它会递归的构建一个依赖关系图,其中包含应用程序需要的每个模块,然后将所有这些模块打包成一个或多个bundle。在开始前,需要先了解webpack中的四个核心概念:入口(entry)、输出(output)、loader、插件(plugins)。**entry:**应该使用哪个(哪些)模块来作为构建其内部依赖图的开始。**output:**输出所创建的bund._前台代码主流压缩软件 webpack
1、高德纳箭头2、葛力函数如果脑子里面装一个葛里恒数,脑子就成了黑洞了。后来人们研究出tree3_rayo数
Python3class Solution: def rob(self, root): """ :type root: TreeNode :rtype: int """ check = self._rob(root) return max(check[0], check[1]) def _rob(self, root): if not root: ..._337. 打家劫舍 iii
1.概述格网是使用建立格网图层地理处理工具(ArcGIS for Desktop Standard 许可等级)和格网定义文件创建的,格网定义文件中包含了规范中的全部详情。该文件中存储了各个格网的规范属性,如编号、颜色及格网线的线条粗细等信息。如果采用定义模板,则会使用基于当前比例、坐标系和/或所选要素(感兴趣区域)范围确定的规范来创建要素。建立格网图层地理处理工具会尝试基于给定范围计算坐标系。2.获取数据本教程所使用的数据为水经注万能地图下载器中下载的乡镇边界数据,除了乡镇边界数据,常见的矢.._arcgis格网
你是否知道平常被一直用来当做调味料的芝麻酱可是个好东西哦,对于小孩子的成长真是百益而不一害,上海交通大学医学院上洪昭毅教授着力推荐! 洪昭毅说,芝麻酱营养丰富,所含的脂肪、维生素E、矿物质等都是儿童成长必须的,其所含蛋白比瘦肉还高;含钙量更是仅次于虾皮。所以,经常给孩子吃点芝麻酱,对预防佝偻病以及促进骨骼、牙齿的发育大有益处。芝麻酱还含铁丰富,孩子6个月后,容易出现贫血..._4岁孩子分不清芝麻酱和土
Linux Mint 18.1“Serena” Xfce版本是一款官方最近推出的一款全新的版本,该版本与之前的Ubuntu 16.04系统一样能为用户提供较长一段时间的支持使用。用户进行更新时需要下载正式版本。作为一款桌面环境的操作系统,是非常不错的。软件介绍:在默认情况下,Linux Mint使用Mate和Cinnamon作为桌面环境,不过该操作系统同时也提供KDE和Xfce版本。今天,Linu..._mint linux中文
目录盒模型代码简写颜色值缩写字体缩写盒模型代码简写还记得在讲盒模型时外边距(margin)、内边距(padding)和边框(border)设置上下左右四个方向的边距是按照顺时针方向设置的:上右下左。具体应用在margin和padding的例子如下:margin:10px 15px 12px 14px;/*上设置为10px、右设置为...
对于求一个锐化后的像素点(sharpened_pixel),这个基于拉普拉斯算子的简单算法主要是遍历图像中的像素点,根据领域像素确定其锐化后的值计算公式:sharpened_pixel = 5 * current – left – right – up – down ;见下图:当一个运算是通过领域像素进行的时候,我们通常用一个矩阵来表示这种运算关系,也就是我们经常所说的 核 (