安装可以使用命令行实现,也可以使用KVM管理器安装,这里只介绍命令行的一般安装方法
# virt-install --name=rhel6-1 --disk path=/kvm/rhel6-1/rhel6.img,size=10,sparse=true --graphics=vnc --network bridge=br0 --os-type=linux --os-variant=rhel6 --ram=1024 --cdrom=/media/rhel-server-6.1-i386-dvd.iso //本地安装
# virt-install --name=rhel6-2 --file=/kvm/rhel6-2/rhel6-2.img --file-size=10 --nonsparse --graphics spice --vcpus=2 --ram=2048 --location=http://example1.com/installation_tree/RHEL6.1-Server-x86_64/os --network bridge=br0 --os-type=linux --os-variant=rhel6-2 //http方式安装
网络安装方法
# virt-install --name=rhel6-3 --disk path=/kvm/rhel6-3/rhel6.img,size=10,sparse=true \
--graphics=vnc --vcpus=1 --ram=1024 --network bridge=br0 --os-type=linux \
--os-variant=rhel6 --location=nfs:10.1.1.1:/share/rhel6.1 --extra-args "ks=ftp://cs:cs@10.1.1.10/my.cfg"
参考:红帽虚拟化官方文档
