记一次虚拟机复制迁移到异机启动报could not open disk image /123.img: Invalid argument 错误
来源:互联网 发布:php人脸识别系统实现 编辑:程序博客网 时间:2024/05/22 13:19
过程是这样的;
内网两台机器
192.168.2.215 复制出
192.168.2.203 复制到此处启动
启动时报错
virsh # start z6-006-208
error: Failed to start domain z6-006-208
error: internal error process exited while connecting to monitor: char device redirected to /dev/pts/31
2017-11-10T09:50:14.300241Z qemu-kvm: -drive file=/kvm/z6-006-208-disk-001.img,if=none,id=drive-ide0-0-0,format=qcow2,cache=none: could not open disk image /kvm/z6-006-208-disk-001.img: Invalid argument
谷歌了无数次后在一个英文版的答案里面受到了启发 是磁盘文件的格式和xml配置文件里面的格式冲突了。
<disk type='file' device='disk'>
<driver name='qemu' type='qcow2' cache='none'/>
<source file='/kvm/z6-006-208-disk-001.img'/>
<target dev='vda' bus='virtio'/>
按那个文章 将配置中的qcow2改成了raw 然后启动成功了,但是个人还是感觉不对劲
virsh # start z6-006-208
Domain z6-006-208 started
于是乎进行和本地配置文件对比发现本地的配置文件中
<disk type='file' device='disk'>
<driver name='qemu' type='qcow2' cache='none'/> 这里后面的红色字体部分是没有的 而且磁盘格式也是qcow2
<source file='/kvm/z6-006-208-disk-001.img'/>
<target dev='vda' bus='virtio'/>
于是乎,我把红色字体部分删掉 将磁盘格式改回了qcow2
<disk type='file' device='disk'> <driver name='qemu' type='qcow2'/> <source file='/kvm/z6-006-208-disk-001.img'/> <target dev='vda' bus='virtio'/>
保存退出,再次启动,成功了。至此问题成功解决。 反正我是不会把磁盘格式改成raw的 不方便扩充 qcow2 方便扩充,虽然性能差一些,但灵活更重要。
- 记一次虚拟机复制迁移到异机启动报could not open disk image /123.img: Invalid argument 错误
- 错误kvm: --drive file=./ubuntu,cache=none,format=qcow2: could not open disk image : Invalid argument
- qemu: could not open disk image 错误解决方法
- qemu: could not open disk image
- qemu: could not open disk image
- virt-install could not open disk image
- virt-install could not open disk image
- Eclipse无法启动AVD qemu: could not open disk image(Ubuntu12.04)
- java虚拟机的启动错误PANIC: Could not open
- VirtualBox 启动报错 could not find an open hard disk with uuid 解决方法
- VirtualBox 启动报错 could not find an open hard disk with uuid 解决方法
- qemu-kvm(in libvirt)could not open disk image
- Invalid argument: could not call shmget错误处理方法
- Xcode 报错Could not find developer disk image,iOS10
- Could not open the editor: Invalid thread access报错
- CentOS6.x中vmware workstation 虚拟机启动报错:Could not open /dev/vmmon
- CentOS6.x中vmware workstation 虚拟机启动报错:Could not open /dev/vmmon
- CentOS 7上 启动虚拟机报错:could not open /dev/vmmon
- Tomcat配置问题
- Mybatis(一)
- ElasticSearch5.X聚合-条形图(四)
- 对gulp构建工具的一些常用功能的总结
- iOS开发-__func__的使用
- 记一次虚拟机复制迁移到异机启动报could not open disk image /123.img: Invalid argument 错误
- mysql 高可用之MySQL-MMM
- 数据中心联盟第五批大数据产品评测结果出炉,腾讯云大数据斩获多个奖项
- JAVA SE — Day 10
- Java后台Web开发有用的文章链接
- VPP安装运行及其运行测试框架
- rollup学习整理-2-插件详解
- 幸运的袋子问题(DFS+回溯+剪枝)
- File相关操作,java.nio.file.*