an hypervisor is a layer of software allowing to virtualize a node in a set of virtual machines with possibly different configurations than the node itself
a domain is an instance of an operating system (or subsystem in the case of container virtualization) running on a virtualized machine provided by the hypervisor
Xen
面向 IA-32,IA-64 和 PowerPC 970 架构的虚拟机监控程序
QEMU
面向各种架构的平台仿真器
Kernel-based Virtual Machine (KVM)
Linux 平台仿真器
Linux Containers(LXC)
用于操作系统虚拟化的 Linux(轻量级)容器
OpenVZ
基于 Linux 内核的操作系统级虚拟化
VirtualBox
x86 虚拟化虚拟机监控程序
User Mode Linux
面向各种架构的 Linux 平台仿真器
Test
面向伪虚拟机监控程序的测试驱动器
Storage
存储池驱动器(本地磁盘,网络磁盘,iSCSI 卷)
2. 如何安装虚拟机和简单使用
CentOS6.5 x64上安装KVM功能模块步骤
操作都以root用户进行。
检查CPU信息
KVM 需要有 CPU 的支持(Intel VT 或 AMD SVM),在安装 KVM 之前检查一下 CPU 是否提供了虚拟技术的支持。
win7 : Microsoft Windows 7
vista : Microsoft Windows Vista
winxp64 : Microsoft Windows XP (x86_64)
winxp : Microsoft Windows XP
win2k8 : Microsoft Windows Server 2008
win2k3 : Microsoft Windows Server 2003
freebsd8 : FreeBSD 8.x
generic : Generic
debiansqueeze : Debian Squeeze
debianlenny : Debian Lenny
fedora16 : Fedora 16
fedora15 : Fedora 15
fedora14 : Fedora 14
mes5.1 : Mandriva Enterprise Server 5.1 and later
mandriva2010 : Mandriva Linux 2010 and later
rhel6 : Red Hat Enterprise Linux 6
rhel5.4 : Red Hat Enterprise Linux 5.4 or later
rhel4 : Red Hat Enterprise Linux 4
sles11 : Suse Linux Enterprise Server 11
sles10 : Suse Linux Enterprise Server
ubuntuoneiric : Ubuntu 11.10 (Oneiric Ocelot)
ubuntunatty : Ubuntu 11.04 (Natty Narwhal)
ubuntumaverick : Ubuntu 10.10 (Maverick Meerkat)
ubuntulucid : Ubuntu 10.04 (Lucid Lynx)
ubuntuhardy : Ubuntu 8.04 LTS (Hardy Heron)
2. disk属性就是指虚拟机使用哪一个磁盘镜像文件作为存储地方,指定刚才创建的镜像文件位置即可,size=10,format=qcow2,bus=virtio分别是指大小,格式(跟镜像格式一致),磁盘总线类型(指Value can be ’ide’, ’scsi’, ’usb’, ’virtio’ or ’xen’,virtio是专门为kvm制定的bus,比较常用),大小需要比镜像文件大小要小,相当于镜像是容器,这个disk是里面的水,水太多就溢出了。
3. bridge=br0,model=virtio --keymap=en-us分别指网卡使用,网卡模式即驱动模式,和键盘制式,桥接模式都使用br0,而虚拟机需要使用virtio这个驱动才能使用虚拟网卡,这个虚拟网卡驱动在linux下支持很好,在windows下支持一般,键盘制式如果不指定的话会出现键位错乱的情况,一般我们使用英式
4. 安装centos6.5的时候我使用了2次disk,原因是因为centos6.5的安装盘启动引导安装有问题,会出现无法查找到安装源的情况,所以特地加载多一个iso,一个作为启动使用,一个作为安装源使用,作为安装源使用的时候是使用磁盘格式存储
5. vnc相关配置,这个vnc如果配置了的话是virt-tools组件自带的,无需要额外安装vnc服务端,默认绑定127.0.0.1,这里将其改为 0.0.0.0 以便可以通过外部连接,每一台的虚拟机的端口都不能一致,一致就会冲突而造成无法启动安装。
6. 如果无须使用图形界面安装,virt-install默认是支持文本模式安装的。
error: this function is not supported by the hypervisor: disk bus 'ide' cannot be hotplugged.
error: Requested operation is not valid: cannot attach device on inactive domain
error: Failed to attach device from /gfs1/disk2tovm2.xml
error: this function is not supported by the hypervisor: disk bus 'ide' cannot be hotplugged