当使用virt-manager命令直接去安装一个很小的镜像文件(cirros操做系统的),此时会发生一个错误,该virt-manager会没法启动这个镜像文件,缘由在于virt-manager有它本身的默认的配置文件,而当咱们直接从界面上去安装的过程当中,使用的就是这个配置文件。做为一个新手,如今先无论这个配置文件是什么鬼,为了快速地搞定它,能够使用virt-install命令来安装这个镜像,从而启动这个虚拟机。使用命令以下:linux
virt-install \ --connect qemu:///system \ --ram 200 -n kvm1 \ --os-type=linux \ --disk path=/home/abc/project/cirros/cirros-0.3.4-x86_64-disk.img,device=disk,bus=virtio,format=qcow2 \ --vcpus=1 --nographics --noautoconsole --import