08/19/2014 15:34 | | Posted by VladStar |
Prerequisites:
- RedHat/CentOS/Oracle Linux 6.4 server with CPU virtualization support: http://en.wikipedia.org/wiki/X86_virtualization
- Kickstart installation environment (you can manually provision it as VM and then use to install other VMs in automatic mode): http://en.wikipedia.org/wiki/Kickstart_(Linux)
Install necessary packages and start the service:
# yum install -y gpxe-roms gpxe-roms-qemu libvirt python-virtinst qemu-img qemu-kvm qemu-kvm-tools vconfig virt-manager
# service libvirtd start
Create VM image and perform installation from using the kiskstart environment:
# qemu-img create -f qcow2 -o preallocation=metadata /path_to_vm/vm1disk.img 10G
# virt-install -n vm1_name -r 2048 --vcpus=2 -v -w bridge:br1,model=virtio --disk path=/path_to_vm/vm1disk.img,device=disk,format=qcow2,bus=virtio,io=native,size=10 -l http://repository_server/repository_path --nographics -x "ks=http://repository_server/anakonda-ks.cfg ksdevice=eth0 ip=192.168.1.200 netmask=255.255.255.0 dns=192.168.1.1 gateway=192.168.1.1 text console=tty0 utf8 console=ttyS0,115200" --prompt
References:
- http://doc.opensuse.org/products/draft/SLES/SLES-kvm_sd_draft/cha.qemu.running.html
- http://www.cyberciti.biz/faq/kvm-install-centos-redhat-using-kickstart-ks-cfg/
- https://help.ubuntu.com/community/KVM/Networking
Comments: none (click here to reply) Tags: How-to | Linux | Работа
|