微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

ubuntu创建kvm虚拟机

cpu虚拟化支持
[[email protected]~]# egrep -o '(vmx|svm)' /proc/cpuinfo
vmx
vmx
vmx
vmx
KVM环境
[[email protected] ~]# apt-get install qemu-kvm qemu-system libvirt-bin virt-manager bridge-utils vlan
[[email protected] ~]# service libvirt-bin status
libvirt-bin start/running,process 1442

ACPI 高级配置和电源管理接口,通过这个服务来执行电源关闭的动作

[[email protected] ~]# apt-get install acpid 
[[email protected] ~]# service acpid status
acpid start/running,process 1364
制作iso镜像
[[email protected] ~]# dd if=/dev/sr0 of=/data/iso/CentOS-V6.5.23.iso          
1801312+0 records in
1801312+0 records out
922271744 bytes (922 MB) copied,29.0399 s,31.8 MB/s
制作磁盘镜像
[[email protected] ~]# qemu-img create -f raw /data/raw/disk01.raw  10G
Formatting '/data/raw/disk01.raw',fmt=raw size=10737418240
创建虚拟机
[[email protected] ~]# virt-install >     --name=CentOS-V6.5.23-server01 >     --virt-type=kvm >     --ram=1024 >     --cdrom=/data/iso/CentOS-V6.5.23.iso   >     --disk path=/data/raw/disk01.raw >     --network network=default >     --graphics vnc,listen=0.0.0.0 >     --noautoconsole

Starting install...
Creating domain...                                                                                               |    0 B     00:00     
Domain installation still in progress. You can reconnect to 
the console to complete the installation process.

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐