יום חמישי, 21 בנובמבר 2013

Troubleshooting the vCenter Server Appliance with Single Sign-On login

Details

The two most common network-related problems when connecting to a vSphere Server Appliance using the Web Client and Single Sign-On (SSO) are SSL certificate failure and a changed SSO server IP address. These errors are seen when the problem is encountered:
  • Failed to connect to VMware Lookup Service https://<vCVA IP address>:7444/lookupservice/sdk - SSL certificate verification failed
  • Failed to communicate with the vCenter Single Sign On server https://<vCVA IP address>:7444/ims/STSService.

Solution

If the SSO SSL certificate failed, the network identification for the vSphere Server Appliance has changed, but the SSO SSL certificate has not been updated to match it. For instructions on changing the certificate, see the technical note Replacing Default vCenter 5.1 and ESXi Certificates. 

To resolve this issue, toggle the certificate settings:
  1. Log in the vCenter Server Appliance Web interface at https://hostname:5480/.
  2. Click the Admin tab.
  3. Regenerate certificates by selecting Toggle certificate setting. The Certificate regeneration enabled option under the Administration settings displays Yes.
  4. Reboot the vCenter Server Appliance.
Notes

Deleting Temporary User Profile on Windows Server 2008 R2

If every times you are logging as temporary user to Windows Server 2008 R2, you can do a registry trick to solve this problem. Run regedit.exe and navigate here:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList

You should see two entry as and .bak. Also check their home folder paths. If you are sure that .bak is your real profile, just delete the and rename .bak as . Then logoff. The next new logon will be your real desktop profile.

יום שלישי, 19 בנובמבר 2013

You get the error "squid Unable to determine IP address from host name

Synopsis
You get the error "squid Unable to determine IP address from host name for XXXXXX" in your web browser when trying to access a site
Article
This usually occurs if you are attempting to access an internal site, such as http://intranet If fo.r any reason squid is unable to resolve "intranet" to an IP address using the name servers provided it will display this error message.
To fix this, you should add an entry to the /etc/hosts file on your CensorNet server. To do this :-
1. Log in as root
2. Type:
nano /etc/hosts
3. On a new line, add:-
10.0.0.25    intranet
(replace with the correct hostname and IP)
4. Press CTRL+X then press Y followed by enter.
5. Restart squid
/etc/init.d/squid restart
Try the web site again and the problem should be solved.

Link:

יום שני, 18 בנובמבר 2013

Juniper - Backup and Restore Configuration by using ftp

** You can use FileZilla FTP Server

Source:

ftp <ip>

ftp> bin
ftp> lcd /config
ftp> put juniper.conf.gz


Destination:
1. root@%
      cli

2. root>
    configure

3. load update terminal
4. CTRL + D
5. commit





יום ראשון, 17 בנובמבר 2013

Unknown OS character set 'cp862 and Switching to the default character set 'latin1' in mySQL

If you are trying to run some sql  text file in mysql and get an error like this:

C:\wamp\bin\mysql\mysql5.6.12\bin\mysql.exe: Unknown OS character set 'cp862'.
C:\wamp\bin\mysql\mysql5.6.12\bin\mysql.exe: Switching to the default character set 'latin1'.

You get the error because the engine is use the default. To set the default to UTF-8 in "my.ini" file you have to add this lines:
[client]
default-character-set=utf8

[mysql]
default-character-set=utf8


[mysqld]
collation-server = utf8_unicode_ci
init-connect='SET NAMES utf8'
character-set-server = utf8
save the file and restart the service.

יום שני, 4 בנובמבר 2013

NexentaStore installation on vSphere

Short how-to on installing NexentaStore 3.3.x or 4.0 on vSphere 5.x including vmware-tools.
NexentaStor community v4 is a OpenIndiana based ZFS storage appliance.  Out of the box it is limited to 18TB of raw disk storage in the free version.
This howto supplements the installations instructions on creating a VMware vSphere guest.
This install will use a e1000 nic for managment traffic, and a 2nd vmxnet3 NIC configured with Jumbo frames for storage traffic.

Ideally a second SAS controller should be passed-through directly (directpath I/O) to the VM for your storage disks,  but this requires VT-d support in the BIOS and this is not available on my Dell 2950 servers. 

Preperation

  1. Download ISO v4 (beta) image from Nexenta
  2. Upload ISO to your ISO (NFS) share in your vSphere environment.

Installation

  1. Create a new VM with OS type ( Solaris 10 ) ,  2vcpu, 4GB RAM, and a 10 GB thick disk.
    Use a single e1000 NIC.
    Note: as of 3.1.3.5, select PVSCSI disk controller prior to install.
  2. Attach NexentaStore ISO to CD, mounted on boot.
  3. Power on VM,  and run installer.  You will get a device ID, that must be entered into the registration page at http://www.nexenta.com/register-eval,  and it will email you the community (free) license code.
  4. Setup the networking to use a static IP in the installer.
  5. Select web page to use HTTPS,  and port 2000,   set both web and root
    Passwords.
  6. Reboot and verify web access and password work.

VMware Tools

  1. Unmount existing installer CDROM, and select do not mount at power-on.
  2. Reboot VM.     When up select "Install Vmware-tools"
  3. Login to VM as root.  ( Note when logging in as root you get the "NMC" management prompt.  This is a restricted CLI,  and is not BASH )
  4. To get a bash prompt type
    option expert_mode=1
    !bash
  5. The CD should have auto-mounted as /media/VMware\tools      Verify with Mount command.    Copy the Tools installer to /root and untar.
    cd /media/VMware\ Tools
    cp vnmware-solaris-tools.tar.gz /root
    cd /root
    tar -xzf vmware-solaris-tools
    cd vmware-tools-distrib
  6. Run the installer.
    ./vmware-install.pl
  7. Use defaults.  When you get to the step where you "configure" VMware tools answer NO
  8. Run the configure (defaults) option.
    vmware-config-tools.pl -d
  9. This step might fail with a note that "SUNWuiu8" package is required.
    Edit the vmware-config-tools.pl script to comment out this section.
    cd /usr/bin
    vi vmware-config-tools.pl
    /SUNWuiu          (search for WUNWuiu string )
  10. When the code is found insert "#" comment characters in front of the entire IF statement
      # Be sure that the SUNWuiu8 package is installed before trying to configure
      #  if (vmware_product() eq 'tools-for-solaris') {
      #      if(does_solaris_package_exist('SUNWuiu8') == 0){
      #         error("Package \"SUNWuiu8\" not found. " .
      #           "This pac kage must be installed in order " .
      #           "for configuration to continue." . "\n\n") ;
      #       }
      #  }
  11. Save file with ":"  then wq.
  12. Re-run configuration with defauts.
    vmware-config-tools.pl -d
  13. The configuration should succeed this time.   After it finishes, reboot.
    exit                ( exit bash back to NMC)
    setup appliance reboot
    
    Note that the vmxnet3 NIC is now recognized after vmware-tools is installed.
  14. Shutdown VM,  and install a vmxnet3 NIC,  power up VM, and use GUI to configure NIC for storage network.   Static IP,   MTU=9000  ( Skip MTU, broken, see below )
  15. Reboot Appliance so that MTU takes effect.
VMXNET3  Note: in v 3.1.3.5 vmxnet3 did  not seem to work so I reverted to e1000.  In v4 beta (As of 5/25/13 )  vmxnet3 works but setting the MTU is broken, even from bash. See this link for low level commands to set MTU.

Add storage disks

My setup does not support DirectPath IO to my hosts SAS storage,  so we will have to use VMFS volumes.    This is not ideal, as ZFS hot-swap doesn't work and you will likely have to do a shutdown and manually replace any failed disks.
We will create a VMFS-5 volume filling up the entire disk for each disk dedicated to storage.  In my example my host has 6 2TB SAS drives.
Note the OS and all storage disks must be on the same host,  and the VM disabled for vMotion.
  1. On host with storage,  create VMFS-5 partitions filling the entire disk, for each one of the storage disks.
  2. In NexentaStor create one new disk that is the maximum size for each VMFS volume.  Set this disk options to Thick, lazy-zero.   Set Disk-Mode = Independent (Persistent )
    Important:  Verify disk mode to make sure disk except OS are set as above.  This is to make sure that VMware snapshots do not affect the NexentaStor disks.
  3. Power on Nexenta and make sure disks show up under "Settings, Disks"

ZFS notes

ZFS uses slightly different terminology than traditional volume managers
In ZFS a zPool is composed of vDev's ( each of which is redundant set or mirror )
zPool (many vDev's) ->  vDev (several disks)
Folder ( quota allocated within zPool )
Howerver in NexentaStor these items are  often referred by their non-ZFS terms.
  • Volume ->  this is really a zPool
  • Share   ->   this is a ZFS folder  ( with quota )
  • zVol     ->    this is a ZFS volume ( block device for iSCSI )

NFS Setup

The NFS protocol is recommended over iSCSI.   The storage allocated to each 'share' is then really only a quota,  and you can change it at will.

Set NFS server as follows for ESXi compatability:

Data management, Shares, NFS Server, Configure:
Set "Client Version" = 3

Create Volume ( zPool )

Create a single z-pool called "tank"   ( this is a play on the term pool ... )

Create Folder ( share )

NOTE:  Recommend not using de-duplication on any volume as it may be difficult to turn off without issues.  ( This was as of v3.3.x ,  status in v4 unknown )
Each folder has options ( compress,  block-size, etc. ) These are typically used for NFS, or CIFS mounts.   You can set/change the quote on each folder while running.  To create a NFS mount for ESXi hosts.
  1. Data Management, Share, Create
  2. Don't change de-dup.  For VM's use 128K blocks, bias=latency.   Create Folder
  3. Enable NFS sharing on folder.
  4. Edit NFS options, leave defaults, Anon=Y, AnonRW=Y
    Set Read/Write to @10.25.1.0/24  ( to allow 10.25.1.x hosts write access )
Thanks to lmarzke from: http://plone.4aero.com/Members/lmarzke/howto/nexentastore-installation-on-vsphere