As promised let’s chat about the tools we at Coral now use in our development process. The first tool is for easy VM creation.
Veewee is a tool for easily (and repeatedly) building custom Vagrant base boxes, KVMs, and virtual machine images.
With Veewee I demo to my team how to create a VM from the OS ISO in just a few minutes.
Veewee isn’t only for Vagrant. It currently supports exporting VM images for the following providers:
- VirtualBox – exports to
OVF
filetype - VMware (Fusion) – exports to
OVA
filetype - KVM – exports to
IMG
filetype
Check Veewee on GitHub
A sample of the settings available to tuned your VMs are:
Veewee::Session.declare({
:cpu_count => '2',
:memory_size=> '2048',
:disk_size => '256000',
:disk_format => 'VDI',
:hostiocache => 'off',
:os_type_id => 'RedHat6_64',
:iso_file => "CentOS-6.5-x86_64-minimal.iso",
:iso_src => "http://yum.singlehop.com/CentOS/6.5/isos/x86_64/CentOS-6.5-x86_64-minimal.iso",
:iso_md5 => "0d9dc37b5dd4befa1c440d2174e88a87",
:iso_download_timeout => 1000,
:boot_wait => "10",
:boot_cmd_sequence => [
' text ks=http://%IP%:%PORT%/ks.cfg'
],
:kickstart_port => "7122",
:kickstart_timeout => 10000,
:kickstart_file => "ks.cfg",
:ssh_login_timeout => "10000",
:ssh_user => "veewee",
:ssh_password => "veewee",
:ssh_key => "",
:ssh_host_port => "7222",
:ssh_guest_port => "22",
:sudo_cmd => "echo '%p'|sudo -S sh '%f'",
:shutdown_cmd => "/sbin/halt -h -p",
:postinstall_files => [
"base.sh",
"vmwaretools.sh",
"dynmotd",
"coral.sh",
"cleanup.sh",
"zerodisk.sh"
],
:postinstall_timeout => 10000
})
Post-Install files and scripts
If some degree of personalization and optimization of the VMs is required you can do so calling scripts.
The outcome is a VM image ready to use in Vagrant, can be imported in VMware Fusion and/or ESXi