Monday, March 2, 2020

How to Collect Diagnostic Data From VMware ESX/ESXi and VirtualCenter Server


There are a couple of methods for collecting diagnostic data from VMware ESX/ESXi Servers / VirtualCenter Server.


A) One method is to login as root to the ESX/ESXi Server Service Console command line as user 'root'. In the /root directory run the command vm-support. This will generate a tarball named something similar to:

esx-2008-month-day--hour.min.<PID>.tgz.

There are other flags and switches you may use with the vm-support command to generate:

1) Performance snapshots
2) Gather Virtual Machine specific debugging
3) Suspend Virtual Machine to generate VM core files and include VM memory state with vm-support output.

For complete information on the command line options you can run with vm-support see the manpage for vm-support on your ESX/ESXi Server.

B) Second method is from within the VI Client connecting directly to the host go to File - Export - Export Diagnostic Data.

C) Third method using the VI Client to connect directly to the VirtualCenter Server managing multiple ESX Server hosts - go to the Administration pull down menu - Export Diagnostic Data - Select ESX hosts and make sure box is checked to "Include information from VirtualCenter Server and VI Client".

Choose where on the Windows Server hosting your VirtualCenter Server to store the diagnostic data. This method not only collects VirtualCenter Server specific information but also generates and collects the vm-support output for the ESX Server hosts you select.

You want to use the VirtualCenter method to generate and collect diagnostic data if:

1) Problem is VMotion, Migration related
2) Problem is related to creating or deploying templates or clones
3) Problem affects more than one ESX host
4) Problem is VirtualCenter Server related, for example VC Server performance reporting
5) Problem is related to VirtualCenter Server Plugins / Addons such as HA, DRS, VCB, Update Manager, Capacity Planner, VMware Converter etc...
6) Problems using the Snapshot Manager

How to Find ESXi 5.x Host Driver Version Installed


There are multiple ways to accomplish this. 

First is by logging into the Fabric Director as user 'admin' and running the 'show physical-servers' command:
perf01  2c9030005f7d4  cslab-rum01:ServerPort19  VMware/ESX5.2.0.EAX1C.1/x86_64   2.7.0/3.0.0  perf01-rum

Another way is to login to the ESXi 5.0 host as user 'root' and executing this command:

# esxcli software vib list |grep xsvnic, xsigo, xsvhba or xscore

In the ESXi 5.x vm-support or xsigo-support logs go to the 'commands' folder:

-bash-3.2$ ls
action.log  bootbank  commands  error.log  errors-ignored.log  etc  json  proc  README  reconstruction  reconstruct.sh  usr  var  vmfs

In the 'commands' directory grep the 'localcli_software-vib-get.txt' file for xsvnic or xsvhba:

-bash-3.2$ grep -i xsvnic localcli_software-vib-get.txt
VMware_bootbank_net-xsvnic_5.0.2.ESX.1-1vmw.500.0.0.406165:
   Name: net-xsvnic
   Summary: xsvnic: net driver for VMware ESX
   Provides: com.xsigo.xsvnic-9.2.0.0

Sunday, June 30, 2019

Veritas NetBackup OpsCenter upgrade


Veritas NetBackup OpsCenter upgrade




Pre-Checks:
1. OpsCenter should run on same version as Netbackup is running or should run on higher version. OpsCenter/OpsCenter Analytics must always be running the same or higher version.
2. Make sure that OpsCenter is compatible with Operating System and Netbackup.
3. OpsCenter should always run on a dedicated server and not on a NBU master
4. Ensure that all required ports are open on OpsCenter Server.

OpsCenter Port requirement:

Steps to Upgrade OpsCenter Analytics
1.    Backup OpsCenter Database
OpsCenter is shipped with a database backup script that performs backup of the database , the corresponding database password file, and the encryption key file without interrupting its operations, which is referred to as hot backup. On UNIX as well as Windows platforms, the script overwrites the existing database files before backing up or restoring them.
Note:
Regular file system backups are not sufficient for backing up the OpsCenter database. You must schedule periodic hot backups for the OpsCenter database to avoid losing any important data.
To back up the OpsCenter database
  1. Log on to the OpsCenter database server host in one of the following ways:
Windows
As an administrator or user in the Administrator group
UNIX
root
  1. Open the Windows command prompt or the UNIX console.
  2. Run the backup script that is appropriate for your platform. Specify one of the following backup directories depending on your platform:
LINUX
/opt/SYMCOpsCenterServer/bin/dbbackup.sh /u01/backup/OpsCenter/

  1. The backup script backs up the database files, database password files, and encryption key file in the backup directory that you specified.
  2. Ensure the compatibility of the OpsCenter with the OS Version ad Bit.
  3. Download OpsCenter installation file to the OS.
  4. Run the installation and follow the process.

Note: OpsCenter should always run on a dedicated server and not on a NBU master

Documentation:

Backing up the OpsCenter database

Download OpsCenter:

How to Backup OpsCenter Database:

Upgrading OpsCenter on UNIX

Use the following procedure to upgrade to OpsCenter software on UNIX hosts.
Note:
Veritas recommends that you do not cancel or interrupt the installation process once it is started.
To upgrade OpsCenter Server on UNIX
  1. If you plan to upgrade your backup product and OpsCenter, ensure that you upgrade OpsCenter first. When upgrading OpsCenter, always upgrade the OpsCenter Server first followed by the Agent and then the View Builder.
  2. Open a UNIX console and log on as root on the target host.
  3. Mount the OpsCenter product DVD on the OpsCenter Server that you want to upgrade.
  4. Untar OpsCenter_7.7_Unix.tar.gz
  5. Cd /u01/share/soft/OpsCenter_7.7_Unix
  6. Type the following command: ./install. Press Enter.
  7. [root@em01 OpsCenter_7.7_Unix]# ./install
  1. The Welcome message is displayed. Press Enter to continue.
  1. The installer then checks if OpsCenter Server is installed on the system or not. It prompts you in case OpsCenter Server is already installed. The installer also examines the system for existing packages. 
  1. The following prompt is displayed:

Where should the existing OpsCenter database and configuration files be backed up? 
An 'OpsCenterServer_backup' directory will be created within the directory that you specify to store these 
files. (/var/symantec/)
Type the directory name in which the existing OpsCenter database and configuration files can be saved and then press Enter.
To accept the default directory path (/var/symantec), press Enter.
  1. The installer displays a list of components that will be installed or upgraded like PBX, OpsCenter Server, OpsCenter user interface and so on. Review this list and press Enter to continue.
  1. The installer prompts you with the following question:
installOpsCenterServer is now ready to upgrade OPSCENTERSERVER.
Are you sure you want to upgrade OPSCENTERSERVER? [y,n,q] (y)
Press Enter to continue OpsCenter upgrade.
  1. The installer prompts you with the following question:
Participate in the NetBackup Product Improvement program? [y,n,q] (y)
Press Enter if you want to participate in the NetBackup Product Improvement program or press n if you do not want to participate.
  1. The installer prompts you with the following question:
Do you want to import users from <remote AT host name> to OpsCenter AT?
Press Enterto import users from the earlier OpsCenter versions.
For more details, refer to the About Importing Authentication Settings section.
If the import fails, you need to reset password of all OpsCenter(vx) users.
  1. By default, in OpsCenter, the database is upgraded in the beginning. However, you can choose to first upgrade the OpsCenter software.
The database upgrade process starts. In this process, the OpsCenter data is migrated to the new OpsCenter database version. The database process may take time depending on your database size.
The following message is displayed:
The database upgrade is in progress. This may take some time based on the database size. You can see the progress and current status in /var/tmp/(directory)/db/log/dbManager_<timestamp>_.log file.
After complete installation, the logs are copied to the following location:/var/VRTS/install/logs/LogDirectory/db/log
LogDirectory is generated during the upgrade progress.

  1. The installer displays the OpsCenter packages that are installed. Depending on the installed packages, the following message may be displayed:
The following packages were found on the system. However the package
versions are older than the ones required by OpsCenter.
 
VRTSOpsCenterServer existing version was found on the system, 
but OpsCenter requires VRTSOpsCenterServer new version
VRTSOpsCenterGUI existing version was found on the system, 
but OpsCenter requires VRTSOpsCenterGUI new version
VRTSOpsCenterLegacyServer existing version was found on the system, 
but OpsCenter requires VRTSOpsCenterLegacyServer new version
The installer then uninstalls the older packages and installs new version of OpsCenter Server.
  1. OpsCenter Server is installed. Configuration changes are made to the system.
  2. All the OpsCenter processes are started. The following information is also displayed:
o    Web URL to access OpsCenter console
o    Location of install log and summary files.


Note:
After successful upgrade, OpsCenter database password is set to an auto-generated string, if the earlier password is still the default one, that is 'SQL'. Veritas recommends that you change the database password after the installation.
If you had changed the default password in the earlier version, you do not need to change it again. The installer retains the old password that you can use in the current version.

Decommissioning a media server

Decommissioning Netbackup Media Server


Following information about is decommissioning a NetBackup media server.

Your path through the nbdecommission wizard depends on how you respond to the wizard prompts. Depending on your environment and how you respond to prompts, the wizard may advise you to perform an action and then exit. To continue in the wizard, you must run the wizard again after you perform the advised action. You may have to exit and rerun the wizard several times.

If active jobs exist on the media server, you must cancel them before the command can begin to decommission the media server. Alternatively, you can wait until they finish.

The OldServer does not have to be up and responsive.
Veritas recommends that you preview the media server references before you decommission a media server.

The nbdecommission command logs to the standard NetBackup administrator commands log directory.
Two procedures exist, as follows:
1. Replace an old media server with a new media server
2. Decommission a media server.

To replace an old media server with a new media server
1. Run the nbdecommission command on the master server or on a media server that is not the object of this operation. The following is the command syntax:

On Windows:
install_path\NetBackup\bin\admincmd\nbdecommission -oldserver OldServer [-newserver NewServer] [-file decom_ops.txt]

On UNIX:
/usr/openv/netbackup/bin/admincmd/nbdecommission -oldserver OldServer [-newserver NewServer] [-file decom_ops.txt]
Replace OldServer with the name of the host to be decommissioned.

-newserver is optional. If you specify a new server, the new server becomes the default media server for the replacement operations. If you do not specify a new server, the wizard prompts you for the new server for each storage type that contains valid backup images. This method is useful if you want to move backup images to different media servers. For example, you can move backup images from tape storage to one media server and backup images from disk storage to another media server.
-file is optional. It writes the command operations to the specified file. Replace decom_ops.txt with a name that denotes its purpose or contents. Veritas recommends that you use the -file option to maintain a record of the command operations.

2. Follow the prompts and perform the requested actions.
For example, the command may make changes on the master server and on multiple media servers. You may be required to restart the NetBackup services on those servers so that the changes take effect.

To decommission a media server
a) Run the following command on the master server or on a media server that is not the object of this operation. The OldServer does not have to be up and responsive.

On Windows:
install_path\NetBackup\bin\admincmd\nbdecommission -oldserver OldServer

On UNIX:
/usr/openv/netbackup/bin/admincmd/nbdecommission -oldserver OldServer
Replace OldServer with the name of the host to be decommissioned.

b) Follow the prompts and perform the requested actions.


bphdb exit status = 5449: The script is not approved for execution


Registering authorized locations used by a NetBackup database script-based policy


To add an authorized location

    Open a command prompt on the client.
    Use nbsetconfig to enter values for an authorized location. The client privileged user must run these commands.

On UNIX:
root@erpddb01:/usr/openv/netbackup/bin/nbsetconfig
nbsetconfig>DB_SCRIPT_PATH = /export/home/oraprod/scripts
nbsetconfig>DB_SCRIPT_PATH = /export/home/oraprod/scripts/rmanfull.daily
nbsetconfig>
<ctrl-D>

Reference: NetBackup Support Knowledge base


Friday, June 28, 2019

Boot Virtual Machine from a CD


vm.cfg must be like this

disk = ['file:/OVS/running_pool/121_SRVAXIPMI180_RedHatES_51_Tomcat_DVLP/System.img,hda,w',
'file:/OVS/running_pool/121_SRVAXIPMI180_RedHatES_51_Tomcat_DVLP/Data.img,hdd,w',
'file:/OVS/iso_pool/"YOUR_ISO_GROUP"/rhel-5.1-server-x86_64-dvd.iso,hdc:cdrom,r',
]

or like this, it's depend where is your DVD_ISO

disk = ['file:/OVS/running_pool/121_SRVAXIPMI180_RedHatES_51_Tomcat_DVLP/System.img,hda,w',
'file:/OVS/running_pool/121_SRVAXIPMI180_RedHatES_51_Tomcat_DVLP/Data.img,hdd,w',
'file:/root/rhel-5.1-server-x86_64-dvd.iso,hdc:cdrom,r',
]

Oracle VM Using the P2V Utility


Using the P2V Utility
When you use the P2V utility, you are prompted for all required information.
To create a virtual machine image of a computer:
  1. Insert the Oracle VM Server CDROM into the CDROM drive of the computer you want to image.
Note
This procedure is for 64-bit computers. If you want to convert a 32-bit host computer to a virtual machine template, you must use the Oracle VM 2.x CD.
  1. Start the computer with the Oracle VM Server CDROM.
  2. The Oracle VM Server installation screen is displayed.

At the boot:prompt, enter:
p2v
Press Enter.
  1. The CD Found screen is displayed.

If you want to make sure the CDROM is error free, you can have the installer test it for errors. To test the CDROM, select OK and press Enter. The CDROM is tested and any errors are reported.
To skip media testing and continue with the installation, select Skip and press Enter.
  1. The P2V Network Configuration screen is displayed.

Select your Ethernet driver from the list displayed.
If your computer uses DHCP to assign its IP address, select Automatically obtain via DHCP.
If your computer uses a static IP address, select Manually configure, and enter the IP address and netmask, gateway, domain and name server for your computer.
Select OKand press Enter.
  1. The disk selection screen is displayed.

Select the disk partition(s) on the computer to include in the guest image. Select OK and press Enter.
  1. The Other parameters for VM screen is displayed.

Enter information about the guest image for:
    • VM (guest) name
    • VM (guest) memory
    • Number of virtual CPUs
    • Console password. This is no longer required, but you must enter a value.
Select OKand press Enter.
  1. A secure web server (HTTPS) is started. The IP address of the computer, and port number the web server is available on is displayed.

Open a web browser on another computer and enter the URL created using the information displayed on the computer running the P2V utility, for example
https://192.168.2.6/
You do not need to enter the port number as this is the default port number for HTTPs connections. A directory listing is displayed which contains the files created by the P2V utility. Take a note of the URLs for the vm.cfg and *.img files as you use them in the next step when importing the virtual machine into Oracle VM Manager.

Log in to Oracle VM Manager and import the guest using the import template feature. When you import the guest, you should add the URLs for each virtual disk image and the virtual machine configuration file on a new line in Template URLsfield in the Import Templatedialog, as shown below.

  1. When the virtual machine template is added to the repository, you should terminate the P2V utility on the host computer. Press Control+C to terminate the P2V utility on the computer. Remove the Oracle VM Server CDROM from your CDROM drive. Restart the computer.
The guest image is created and available in the repository as a hardware virtualized virtual machine template.


Question 8 Explanation

Compartments are the primary building blocks you use to organize your cloud resources. You use compartments to organize and isolate your res...