Warning: Undefined array key "action" in /home/bakers/html/entryreply.php on line 5

Warning: Undefined variable $output in /home/bakers/html/entryreply.php on line 50

Warning: Undefined array key "EntrySubject" in /home/bakers/html/entryreply.php on line 51

Warning: Undefined variable $logintext in /home/bakers/html/entryreply.php on line 97

Warning: Undefined variable $reply_name in /home/bakers/html/entryreply.php on line 103

Warning: Undefined variable $reply_email in /home/bakers/html/entryreply.php on line 104
Perturb.org - interesting technology related things from around the internet

Linux: Build a base VM image

When a new version of a distro comes out I like to build a base VM image that I can use later to turn up new VMs quicker. Here are the steps I use on a CentOS or Fedora VM image:

  1. Install minimal system via GUI
  2. Install default packages
  3. Setup Vim config
  4. Disable/remove SELinux
  5. Setup default bash prompt
  6. Remove SSH keys
  7. rm /etc/ssh/*key*
  8. New keys will be generated on boot
  9. Set generic hostname
    1. echo new-virt.web-ster.com > /etc/hostname
  10. Remove mac address line from network config
  11. Replace chrony with NTPd
    1. yum -y swap chrony ntp
  12. Enable NTPd
  13. Disable firewalld
    1. systemctl mask firewalld
  14. Set grub default boot time to two seconds
    1. perl -pi -e 's/GRUB_TIMEOUT=\d/GRUB_TIMEOUT=2/' /etc/default/grub
    2. grub2-mkconfig -o /boot/grub2/grub.cfg
  15. Shutdown VM and archive the disk image


Note: Replies will be formatted with PHP Markdown Extra syntax.

Name: Email (Not Required):
 
Logged IP: 44.192.54.67
To prevent spam please submit by clicking the kitten: