码迷,mamicode.com
首页 > 其他好文 > 详细

安装kvm虚拟机报错,解决办法

时间:2014-08-13 19:16:57      阅读:1324      评论:0      收藏:0      [点我收藏+]

标签:虚拟机   listen   

创建虚拟磁盘文件

[root@vmware2 ~]# qemu-img create -f qcow2 -o preallocation=metadata dev_beyond.img 8G 

Formatting ‘dev_beyond.img‘, fmt=qcow2 size=8589934592 encryption=off cluster_size=65536 preallocation=‘metadata‘

参数说明: -o preallocation=metadata 预分配磁盘,磁盘空间不会立即占用

注意:ext3不支持此参数,ext4支持。

安装虚拟机命令参数

[root@vmware2 ~]# virt-install --name=dev_beyond --ram 512 --vcpus=1 -f /root/dev_beyond.img --cdrom=/iso/Centos6.iso --graphics vnc,listen=0.0.0.0,port=7777, --force --autostart


Starting install...

ERROR    internal error Process exited while reading console log output: char device redirected to /dev/pts/1

qemu-kvm: -drive file=/root/dev_beyond.img,if=none,id=drive-ide0-0-0,format=raw,cache=none: could not open disk image /root/dev_beyond.img: Permission denied


Domain installation does not appear to have been successful.

If it was, you can restart your domain by running:

  virsh --connect qemu:///system start dev_beyond

otherwise, please restart your installation.


解决办法:把-o preallocation=metadata去掉即可。

[root@vmware2 ~]# qemu-img create -f qcow2 /data/vmdisk/beyond.qcow2 8G      

Formatting ‘/data/vmdisk/beyond.qcow2‘, fmt=qcow2 size=8589934592 encryption=off cluster_size=65536 

[root@vmware2 ~]# virt-install --name=dev_beyond --ram 512 --vcpus=1 -f /data/vmdisk/beyond.qcow2 --cdrom=/iso/Centos6.iso --graphics vnc,listen=0.0.0.0,port=7777, --force --autostart                   


Starting install...

Creating domain...                                                                |    0 B     00:03     

Cannot open display: 

Run ‘virt-viewer --help‘ to see a full list of available command line options

Domain installation still in progress. You can reconnect to 

the console to complete the installation process.

bubuko.com,布布扣

本文出自 “岁月在流逝,光辉依然在” 博客,请务必保留此出处http://taokey.blog.51cto.com/4633273/1539562

安装kvm虚拟机报错,解决办法,布布扣,bubuko.com

安装kvm虚拟机报错,解决办法

标签:虚拟机   listen   

原文地址:http://taokey.blog.51cto.com/4633273/1539562

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!