Add name to netdb

  1. Log in to netdb
  2. search for a similar vm like sgd-vm07
  3. click on template to copy for the next vm say sgd-vm07
  4. add the new name sgd-vm07
  5. Add the mac address, copied from the last config
  6. ## ie. ac:de:48:0:0:8
  7. make sure you pick the IP range
  8. ##add the range of 171-65-76-0/23
  9. Add the pxe info for a kickstart boot up
filename=pxelinux.0 next-server=starter tftp-server-name=starter

Add a VM

  1. Log into either rails or sgd-virt

  2. >ssh admin@rails
    
    
  3. cd to /home/admin/install-scripts

  4. ## open a config file and change the parameters for the vm name and space ram and IP ## change the 7's to 8's ## If using netapp make the format=raw, default is qcow2, sparse default is true ## we use centos58 for the os as it is free and does not need licensing in the cloud ##example:
    #!/bin/bash
    
    /usr/bin/virt-install \
    	--name=sgd-vm07 \
    	--virt-type=kvm \
    	--disk path=/vm07/sgd-vm07.qcow2,sparse,format=raw,size=40 \
    	--location=nfs:starter.stanford.edu:/data/kickstart/os/centos58 \
    	--nographics \
    	--vcpus=1 \
    	--ram=4096 \
    	--network bridge=br0,mac=ac:de:48:0:0:7 \
    	--os-type=linux \
            -x "ks=nfs:starter:/data/kickstart/configs/centos58-vm.cfg ip=171.65.76.169 netmask=255.255.254.0 dns=171.64.7.55 gateway=171.65.76.1 console=ttyS0"
    
    exit 0
    
    #notes:  use gcow2 as default, use centos62-vm.cfg then when you run Yum it will upgrade to centos63.
    
  5. If using the local disk crate a logical volume using lvcreate
  6. If using the netapp disk crate a volume using netapp
  7. make the directory name match the vm name ie sgd-vm07 = /vm07
  8. >mkdir /vm08
  9. mount the volume onto the new vmdirectory
  10. >mount sgd-netapp-1:/vol/vm_image08 /vm08 for netapp >mount /dev/mapper/vg02/vm08 /vm08 for logical local volume
  11. Go back to the install directory and run the script
  12. >./install-vm.sgd-vm08 ## this should run and have no problems completing ## problems could occur with not enough space to load the OS, or can't allocate as primary, or not enough room to create space on "/" ## all these are due to the vm being created with too little disk space. Make sure the volume is as big or bigger than the vm. ## my experience is that for our OS the vm needs at least a 30G vm to install error-free ## there is a chance that you can tweak the kickstart configs to make this work. but i was not successful