vCenter services stop, start, or status command in windows

If your vCenter is on a Windows host, then you must use Windows commands to restart the VMware vSphere web client service in vCenter. There are many ways to restart services in vcenter and troubleshooting purposes, it is required to restart the VMware vCenter Server services such as VMware Virtual Center Server, VMware vSphere Web Client, or VMware Directory Service.

VMware vCenter Server 6.x, VMware recommends to use the vSphere Web Client or Service Control command-line tool to stop, start, or restart vCenter Server. These commands are verified with VMware vCenter Server 6.x and steps to restarting the vSphere web client service in Windows.

How to stop, start and status vCenter services command in Windows server.

1. Log in as an administrator to the windows server that is running vCenter Server.

2. Open an administrative command prompt.
Run this command to change to vCenter Server and/or Platform Services Controller installation directory:

3. Go to default vCenter server installation path

cd C:\Program Files\VMware\vCenter Server\bin

Run this command to list vCenter Server and/or Platform Services Controller services

./service-control --list
 

Run this command to view the current status of vCenter Server and/or Platform Services Controller services:

./service-control --status

Run this command to stop all services:

./service-control --stop --all

Run this command to start all services:

./service-control --start --all

To perform a dry run of the command, This displays the actions that command run without executing the actions.

./service-control --start --all --dry-run

Run this command to stop a specific service:

service-control --stop servicename

Run this command to start a specific service:

service-control --start servicename

 

Example

service commands

vCenter service control commands

 

Errors:

A server error occurred.
[500] SSO error: Cannot connect to the VMware Component Manager https://vcentera.vmusketeers.local/cm/sdk?hostid=8f7ab780-bbd2-11e7-8d6f-2cc260268d52
Check the vSphere Web Client server logs for details.

 

vCenter Errors

To solve this you have to restart the Component Manager and the Web client from the command line, both which are unavailable from the services.msc.

Go to the installation path of your vCenter server:

cd C:\Program Files\VMware\vCenter Server\bin

stop and start Component Manager services

service-control --stop VMwareComponentManager
service-control --start VMwareComponentManager

stop and start the web client service:

service-control --stop vspherewebclientsvc
service-control --start vspherewebclientsvc

 

 

 

Configure Email Alerts in VMware vCenter

The monitoring of VMware vSphere should be a combination of proactive benchmarking and reactive alarm-based actions. vCenter Server provides both methods to help the administrator keep tabs on each of the virtual machines and hosts as well as the hierarchical objects in the inventory. Using both methods ensures that the administrator is not caught unaware of performance issues or lack of capacity. How to Configure Email Alerts in VMware vCenter.

vCenter comes with a few default alarms such as ESX host connection state and usage alarms. Use the following steps to create alarms and how to send email notifications.

Make sure you have the permission to edit this vCenter configuration

In the vSphere Web Client,

  • navigate to the vCenter Server instance.
  • Click on the Manage tab.
  • Under Settings, select General.
  • Click Edit.

email notification

  • Select Mail.

In Mail server,

  • type the SMTP server information.

The SMTP server is the DNS name or IP address of the SMTP gateway to use for sending email messages.
Example,
smtp.gmail.com

In Mail sender,

  • type the sender account information.

The sender account is the email address of the sender.
Example,
[email protected]

  • Click OK.

Now as you have successfully configured the email settings in vCenter.

To test the mail settings, create an alarm that can be triggered by a user action, such as by powering off a virtual machine and check the emails.

 

 

Solution and Patch for Meltdown Spectre CPU Vulnerability

A very serious security problem has been found and patched in the Linux kernel. It was announced on 3rd January 2018. Meltdown and Spectre exploit critical vulnerabilities in modern processors. These hardware vulnerabilities allow programs to steal data which is currently processed on the computer. While programs are typically not permitted to read data from other programs, a malicious program can exploit Meltdown and Spectre to get hold of secrets stored in the memory of other running programs. This might include your passwords stored in a password manager or browser, your personal photos, emails, instant messages and even business-critical documents. Learn more how this Solution and Patch for Meltdown Spectre CPU Vulnerability.

We need to update fixes to mitigate all 3 variants CVE-2017-5753 (variant 1), CVE-2017-5715 (variant 2), and CVE-2017-5754 (variant 3) on your machine.

Variant 1: bounds check bypass (CVE-2017-5753)
Variant 2: branch target injection (CVE-2017-5715)
Variant 3: rogue data cache load (CVE-2017-5754)

A list of affected Linux distro by Spectre Vulnerabilities.

Red Hat Enterprise Linux 5 (including clones such as CentOS/Oracle/Scientific Linux 5)
Red Hat Enterprise Linux 6 (including clones such as CentOS/Oracle/Scientific Linux 6)
Red Hat Enterprise Linux 7 (including clones such as CentOS/Oracle/Scientific Linux 7)
RHEV-M 4.0
RHEV-M for Servers
Red Hat Enterprise Linux OpenStack Platform 7.0 (Kilo) for RHEL 7
Red Hat Enterprise Linux OpenStack Platform 6.0 (Juno) for RHEL 7
Red Hat Enterprise MRG 2
Red Hat OpenStack Platform v 8/9/10/11/12
Debian Linux wheezy
Debian Linux jessie
Debian Linux stretch
Deiban Linux buster, sid
SUSE Linux Enterprise Server for Raspberry Pi 12 SP2
SUSE OpenStack Cloud 6
Openstack Cloud Magnum Orchestration 7
SUSE Container as a Service Platform ALL
SUSE Linux Enterprise High Availability 12 SP2/SP3
SUSE Linux Enterprise Live Patching 12
SUSE Linux Enterprise Module for Public Cloud 12
SUSE Linux Enterprise Server 11 SP3-LTSS
SUSE Linux Enterprise Server 11 SP4
SUSE Linux Enterprise Software Development Kit 11/12 SP3/SP4
SUSE Linux Enterprise for SAP 12 SP1
SUSE Linux Enterprise 11
SUSE Linux Enterprise 12
OpenSuse Linux based upon SUSE 12/11
Fedora Linux 26
Fedora Linux 27
Amazon Linux AMI (Bulletin ID: ALAS-2018-939)

meltdown and spectre Vulnerability

How to fix Meltdown Spectre CPU Vulnerability on CentOS/RHEL/Fedora/Oracle

run yum update command, Note: This will upgrade your OS version

# sudo uname -r
3.10.0-327.10.1.el7.x86_64

# sudo yum update -y
# sudo reboot

Once rebooted, verify your kernel version

# sudo uname -r
3.10.0-693.21.1.el7.x86_64

Use below command to verify the patchs in kernel.

# rpm -q --changelog kernel | egrep 'CVE-2017-5715|CVE-2017-5753|CVE-2017-5754'

 

The solution for the Meltdown and Spectre Vulnerability on a Debian/Ubuntu Linux

# sudo apt-get update
# sudo apt-get dist-upgrade
# sudo reboot

 

The solution for the Meltdown and Spectre Vulnerability on Amazon Linux running on AWS

run yum command:
# yum update kernel
# reboot

 

The solution for the Meltdown and Spectre Vulnerability on Arch Linux

run pacman command:
# pacman -Syu
# reboot

 

The solution for the Meltdown and Spectre Vulnerability on Suse Enterprise Linux Server 12-SP3

Execute the zypper command:
# zypper in -t patch SUSE-SLE-SERVER-12-SP3-2018-12=1
### [ To bring your system up-to-date ] ###
# zypper patch
# reboot

 

How to patch Meltdown and Spectre Vulnerability in existing OS version.

 

Upgrade kernel version on CentOS 7.2. First, check the kernel dependencies and update it.

Example

[[email protected] ~]# rpm -ivh kernel-3.10.0-693.21.1.el7.x86_64.rpm
error: Failed dependencies:
dracut >= 033-502 is needed by kernel-3.10.0-693.21.1.el7.x86_64
linux-firmware >= 20170606-55 is needed by kernel-3.10.0-693.21.1.el7.x86_64
xfsprogs < 4.3.0 conflicts with kernel-3.10.0-693.21.1.el7.x86_64
kmod < 20-9 conflicts with kernel-3.10.0-693.21.1.el7.x86_64
kexec-tools < 2.0.14-3 conflicts with kernel-3.10.0-693.21.1.el7.x86_64

Solution

[[email protected] ~]# yum update dracut linux-firmware xfsprogs kmod kexec-tools kernel-3.10.0-693.21.1.el7.x86_64 -y
[[email protected] ~]# reboot

 

[[email protected] ~]# uname -r
3.10.0-693.21.1.el7.x86_64

 

[[email protected] ~]# cat /etc/redhat-release
CentOS Linux release 7.2.1511 (Core)

Upgrade kernel version on CentOS 7.3. First, check the kernel dependencies and update it.

[[email protected] ~]# rpm -ivh kernel-3.10.0-693.21.1.el7.x86_64.rpm
error: Failed dependencies:
dracut >= 033-502 is needed by kernel-3.10.0-693.21.1.el7.x86_64
linux-firmware >= 20170606-55 is needed by kernel-3.10.0-693.21.1.el7.x86_64
kexec-tools < 2.0.14-3 conflicts with kernel-3.10.0-693.21.1.el7.x86_64

[[email protected] ~]# yum update dracut linux-firmware kexec-tools kernel-3.10.0-693.21.1.el7.x86_64 -y
[[email protected] ~]# reboot

 

[[email protected] ~]# cat /etc/redhat-release
CentOS Linux release 7.3.1611 (Core)

 

[[email protected] ~]# uname -r
3.10.0-693.21.1.el7.x86_64

 

You can verify the Meltdown security bug patch in kernel.

[[email protected] ~]# rpm -q --changelog kernel | egrep 'CVE-2017-5715|CVE-2017-5753|CVE-2017-5754'