Monday, September 6, 2010

CentOS 5.5 KVM

Installing a virtual machine

virt-install \
-n [instance_name] \
-r 1024 \
--vcpus=2 \
--os-variant=rhel5 \
-v \
--accelerate \
-c /var/lib/libvirt/images/CentOS-5.4-x86_64-bin-DVD.iso \
-w bridge:br0 \
-vnc : \
--disk path=/vm/[instance_name].img,size=50



Edit /etc/sysconfig/network-scripts/ifcfg-eth0
comment out BOOTPROTO
Add BRIDGE=br0

Create /etc/sysconfig/network-scripts/ifcfg-br0
The content should be:
DEVICE=br0
BOOTPROTO=dhcp
ONBOOT=yes
TYPE=Bridge

No comments: