How to create a new VM
Request a new VM at HIZ
- Fill out the form for "Auftrag Servervirtualisierung". Use the last sent form as a template. Note that @ps.uni-saarland.de adresses are accepted as official adresses.
Goto https://vsso.hiz-saarland.de and log in with your credentials. You have to start the new virtual machine (vCenter -> Virtual machines). It is then reachable under template.ps.uni-saarland.de or 134.96.186.253.
On james: Add the new VM to the DNS
Find a free IP address for the VM. Just look at /etc/bind/db.ps.uni-saarland.de and choose one that is not mentioned there. For new servers you should pick one in the interval [50,100).
Enter the new mapping into the db.ps.uni-saarland.de and db.ps.uni-saarland.de files
- Run
generate-reverse-zone-file /etc/bind/db.ps.uni-saarland.de > /etc/bind/db.186.96.134.in-addr.arpa
to generate the reverse mapping (IP addresses to hostnames) - Change the serial number to the current date. The format is YYYYMMDDNN, where YYYYMMDD is the current date and NN is the revision number (in case you do multiple changes on a single day). The serial number is used by other DNS servers to find out whether anything changed.
- Restart bind
On <hostname>: Set up the machine
Updates
run yum makecache fast to resynchronize the package cache
run yum update to install all updates since the last snapshot
Update template
Open a ticket and let our PSL_template be updated to the current version.
Generate certificate
If necessary, a new SSL certificate has to be generated. See https://www.ps.uni-saarland.de/Internal/LabWiki/SSL%20%26%20Certificates.
Network Setup
- Set the IP address chosen in the previous step in /etc/sysconfig/network-scripts/ifcfg-ens192.
- Also the MAC address will be wrong - This should be fixed with a systemctl restart network, if not you have to set it manually (TODO: verify and maybe rewrite this when the next VM is launched)
- Set the hostname of the new system: This requires multiple changes
- /etc/NetworkManager/NetworkManager.conf
[keyfile] hostname=<hostname>
- /etc/hostname : Just write the new hostname into this file
/etc/hosts : prepend <hostname>.ps.uni-saarland.de and <hostname> (in this order) to the name list for 127.0.0.1 and ::1
- /etc/NetworkManager/NetworkManager.conf
By default, VMs are only reachable via https (port 443) from outside the university, not via http (port 80) due to the HIZ firewall. If you want the server to be reachable on port 80, email the RBG and add http behing https in /etc/shorewall/rules. If you're troubleshooting, try telnet host 80 instead of something like ping host, because pinging on all our hosts is disallowed by default.
Security
- Generate new SSH host keys
rm /etc/ssh/*host*_key* ssh-keygen -A
Configuration
Then configure as needed.