Showing posts with label VMware. Show all posts
Showing posts with label VMware. Show all posts

Sunday, November 25, 2012

vcloud SSL certificate



Director SSL script

This certificate will use for 90 days. Two certificates will created with it one for http and another for consoleproxy.

http certificate
/opt/vmware/vcloud-director/jre/bin/keytool -keystore certificates.ks -storetype JCEKS -storepass password -genkey -keyalg RSA -alias http -dname “cn=vcloud,  ou=vmware, o=vmware, c=US” -keypass password

consoleproxy certificate
/opt/vmware/vcloud-director/jre/bin/keytool -keystore certificates.ks -storetype JCEKS -storepass password -genkey -keyalg RSA -alias consoleproxy -dname “cn=vcloud,  ou=vmware, o=vmware, c=US” -keypass password

Wednesday, November 21, 2012

VCLOUD Microsoft SQL Server Database and user

Scripts that will use to create a vcloud database and database user.


Configuring the Microsoft SQL Server Database
 
  1. Configure the database server.

    A database server configured with 16GB of memory, 100GB storage, and 4 CPUs is adequate for most vCloud Director clusters.
  2. Specify Mixed Mode authentication during SQL Server setup.

    Windows Authentication is not supported when using SQL Server with vCloud Director.
  3. Create the database instance.

    This script creates the database and log files, specifying the proper collation sequence:

    USE [master]
    GO
    CREATE DATABASE [vcloud] ON PRIMARY
    (NAME = N'vcloud', FILENAME = N'C:\vcloud.mdf', SIZE = 100MB, FILEGROWTH = 10% )
    LOG ON
    (NAME = N'vcdb_log', FILENAME = N'C:\vcloud.ldf', SIZE = 1MB, FILEGROWTH = 10%)
    COLLATE Latin1_General_CS_AS
    GO

    The values shown for SIZE are suggestions. You might need to use larger values.
  4. Set the transaction isolation level.

    This script sets the database isolation level to READ_COMMITTED_SNAPSHOT:

    USE [vcloud]
    GO
    ALTER DATABASE [vcloud] SET SINGLE_USER WITH ROLLBACK IMMEDIATE;
    ALTER DATABASE [vcloud] SET ALLOW_SNAPSHOT_ISOLATION ON;
    ALTER DATABASE [vcloud] SET READ_COMMITTED_SNAPSHOT ON WITH NO_WAIT;
    ALTER DATABASE [vcloud] SET MULTI_USER;
    GO

    For more about transaction isolation, see http://msdn.microsoft.com/en-us/library/ms173763.aspx.
  5. Create the vCloud Director database user account.

    This script creates the database user name vcloud with password vcloudpass:

    USE [vcloud]
    GO
    CREATE LOGIN [vcloud] WITH PASSWORD = 'vcloudpass', DEFAULT_DATABASE =[vcloud],
    DEFAULT_LANGUAGE =[us_english], CHECK_POLICY=OFF
    GO
    CREATE USER [vcloud] for LOGIN [vcloud]
    GO
  6. Assign permissions to the vCloud Director database user account.

    This script assigns the db_owner role to the database user created in Step 5:

    USE [vcloud]
    GO
    sp_addrolemember [db_owner], [vcloud]
    GO

Saturday, July 16, 2011

How to change IP address of your ESX Server

There is a time when you need to change the IP adress your ESX host. You can’t do it in the VI client Graphical User Interface. The only thing you can do is to go to the ESX server console.

1.) First of all , you must have physical access to the console.

2.) Put your ESX host in Maintenance Mode and disconect it from Virtual Center.

3.) Now you can connect to the console of your ESX host.

4.) Remove the old IP adress (by deleting the vswif interface) “esxcfg-vswif -d vswif0″ (vsfif0 is your interface to remove. Otherwise use the number you need)
How to change IP adress of ESX Server console

5.) Create a new vswif interface with the New IP adress “esxcfg-vswif -a vswif0 -p “Service Console” -i 192.168.0.100 -n 255.255.255.0 -b 192.168.0.255″ (vsfif0 is your interface you work with. Otherwise use the number you need). If you need, replace Service Console with the name of your Service Console portgroup (this one is the default value)
-i is the new IP adresse
-n is your new subnet
-b is your broadcast

6.) Update the default gateway. Open nano “nano /etc/sysconfig/network file”
How to change ESX server Ip adress on the console
How to change ESX server Ip adress on the console
Press “CTRL+O” and “ENTER” then “CTRL+Q” to quit

7.) Then you need to restart the interfac. Do a “esxcfg-vswif -s vswif0″ (this will disable the vswif0 interface) and “esxcfg-vswif -e vswif0″ (this will enable the vswif0 interface)
How to change IP adress on the ESX Server console

8.) You should now update update DNS and your HOSTS files. Also what I would do is a “ipconfig /flushdns” and “ipconfig /registerdns” on your Virtual Center server. Only after you should reconect your ESX server host in the Virtual Center.

You can change the DNS information, hostname from the VI client GUI:

01.) Open the VI client and highlight the ESX Server host and click on the Configuration tab.

02.) Click DNS and Routing.
Change DNS and Routing ESX Server through VI GUI

03.) Click Properties.

04.) If you want to change the hostname, domain, and DNS servers, click the DNS Configuration tab and enter the appropriate values.
Change ESX server DNS and Routing through VI client GUI

05.) To change the default gateway, click the Routing tab and enter the appropriate values.
Change ESX server DNS and Routing through VI client GUI

06.) Then you can restart the ESX server from the GUI interface of your VI client for the changes to take an effect
Change ESX server DNS and Routing through VI client GUI

So after the reboot you get this : (I just changed my DNS info from “vladanseget.com” to “vladan.fr” … as an example
Change ESX server DNS and Routing through VI client GUI

Recreating Service Console networking from the command line

Recreating Service Console networking from the command line

Details

  • The Service Console loses connectivity
  • Due to misconfiguration of service console, the network connection fails
  • An additional NIC is added to ESX host

Solution

Note: ESX 4.0 Update 2 introduces a new tool that simplifies the process of creating or restoring networking in the ESX service console. For more information, see Configuring or restoring networking from the ESX service console using console-setup (1022078).
 
To delete and recreate a virtual switch and Service Console from the command line:
 
Note: On your system the vswif, vmnic, vSwitch numbers and network settings are different. 
  1. Run the following command to list the name of the vswif adapter:
    esxcfg-vswif -l
  2. Run the following command to delete the vswif adapter:
    esxcfg-vswif --del vswif0
  3. Run the following command to list the name of the vSwitch:
    esxcfg-vswitch -l
  4. Run the following command to delete the vSwitch:
    esxcfg-vswitch -d vSwitch0
  5. Run the following command to create the vSwitch:
    esxcfg-vswitch -a vSwitch0
  6. Run the following commands to create default port groups for vSwitch:
    esxcfg-vswitch -A "VM Network" vSwitch0
    esxcfg-vswitch -A "Service Console" vSwitch0

  7. Run the following command to create the vswif adapter:
    esxcfg-vswif --add --portgroup "Service Console" --ip=nnn.nnn.nnn.nnn --netmask=255.255.255.0 vswif0
  8. Run the following command to verify that the settings in the network file are correct:
    cat /etc/sysconfig/network
    NETWORKING=yes
    GATEWAYDEV=vswif0HOSTNAME=host.domain.comGATEWAY=nnn.nnn.nnn.nnn
  9. Run the following commands to list all of the network adapters and associate a vmnic which has a link status of up:
    esxcfg-nics -l
    esxcfg-vswitch -L vmnic1 vSwitch0
  10. Run the following command to verify that the vmnic is associated with the vSwitch:
    esxcfg-vswitch -l
  11. Ping an IP address to check for network connectivity. If the ping fails, remove the previous vmnic from the vSwitch and try another adapter that has a link status of up.
    esxcfg-vswitch -U vmnic1 vSwitch0
    esxcfg-vswitch -L vmnic2 vSwitch0

  12. Run the following command to change the vlan ID of a vSwitch:
    [root@server root]# esxcfg-vswitch -p "VM Network 1" -v 10 vSwitch0

  13. If you make any manual changes to /etc/sysconfig/network, run the following command to restart the network service:
    service network restart

Regards,