Thursday, October 28, 2010

How to Convert VMware SQL Server Express to SQL Server

One of the things that I realized in having SQL Server Express installed with the vCenter server is that if the vCenter Server crashes (if it is a stand-alone physical server). You are stuck! You are trying like hell to get this server up. However, if you have a SQL Server 2008 Standard Edition Database server. Why NOT use it. Also, if you can convince your company, non-profit, or hospital to pony up on the SQL Server 2008 License. I would say go for it! Yes, you "can" install SQL Server 2008 Express on a server and have vCenter connect to this also. However, this tutorial is for an environment where you want a centralized SQL Server 2008 Database Server. This server will be the DB SVR for vCenter, VUM and whatever else you want to use it for.

Scenario is based on 2 Physical stand-alone Dell PowerEdge R310 Servers (DC/vCenter) and 5 Dell PowerEdge R710 Servers. Windows 2008 Server Datacenter Edition, VMware ESXi 4.1, vCenter Standard 4.1, and Iomega StorCenter ix12-300r (8TB).

40 VM's consisting of 2K3, 2K8, 2K8R2, RHEL 5.5, SUSE11-4VMware, UBUNTU10.4 Templates, DHCP on VM, DC2, DC3, File Server Cluster (2 Clustered on iSCSI SAN drive), Print Server Cluster (2), AV, WSUS, SQLSRV2K8 DB SRV, PROXY RHEL Cluster (2), VUM, VDR, VSHIELD (5), vDistributed Switches for 1GB Ethernet Intel NICs, HA/DRS Clusters.

Here we go...Screenshots soon to come.

1. Make sure you ISO's are on an NFS Share so that you can access them. Just Map a Drive to the NFS Mount. Use Virtual Clone Drive to kick off the ISOs. Virtual Clone Drive should be an ABSOLUTE MUST for your VMware Arsenal.

1. Stop all of the VMware vCenter Services (i.e. vCenter, VUM, etc).
         ----> START >> Run >> services.msc (If it says vCenter stop it. Leave the VMware Tools alone).

2. Copy all of the VIM_VCDB.mdf Database Files to your SQL 2008 Server.
         ---->START >> Run >> \\SQLSRV2K8DB\c$\Program Files\Microsoft SQL Server\ and then hit
         the enter key. You want to go to the "Data" Folder and drop the databases into this folder.

3. Login to your SQL Server. Launch SQL Server. Connect to the server and right-click on Databases and "attach" the database. (I created a database and imported the migrated DB to the new created DB. You may decide to use the attached DB, but I wouldn't.)

4. Right-click on the database and Backup the Database with a Full Backup.

5. Open up ODBC (under Administrator Tools). Go to System DSN and Test Connectivity to the SQL Server 10.0 Native Client. Make sure your DB is the default (I named mine VCENTER since you can't jack this up and even Joe new guy will know not to touch this database.).  Make sure you can connect to the server because if you can't guess what. vCenter won't either.

6. Uninstall vCenter Server from the Server and just re-install it. Point the vCenter DB to the new SQL Server 2008 Server and make sure you DO NOT OVERWRITE THE DATABASE!!!

7. Launch vCenter and if it comes up. Your golden!

References:
http://www.vmware.com/files/pdf/vc_microsoft_sql_server.pdf
http://www.ntpro.nl/blog/archives/1423-How-to-migrate-the-vCenter-database-to-Microsoft-SQL-Server-2008.html
http://get-admin.com/blog/?p=646
http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1028601
http://www.sysadmintutorials.com/tutorials/vmware-vsphere-4/esx4/installing-vmware-view-4-composer/
Share:

Friday, September 17, 2010

How to Setup a GoDaddy SSL Certificate on CentOS/RHEL

Ok. Let's just get down to the knitty gritty! I was tired of searching for a tutorial. So I created this one for anyone else that wants/needs to setup an SSL asap within an hour!!!

1. Go to GoDaddy and grab an SSL Certificate. If you are a business or you do transactions and eCommerce and you have a registered business you actually pay taxes for. Use the Extended SSL.

NOTE: Thawte, Verisign, GlobalSign, Comodo sell SSL Certificates. Don't waist money! Use GoDaddy.

Steps to Get SSL Certificate:
1A. Buy the SSL Certificate!  http://www.godaddy.com/ssl/ssl-certificates.aspx?ci=8979


1B. Create the SSL Certificate - THIS STEP IS AFTER CREATING THE SERVER!

2. Build a server on your favorite Virtualization platform. Rackspacecloud is the best out there at this time and the most user friendly. There are a ton of other's, but either their UI is trash, their customer service sucks or they price gauge the mess out of you. If you are a company, use Rackspacecloud or Terremark's vCloudExpress. Both UI (User Interface)'s are great, simple, quick and easy to use.

NOTE: If you have to spend more than 10 minutes trying to figure out how to use their service. Drop them...it is a tell-tale sign of things to come if something breaks! eh..hmm...AmazonEC2..GoGrid...

3. Build your CentOS 5.5, Ubuntu LTS 10.04 or Red Hat Enterprise Linux 5.5 Server or even...uh...I hate to say it...Windows...geez...who would do that anyway?!!!.


4. Open a Terminator or Terminal Session (Ubuntu/CentOS/RHEL/Fedora) or Putty/SecureCRT for Windows Lovers.

[root@ssldemo ~]# ssh -X root@199.199.199.199

Authenticate with your root password and your in!

5. Update and upgrade your system! 
yum -y upgrade

6. Install the following packages. 
yum -y install mod_ssl httpd screen unzip

7. Change Your hostname, /etc/sysconfig/network file and /etc/hosts
hostname ssldemo.demo.com

vi /etc/sysconfig/network
HOSTNAME=ssldemo.demo.com

/etc/hosts
199.199.199.199 ssldemo ssldemo.demo.com

8. Now...restart your networking.

service network restart
/etc/init.d/network restart
If you are super paranoid!!!... init 3 ; init 5 or...even harsher... reboot

9. Create your .crt and .key files

Why Create the Wheel!!!! Links attached. 
Open a new Window if you have a dual monitor and just knock this out.

10. Cat your demossl.crt file and copy it to upload to GoDaddy to create your SSL certificate.

-----BEGIN CERTIFICATE-----
GobblygoopGobblygoopGobblygoopGobblygoopGobblygoopGobblygoopGobblygoop
GobblygoopGobblygoopGobblygoopGobblygoopGobblygoopGobblygoopGobblygoop
GobblygoopGobblygoopGobblygoopGobblygoopGobblygoopGobblygoopGobblygoop
YougetthepointYougetthepointYougetthepointYougetthepointYougetthepoint
YougetthepointYougetthepointYougetthepointYougetthepointYougetthepoint
-----END CERTIFICATE-----

11. Upload the certificate data and then download it. (Extended SSL will take time, but you can use your Turbo SSL Certificate while you are awaiting authorization verification from GoDaddy. They will call and they will check your company.)

12. Copy Your ssldemo.crt.zip file to the server (Apache 2.x)

scp /location/of/ssldemo.crt.zip  root@199.199.199.199:/etc/pki/tls/certs/
unzip your uploaded files
unzip ssldemo.crt.zip
copy or make sure that your ssldemo.crt and gd_bundle.crt is in /etc/pki/tls/certs
copy of make sure your ssldemo.key (remember that little tutorial? yeah..you need that file buddy) 
The .key file needs to be in /etc/pki/tls/private/

13. Modify the SSL Location of the .crt and .key files in ssl.conf
vi /etc/httpd/conf.d/ssl.conf
/Server Certificate (This is how you search in case you are wondering or non-vi user.
SSLCertificateFile /etc/pki/tls/certs/ssldemo.crt
SSLCertificateKeyFile /etc/pki/tls/private/ssldemo.key
SSLCACertificateFile /etc/pki/tls/certs/gd_bundle.crt

NOTE: Just comment # out the defaults. Do not delete them. You never know if you jack something up. You can go back and fix it. Make sure you backup the file also.  If you delete it, Google.com/Linux may not save you!

14. Restart httpd/Apache
service httpd restart
type in the passphrase and you are now good to go!


15. Make sure port 443 is in /etc/sysconfig/iptables and restart iptables
service iptables restart










Share:

Thursday, August 19, 2010

How to Setup the SPSS Network License Manager on Linux

1. Install Red Hat Enterprise Linux 5.5 on your server (or RHEL 6 if you are enlightened) =)

                a. VMware: Install from ISO Library by selecting the “Datastore ISO File” Location. “Check Connect at Power On”. Start the VM and Install, configure Networking and yum –y upgrade RHEL 5.5.

                b. Physical: Install RHEL 5.5 from PXE, Kickstart, or DVD to Physical Server. Install, configure networking and yum –y upgrade RHEL 5.5. NOTE: Physical servers are a pain to manage vs. virtual.

2.  Make Directory’s for SPSS under /opt/ folder. Opt folder is for 3rd party applications on Linux.

NOTE: Do not do anything as root. Configure visudo first and then run your commands under sudo. Root is unforgiving if you make a mistake!!!
               
a. sudo mkdir /opt/SPSS
b. Download the SPSS Linux .tar file or using wget from CLI (e.g. Terminal, Putty, SecureCRT). NOTE: For downloads use /tmp/ only and change directory into /opt/SPSS. [e.g. sudo cp /tmp/linux64-8.2.2.tar.gz /opt/SPSS]

Terminal, Putty, SecureCRT:
Web Browser:

3. Uncompress the SPSS tar.gz file and navigate to sentinellm directory:

                a. Check your directory: [username@server]$ pwd
                b. Make sure you copied the file to /opt/SPSS: [username@server]$ ll /opt/SPSS/
                c. Untar: [username@server]$ sudo tar xzf SPSS-linux64-8.2.2.tar.gz
                d. Change to sentinellm directory: [username@server]$ sudo cd /opt/SPSS/sentinellm

4. Start the SPSS Service: [username@server]$ sudo ./lserv               
a. Make sure that port 5093 is open in SELinux if you have SELinux Enabled:


            b. Check your IPTables configuration also. Restart IPTables if necessary:

[username@server sentinellm]$ sudo cat /etc/sysconfig/iptables
[sudo] password for username:
# Firewall configuration written by system-config-securitylevel
# Manual customization of this file is not recommended.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:RH-Firewall-1-INPUT - [0:0]
-A INPUT -j RH-Firewall-1-INPUT
-A FORWARD -j RH-Firewall-1-INPUT
-A RH-Firewall-1-INPUT -i lo -j ACCEPT
-A RH-Firewall-1-INPUT -p icmp --icmp-type any -j ACCEPT
-A RH-Firewall-1-INPUT -p 50 -j ACCEPT
-A RH-Firewall-1-INPUT -p 51 -j ACCEPT
-A RH-Firewall-1-INPUT -p udp --dport 5353 -d 224.0.0.251 -j ACCEPT
-A RH-Firewall-1-INPUT -p udp -m udp --dport 631 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m tcp --dport 631 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport 5093 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 5093 -j ACCEPT
-A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited
-A RH-Firewall-1-INPUT -p udp --dport 5093 -d 10.10.60.186 -j ACCEPT
COMMIT

5. Add your license keys to the Network Licensing Server:
                a. [username@server]$ sudo ./licenseactivator aaaa000rrrr888ddd999www
NOTE: Only Paste the CTRL+SHIFT+P (RHEL 5.5 Terminal) authorization codes after licenseactivator. It will then give you a validation code saying that the key has been added successfully.
6. Restart the Network License Manager:
                a. Script: sudo /opt/SPSS/SPSSRestart.sh
                NOTE: Use the vi editor. It is the default editor for all Linux/Solaris Servers.
               #!/bin/bash
                # Restart SPSS Services
                #
                /opt/SPSS/lserv
                /opt/SPSS/lsrvdown servername
                 
                chmod a+x /opt/SPSS/SPSSRestart.sh to activate the script so that it will be executable.

                b. Manually: sudo ./lsrvdown servername ; sudo ./lserv
7. Verify that the service is running:
                a. [username@server]$ ps  -ef | egrep lserv
8. Add the Network License Manager Service:
                a. [username@server]$ /sbin/chkconfig --add NOTE: Please reference chkconfig man page for configuration. www.google.com/linux or www.yolinux.com
9. Verify that Service is going to start on Restart of Server:
                a. [username@server]$ /sbin/chkconfig --list |grep lserv

10. Install the Network License Manager Tools on a Windows Server 2008/Windows 7 to Manage the NLM. http://support.spss.com/Tech/default.asp NOTE: You need your IBM SPSS Support Login.
Creative Commons License
How to Setup SPSS Network License Manager on Red Hat Enterprise Linux 5.5 by Shea Bennett is licensed under a Creative Commons Attribution 3.0 Unported License.
Based on a work at blog.migrationking.com.
Share:

Saturday, July 17, 2010

Upgrade vSphere 4.0U2 ESXi to 4.1 ESXi

How to upgrade your ESXi 4.0U2 to ESXi 4.1. Contrary to what some may believe. VMware's documentation is not the simplest to navigate sometimes. However, this is what happens when you have technical writers typing up stuff for Systems Engineers! We don't need 10 pages of text to say the following!

You need vSphere CLI - Download Here vCLI
For Windows or Linux and install on your workstation.
Download the Upgrade Package for 4.0 to 4.1 or the Upgrade Package from 3.5 to 4.1
Power off your VM's and put the host into maintenance mode from the vSphere CLI prompt:

vihostupdate.pl --server hostname or IP -i -b c:\temp\upgrade-from-ESXi4.0-to-4.1.0-0.0.260247-release.zip -B ESXi410-GA

vihostupdate.pl --server hostname or IP -i -b c:\temp\upgrade-from-ESXi4.0-to-4.1.0-0.0.260247-release.zip -B ESXi410-GA-esxupdate


Thanks to Sebastian: http://blog.jargontech.com/?p=19

Thanks to MicroKid: http://communities.vmware.com/message/1570298

Thanks to Peacon: http://blog.peacon.co.uk/wiki/Upgrading_ESXi_4_to_4.1

VMware vCLI Reference: http://www.vmware.com/support/developer/vcli/vcli41/doc/reference/index.html

Just FYI for new CLI folks on Windows. Make sure you cd into the /bin directory under the vSphere CLI so that you can run the Perl commands or just create an alias in Powershell.

Post installation. You will get a pop-up Window.

The required client support files need to be retrieved from the server 'vsphereclient.vmware.com' and installed. Click Run the Installer or Save the Installer.

I would recommend just running it if you have time.It is just going to update your vClient on your Windows/Linux machine.

Share:

Friday, April 2, 2010

How to Quickly Configure Windows 2008 Server Core

Are you tired of long...drawn...out explanations!!!! And you say...Just Give It To Me! Here you go!

This is how you configure Windows 2008 Server Core fast on VMware or a physical server if you just want the headache of reinstalling the whole operating system all over again! Just to save you a headache...use VMware. This "should" work on RHEV or KVM, but I will let you know when I try.

There is no pathway to upgrade to a full version so if you are scared of CLI (Command Line Interface) and the IT Immortal Internet Searching Dark. Turn on the lights and install the full OS!

1. On VMware ESX/ESXi. Setup a VM (Virtual Machine).

Mount from an NFS share or just create an NFS share on Linux (Preferably, Red Hat Enterprise Linux, Oracle Unbreakable Linux, or Ubuntu LTS Server for work. CentOS if you are in a lab) and mount it. WinSCP or Veeam is your friend.

2. Select the Iso from the Datastore Iso Images location.

3. You will only need 10GB of HDD Space for AD/GC. 2K8 Server Core only requires 1-3GB HDD. Just go by your requirements.

4. Start the VM. Install Windows 2008 Datacenter or Enterprise Edition (Server Core)

5. Change Administrative password and Login to Server.

6. CMD prompt will be shown. Type sconfig.cmd Use the numbers to configure the server.

7. You can cd into c:\Windows\System32\ and type cscript scregedit.wsf /cli for commands

8. Change the server name. Make the IP Address static. Update time zone. Enable RDP.

9. Make sure you do not have automatic updates set. Change it to (M) Manual.

10. Join the server to the domain: domain.org using username / password will need to be typed into the new window that pops up. {Unless you are making this a secondary AD GC DC...then this is another story!}

11. Update the server to the latest patches. If you are not already in the Server Configuration script. Type sconfig.cmd. Then option 6: 6) Download and Install Updates

12. Type slmgr /ipk {Valid Software License}. ***Make sure it validates the key.***

13. Activate the Windows 2008 Server Core license. Exit sconfig.cmd by typing 13.

14. Update the LAN Name {Optional} This is my own OCD I guess for Remote Administration.

15. netsh interface set interface name="Local Area Connection" newname="DNS3-vNIC"

16. Type powershell to go into powershell and run your powershell scripts or write some if you need to.

URL(s):
1.) http://technet.microsoft.com/en-us/library/cc753802%28WS.10%29.aspx

Share: