Virtual Machines Guide
Setting up environment
Log into the server as yourself, -Y in all the hops. We will need XForward working. Good luck with network speed/latency.
- Create the Logical Volume, that will be the machine's disk :
lvcreate -n cmshep -L 100G /dev/vg00
In order to learn more about used/free space you can use "vgdisplay"
Fallback from root to your own user. I had a lot of trouble trying to run virt-manager as root. If you run it as yourself, it will just ask the root password, which is the standard T2 one :
$ virt-manager
Creating VM
Then, you can create a new VM. Most of the settings are intuitive, those are not, for HTTP install :
Choose network install, parameters :
NOTE : If in
virtmanager-susy use "cithep10" instead of "newman" in the URLs.
Installing VM
Don't forget to use a "Block device" for your disk. Specify the LV :
/dev/vg00/cms-nagios
After this, be tuned in the small virt-manager KVM, the
CentOS6 normal install will proceed and need your input. Give some few settings and watch it to be installed. When it reboots it will be ready for use.
Alternative T2 deployment
If we're talking about T2, we can actually profit from Foreman/Puppet. It's a bit tricky though. Here are the steps :
- Create the VM as fully-virtualized, chose PXE boot, add it in Foreman and fix the MAC so DHCP works. All the rest is standard server deployment. But we don't want it to be slow, so shut it down.
- Remove the previously created VM, KEEP block device intact. Create a new paravirtualized VM, lie to it pretending that you will install from an image server. Tell it kickstart and actual URL. Could be SL5, whatever works
- When it actually tries to install, shut it down before it damages the XVDA content. It only tries to install in the first boot, so turn it on again.
- Et voila, it will pick up the boot from the previous PXE installation.
The biggest advantages is that the procedure from deploying a T2 server is
exaclty the same and we don't need to maintain more than one image server. Install is also non-interactive so we can do something else while the machine installs.
-- Main.samir - 2014-05-21