Showing posts with label vSphere. Show all posts
Showing posts with label vSphere. Show all posts

Monday, September 17, 2012

vSphere 5.1 ESXi Unattended script building


So I'm slowing working my way through building an automated script for a project I'm on. I had some issues a while ago with this process as every time I would specify a ks.cfg on a USB, it would give me an error on initializing a partion. I still to this day don't know what the issue was. I posted a question on the VMware community boards, but no one ever solved.

Well, the good news is, I've at least passed that point and am working my way through. As I do, I'll update progress on this post. By the end, it should show a running log of what it took to get to the end script, along with said script.

So, I'll start with the other sources I'm pulling info from:


Duncan Epping's Yellow Bricks post about an install script. Great starting point.




William Lam's VirtualGhetto posts about kickstart scripting and esxcli


Official docs

So the offical docs document how to start using the custom script that's included on the stock installation media. Here's how:

1.      Boot to stock installation

2.      When presented yellow bar and the option to, press SHIFT+O to get the boot prompt.

3.      This will give you a prompt like the following ">runweasel" with a cursor flashing at the end.


4.      Simply put a space, and add "ks=file://etc/vmware/weasel/ks.cfg " so the whole thing looks like this:

 

5.      It will chug away for awhile and finally let you know that it will reboot in Eval Mode (even if you specify a license). 
 

So, that gives us the stock ks.cfg on the disc.  Now, there’s a whole mess of places you can use your own ks.cfg from.  Here are the boot options to use them all:


Also, if you want to use a USB, you will need to format it with FAT32.  I think this might have been my initial issue.  Plus, I formatted it with a Linux box (CentOS 6.3 to be specific) and I followed these directions:


Basic script looks like this:

# Accept the VMware End User License Agreement

vmaccepteula

# Set the root password for the DCUI and ESXi Shell

rootpw --iscrypted <password hash>

# Install on the first local disk available on machine

install --firstdisk --overwritevmfs

# Set the network to DHCP on the first network adapater, use the specified hostname and do not create a portgroup for the VMs

network --bootproto=dhcp --device=vmnic0 --addvmportgroup=0

# reboots the host after the scripted installation is completed

Reboot

 

Now, you see the “rootpw –iscrypted” there with a place for a hash.  Download OpenSSL-Win32 from here:


Once you have that installed, open the command prompt and go to the openssl-win32 folder (for me c:\openssl-win32\bin), and type the following:

Openssl passwd <password you’d like encrypted>

Copy what comes out of there into your ks.cfg.
 
That’s what I have so far.  As I said, it’s a work in progress, and I’m going to try to keep this as a living post. 

Tuesday, September 11, 2012

vSphere 5.1 Drops

vRAM IS DEAD! HUZZAH!
At long last, VMware heard the protesters. They've done away with vRAM licensing. During the keynote of VMworld when this was announced, there arose such a cheer that only a room full of virtual geeks would ever know. It was a miserable year for licensing since last VMworld, so I'm glad it's over.
 
First off, look at the What’s New for 5.1 here.
 
At any rate, to the meat and potatoes:
 
·         VI Client Deprecated
o   One of the bigger things that came out of VMworld for me was that VMware is deprecating the VI client. If you've not used the Web Client, get used to it now. They're moving that direction. One chink in the armor is that if you need to work on an individual host, you still have to use the fat client. Additionally, plugins will take a while to move over. I've not heard of to many vendors making plugins for the web client. But VMware is developing new features ONLY for the web client. So this is going to be a bit of a difficult period of transition.
·         vCenter Single Sign-On
o   With the move to the web client, services are being broken out and a snappy new Single Sign-On piece is being introduced.  This will give you the ability to sign into the web client once, and have access to everything VMware without signing in again; vCOPS, vCloud, etc.
·         Single-root I/O virtualization
o   This is an interesting thing.  It allows the direct connection of NICs or HBAs to a VM bypassing the Hypervisor.  The VMworld session I attended briefly talked about it, and the engineer said use it with caution.  It can introduce issues in the VM, but if you’ll looking to squeeze every last I/O out of a VM, it may improve performance. 
·         Enhanced vMotion
o   vMotion WITHOUT THE NEED FOR SHARED STORAGE.  That’s right kids.  vMotion no longer needs shared storage.  Essentially what happens is Enhanced vMotion performs a Storage vMotion of the vdisks after the standard vMotion of memory and processing.  This all takes place over the vMotion network, so plan accordingly.
·         vSphere Replication
o   So, have you been having trouble with EVA replication?  Yeah, who hasn’t.  Well, vSphere Replication has been moved out of SRM and is not included with vCenter…ANY vCenter.  So, do you have Essentials+ licenses?  Guess, what.  You can use vSphere Replication.  SMBs rejoice!  You can now replicate to a secondary site.  In addition, rather than replicating at a LUN level (as you would have to with storage based replication) you replicate at the VM level.  Replicate a single VM, test SRM, lather, rinse, repeat.  Down side is, all this processing is now taking place on your virtual infrastructure rather than the storage processors.  Some people will shy away based on that.
·         Zero-downtime upgrade for VMware Tools
o   As of 5.1, VMware tools will not require a reboot.  Now, you’ll still have to reboot getting there.  But that’s it…honest.  What could go wrong? 
·         Restructured vCenter databases
o   Apparently a DRASTIC improvement has been made to the vCenter databases.  Thing, improved performance, improved storage, everything.  The jury’s still out on what happens when you UPGRADE your existing databases.  You might need to rebuild from scratch and import configuration (loosing statistics) to get the improvements.
·         Increased VM maximums
o   64 vCPUs, 1TB vRAM (super-monster VMs)
 
So, that’s the interesting points.  Anyone finding something else interesting in the new release?