Overview of the Lab
Before we get started, let's take a look at an overview of our lab. For our lab we will have one physical system and three virtual machines:
Type |
Hostname |
IP Address |
Physical |
host.example.com |
192.168.1.50 |
Virtual |
server1.example.com |
192.168.122.50 |
Virtual |
tester1.example.com |
192.168.122.150 |
Virtual |
outsider1.example.org |
192.168.100.100 |
Download and Install CentOS on host.
Create an Apache Installation Server on host.
- yum install httpd
- chkconfig httpd on
- mount -o loop centos.iso /media
- mkdir /var/www/html/inst
- cp -ar /media/. /var/www/html/inst
- chcon -R --reference=/var/www/html /var/www/html/inst
- service httpd start
- open port 80 with system-config-firewall-tui from command line.
Create a vsftpd Installation Server on host.
- yum install vsftpd
- chkconfig vsftpd on
- mount -o loop centos.iso /media
- mkdir /var/ftp/pub/inst
- cp -ar /media/. /var/ftp/pub/inst
- chcon -R -t public_content_t /var/ftp
- service vsftpd start
- open port 21 with system-config-firewall-tui from command line.
Install and Configure KVM
- yum -y install qemu-kvm python-virstinst virt-manager virt-top virt-viewer libvirt libvirt-client
- mkdir -p /home/qemu/images
- usermod -d /home/qemu qemu
- chown -R qemu.qemu /home/qemu
- chcon --reference /var/lib/libvirt/images /home/qemu/images
- rmdir /var/lib/libvirt/images
- ln -s /home/qemu/images/ /var/lib/libvirt/images
Set up a Network Adapter for outsider1
- Download outsider1.xml file.
- virsh net-define --file outsider1.xml
Download the Following Kickstart Files
- Download ks_server1.cfg, ks_tester1.cfg, and ks_outsider1.cfg.
- Move the cfg files to /var/ftp/pub
- virt-install -n server1.example.com \
--disk path=/var/lib/libvirt/images/server1.example.org.img,size=12 \
--vcpus=2 -r 768 --os-type=linux --os-variant=rhel6 \
--network network:default --vnc --accelerate \
--location ftp://192.168.1.50/pub/inst \
--extra-args "ks=ftp://192.168.1.50/pub/ks_server1.cfg"
- virt-install -n tester1.example.com \
--disk path=/var/lib/libvirt/images/tester1.example.org.img,size=12 \
--vcpus=2 -r 768 --os-type=linux --os-variant=rhel6 \
--network network:default --vnc --accelerate \
--location ftp://192.168.1.50/pub/inst \
--extra-args "ks=ftp://192.168.1.50/pub/ks_tester1.cfg"
- virt-install -n tester1.example.com \
--disk path=/var/lib/libvirt/images/tester1.example.org.img,size=12 \
--vcpus=2 -r 768 --os-type=linux --os-variant=rhel6 \
--network network:default --vnc --accelerate \
--location ftp://192.168.1.50/pub/inst \
--extra-args "ks=ftp://192.168.1.50/pub/ks_tester1.cfg"
Comments
Post a Comment