Saturday, May 18, 2013

Creating a Centos vCenter Template

Since I'm going to start learning puppet I figured I'm going to be building and destroying a lot of linux VM's so I might as well create a template.  Following my previous post I create a base template VM with the minimal install of Centos and all the required updates.  Once created you need to edit the following file to remove IP and MAC address details:

vi /etc/sysconfig/network-scripts/ifcfg-eth0

Remove the following entries then save and exit:

HWADDR="xx:xx:xx:xx:xx:xx"
IPADDR=xxx.xxx.xxx.xxx
NETMASK=xxx.xxx.xxx.xxx
GATEWAY=xxx.xxx.xxx.xxx

Now edit the following file and remove all entries that have a MAC address then save and exit:

vi /etc/udev/rules.d/70-persistent-net.rules

an example would be to remove the following text:

# PCI device 0x15ad:0x07b0 (vmxnet3)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="xx.xx.xx.xx.xx.xx", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

Once completed power off the VM and remove and re-add the network adapter from the VM (This ensures that a new MAC address is generated).  Finally convert the VM to a template and test.  Once you have created a new VM from the template you will need to do the following:

Change the hostname (including domain name i.e. server.domain.local)
Add IP address information including the new MAC address as per this post

Centos linux minimal install config

I'm planning on attempting to learn Puppet which requires a linux operating system.  I'm competent enough to get around linux and perform basic tasks but I'm by no means an expert or even intermediate.  My linux distro of choice is the minimal install of Centos.  The minimal install is exactly what it says, the minimal install of binaries that are required to get the system up and running.  All other binaries will have to be manually installed.  This post shows how to set a static IP address and install the VMware tool into a minimal install of Centos.  I'm not going to show you how to install Centos as it's a simple next next type of installation.

Once you have the minimal install up log in and use vi to edit the eth0 interface file:

vi /etc/sysconfig/network-scripts/ifcfg-eth0

Enter the required IP information and then save and exit:

BOOTPROTO="static"
IPADDR=xxx.xxx.xxx.xxx
NETMASK=xxx.xxx.xxx.xxx
GATEWAY=xxx.xxx.xxx.xxx
ONBOOT="yes"

To add your internal DNS servers edit the resolv.conf file:

vi /etc/resolv.conf

Enter the required DNS servers then save and exit:

nameserver xxx.xxx.xxx.xxx

Finally restart the network service:

service network restart

You should now be able to ping the server by IP address and also ping form the server via DNS.  Remember to add both forward and reverse A host entries into your DNS server.  You should also now be able to SSH into the server rather than using the console.  Next step is to update the server (Ensure your server has access to the internet):

yum upgrade -y

This may take a while depending on how many updates are required.  Once it has finished just perform the same command again to ensure there are no more updates required.

The final step is to install the VMware tools as per VMware's best practice   Start by initiating the VMware tools install via the vSphere Web Client / GUI and then perform the following commands:

yum -y install perl
mkdir /mnt/cdrom
mount /dev/cdrom /mnt/cdrom
cp /mnt/cdrom/VMwareTools-*.tar.gz /tmp
umount /mnt/cdrom

End VMware Tools install via the vSphere Web Client / GUI and the continue:

tar -zxf /tmp/VMwareTools-*.tar.gz -C /tmp
cd /
./tmp/vmware-tools-distrib/vmware-install.pl --default
rm -f /tmp/VMwareTools-*.tar.gz
rm -rf /tmp/vmware-tools-distrib

Once finished the VMware tools should be running and current.  If you have any issues with the vmware-tools service the commands to start | stop | restart | status are:

status vmware-tools
start vmware-tools
stop vmware-tools
restart vmware-tools

Monday, May 13, 2013

vCenter 5.1 to 5.1 Update 1 Upgrade Process

This post is mainly for my own knowledge to remember the correct order to upgrade from 5.1 to 5.1 Update 1.  The following products should be installed in the following order:

  1. VMware vCenter Single Sign On
  2. VMware vCenter Inventory Service
  3. VMware vCenter Server
  4. VMware vSphere Web Client
  5. VMware vSphere Client
  6. VMware vSphere Update Manager
  7. VMware vSphere Update Manager Plugin
  8. VMware vSphere Web Client Client Integration Plugin
  9. All ESXi Hosts

Hopefully this might help someone else looking to perform the upgrade anytime soon.

Friday, May 3, 2013

North East VMUG–6/6/2013

Well it’s time again for the next North East VMUG.  The event will take place on Thursday 6th June from 12:30 onwards and will take place at:

CastleGate
Simpson Room
Melbourne Street
Newcastle Upon Tyne
NE1 2JQ

Direction Here

The full agent will be posted up shortly but here are some highlights:

  • Networking and Lunch
  • Cisco Presentation: How Cisco Do IT
    Meet Richard Gore who will discuss how Cisco deployed VMware in their environment as the first step toward deploying private cloud, IaaS and PaaS in Cisco production data centers.
    Rich is a Cisco IT senior manager with 14 years’ experience in Cisco IT infrastructure architecture.  He has 30 years of IT experience at Bell Labs, AT&T, as a private consultant and now with Cisco IT.
    User Presentation: Virtualising SQL instances
  • Rod Hope from BSkyB (and Scottish VMUG) will give a presentation on his real world experiences virtualising SQL Server.
    Rod has over 13 years’ experience working with some of the world’s largest investment / investment services banks and has recently joined BSkyB’s Operations Engineering group in an Infrastructure Designer role.
  • VMware Presentation: “DR and the Cloud – To, From, Of”
    Meet Mike Laverick who will discuss the challenges of doing DR to the cloud, from the cloud and of the cloud.
    Mike is a real VMware A lister, having spent several years as an instructor and blogger, and written several books on topics such as vSphere 4, SRM and View, he joined VMware as an employee last year.
  • Q&A and Wrap-Up: Raffle and Interactive Feedback: Bring Your Own Device
    We’ve been using an App to ask the audience so far but if the Wi-Fi lets us down we’ll go old school and ask for show of hands on what you’d like for forthcoming topics.
  • vBeers: Join us in a local pub, The Bridge Hotel, for a drink courtesy of our sponsors Nimble Storage

Click here to register for the event

Big thanks to our sponsors Cisco and Nimble Storage

logo_cisco           shkshfbl

Friday, April 12, 2013

Configuring DHCP Relays within RouterOS

   In a lab environment you may want to mimic a live environment as much as possible.  This also includes separating your clients from your servers with the use of VLANs.  I currently have my clients on VLAN 9 and servers on VLAN 8.  My Domain Controller (Also my DHCP Server) currently resides on VLAN 9 so in order for my clients to obtain an IP address from my DHCP server I need to relay the request from VLAN 9 to VLAN 8 as DHCP uses broadcast traffic to obtain it’s IP address which cannot span VLANs.  So, create the required DHCP scopes on your chosen DHCP server:

image

   Log into your MicroTik router via Winbox and then select IP and then DHCP Relay.  Enter a name for the Relay and then the Interface you want it to listen on and then finally the IP address of the DHCP server you want to forward the request to:

image

   To test simply connect a client to that VLAN and request an IP address.  If you click on the Status tab you can see how many requests and responses the DHCP Relay has dealt with:

image

Configure VLANs and Layer 3 Routing within RouterOS

   In my current setup I have a MikroTik RB751G-2HnD running software version 6.0rc12.  This is connected to the Linksys SRW2016 16 port Layer 2 Gigabit switch.  On the Linksys I’ve configured the required VLANs and trunked the port that connects the switch to the router:
image
image
   I’ve also trunked the ports that connect to my ESXi hosts so all VLANs can pass through.  Now, to configure the VLANs within the MicroTik router simple connect up via Winbox and select Interfaces and then the VLAN tab.  Create all the VLANs you require and click Apply:
image
   To add layer 3 functionality so you can route between VLANs select IP and then Addresses and simply add IP addresses to each VLAN:
image
   If all has been successful you should be able to ping the default gateway for each VLAN from any other VLAN.

Monday, April 8, 2013

Vblock Delivery Experience

   We recently engaged VCE with some requirements to rip and replace our existing aging Dell blade environment and to add capacity for both future growth and a new IP based CCTV project.  First of all I was extremely impressed with VCE from the initial kick off meetings all the way through to delivery and our vArchitect, David Owen, done an awesome job taking our very awkward requirements (Which included the kit needing to be onsite and signed off by 31st March due to budget requirements) and made them happen.  So, what did we end up with?  Our solution comprised of two Vblock 300’s with VNX 7500’s, Avamar and EMC RecoverPoint.  Ten cabinets spread across two sites with a mixture of B and C series blades with varying RAM and CPU’s all running VMware via an ELA.

   We purchased two Vblocks to go into two separate datacenters.  Datacenter A was supposed to be a very simple install with about a thirty meter run from the delivery bay to the final location.  What we ended up having to do is remove one of the internal door frames to ensure all five cabinets could be moved into place.  Below are a few photos taken of the delivery for Datecenter A:
IMAG0123IMAG0131IMAG0125IMAG0128IMAG0133













   Datecenter B was a lot more difficult.  The Vblocks had to be delivered down two flights of stairs, across a ticketing concourse and through into a fire escape and then dropped down through a ceiling void into the datacenter all whilst the general public were still utilizing the area.  A custom lift had to be designed to lower the Vblocks and pretty much all hardware had to be removed including the cabinet doors and hinges and there was literally millimetres left to play with.  Below are some images taken of the delivery for datacentre B:
IMAG0137IMAG0143IMAG0146IMAG0149IMAG0150IMAG0158IMAG0152IMAG0162IMAG0164IMAG0167IMAG0168IMAG0171IMAG0175IMAG0176IMAG0186IMAG0188IMAG0190
All in all a job well done.