VMS Build
From SOWNWiki
Update Needed
This page needs to be updated
This page will need updating after moving to the 10.5.0.0/16 subnet.
Contents
Host
DHCP
- Dnsmasq on vms
- Gives out IPs from a vm specific subnet
- Should we use it for DNS?
VM Creation
Creation Script
- Python
- Use /opt/sown/vm-scripts/install.py
usage: install.py [-h] [-a ADDRESS] [-r RAM] [-d DISK] [-c CPU] [-p PUPPET] [-l LOGIN] [-k KICKSTART] [-i IMAGE] [-o OSVERSION] [-n NETWORK] [-m] [-D] name
- Sane default hardware parameters
- Disk: 40GB
- RAM: 1GB
- CPU: 1
- Disk size can be overridden
- RAM + CPU can just be edited after install
- Hostname needs to be set
- Sends email with details of vm to support@sown.org.uk when done
- Include IP allocated over dhcp from dnsmasq
KickStart
- Setup networking interface
- Install packages
- openssh-server and enables it
- puppet
- ntpd and enable it
- Disables network-manager if enabled
- Enables security updates
- Setup partitioning
- LVM or normal partitions?
- Probably LVM
- Auto swap partition
- Rest root partition
- LVM or normal partitions?
- Disable root password login
- Create admin sown user with committee password
Firewall
- Use firehol
- Allow all outgoing traffic
- Allow all inbound internal traffic
- Allow inbound external ping
Networking
- Static IP Allocation for now
- Using the subnet 10.13.0.192/27 (i.e. to 10.13.0.223) for DHCP allocated addresses based on MAC.
- IPv6 addresses should be 2001:630:d0:f700::X/64
- Network Bridge setup on host. Edit /etc/network/interfaces
auto br0 iface br0 inet static address 10.13.0.237 netmask 255.255.0.0 network 10.13.0.0 broadcast 10.13.255.255 dns-nameservers 10.13.0.239 10.13.0.254 dns-search sown.org.uk bridge_ports em1 iface br0 inet6 static address 2001:630:d0:f700::237 netmask 64
- Define Bridge as a libvirtd network.
- Make a tmp network.xml file with:
<network> <name>sown</name> <forward mode="bridge"/> <bridge name="br0"/> </network>
- Define it with sudo virsh net-define network.xml
- Edit /etc/kimchi/template.conf and set the default network (main section) to sown, (Note: Trailing comma is required)
Puppet
- Nothing for now, will possibly come up with something
- Still configure / set it up
Naming
Test vm's should be named testn, n being a positive integer.