Scripts that will use to create a vcloud database and database user.
Configuring the Microsoft SQL Server Database
Configure the database server.
A database server configured with 16GB of memory, 100GB storage, and 4 CPUs is adequate for most vCloud Director clusters.
Specify Mixed Mode authentication during SQL Server setup.
Windows Authentication is not supported when using SQL Server with vCloud Director.
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.
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.
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
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
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)
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”
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)
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.
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.
05.) To change the default gateway, click the Routing tab and enter the appropriate values.
06.) Then you can restart the ESX server from the GUI interface of your VI client for the changes to take an effect
So after the reboot you get this : (I just changed my DNS info from “vladanseget.com” to “vladan.fr” … as an example
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.
Run the following command to list the name of the vswif adapter: esxcfg-vswif -l
Run the following command to delete the vswif adapter: esxcfg-vswif --del vswif0
Run the following command to list the name of the vSwitch: esxcfg-vswitch -l
Run the following command to delete the vSwitch: esxcfg-vswitch -d vSwitch0
Run the following command to create the vSwitch: esxcfg-vswitch -a vSwitch0
Run the following commands to create default port groups for vSwitch: esxcfg-vswitch -A "VM Network" vSwitch0 esxcfg-vswitch -A "Service Console" vSwitch0
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
Run the following command to verify that the settings in the network file are correct: cat /etc/sysconfig/network NETWORKING=yesGATEWAYDEV=vswif0HOSTNAME=host.domain.comGATEWAY=nnn.nnn.nnn.nnn
Run the following commands to list all of the network adapters and associate a vmnic which has a link status of up: esxcfg-nics -lesxcfg-vswitch -L vmnic1 vSwitch0
Run the following command to verify that the vmnic is associated with the vSwitch: esxcfg-vswitch -l
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
Run the following command to change the vlan ID of a vSwitch: [root@server root]# esxcfg-vswitch -p "VM Network 1" -v 10 vSwitch0
If you make any manual changes to /etc/sysconfig/network, run the following command to restart the network service: service network restart