LAB: Create a VM guest.

Share this link

To create a VM called postfix.example.com (here with an IP address of 192.168.1.10, a gateway in 192.168.1.1, a DNS server in 192.168.1.5, Pass1234 as a password, and a total disk size of 5GB), create the file /var/www/html/conf/ks_postfix.cfg and add the following lines:

# Kickstart file automatically generated by anaconda.
#version=DEVEL
install
lang en_US
keyboard us
network --onboot yes --device eth0 --bootproto static --ip 192.168.1.10 --netmask 255.255.255.0 --gateway 192.168.1.1 --ipv6 auto --nameserver 192.168.1.5 --hostname postfix.example.com
rootpw Pass1234
firewall --service=ssh
authconfig --enableshadow --passalgo=sha512
selinux --enforcing
timezone --utc America/Los_Angeles
bootloader --location=mbr --driveorder=vda --append="crashkernel=auto rhgb quiet"
zerombr
text
skipx
part /boot --fstype=ext4 --size=200
part pv.000001 --grow --size=1
volgroup vg_root --pesize=4096 pv.000001
logvol / --fstype=ext4 --name=lv_root --vgname=vg_root --size=3072
logvol swap --name=lv_swap --vgname=vg_root --size=512
%packages
%end
reboot

Then, run the following command:

# /usr/sbin/virt-install --virt-type kvm --name=postfix.example.com
--disk path=/var/lib/libvirt/images/postfix.example.com.img,size=5
--ram=1024 --vcpus=1 --os-variant=rhel6 --accelerate --graphics vnc
-v -l http://192.168.1.5/centos/ --network bridge:br0
-x ks=http://192.168.1.5/conf/ks_postfix.cfg
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

Leave a Reply

Be the First to Comment!

Notify of
wpDiscuz

RHCSA7: Task of the day

Allowed time: 10 minutes.
Archive and compress the content of the /opt directory (create files if none exists).
Uncompress and unarchive the resulting file in /root

RHCE7: Task of the day

Allowed time: 10 minutes.
Set up a NFS server that exports the /opt directory in read-only mode.

Poll for favorite RHEL 7 book

What is your favorite RHEL 7 book to prepare RHCSA & RHCE exams?

View Results

Loading ... Loading ...

Poll for most difficult RHCSA 7 topic

What do you think is the most difficult RHCSA 7 topic?

View Results

Loading ... Loading ...

Poll for most difficult RHCE 7 topic

What do you think is the most difficult RHCE 7 topic?

View Results

Loading ... Loading ...