Browsed by
Tag: vcsa

dcli and how to shutdown vCSA

dcli and how to shutdown vCSA

Sometimes You want to shutdown vCSA or PSC gracefully, but You don’t have an access to GUI through vSphere Client or VAMI.

How to do it in CLI? I’m going to show You right now using dcli, because I’m exploring a potential of this tool and I can’t get enough.

  1. Open an SSH session to vCSA and log in as root user.
  2. Run dcli command in an interactive mode.

    dcli +i
  3. Use shutdown API call, to shutdown an appliance, giving a delay value (0 means now) and a description of disk task.

    com vmware appliance shutdown poweroff --delay 0 --reason 'Shutdown now'
  4. Enter an appropriate administrator user name e.g. administrator@vsphere.local and a password.
  5. Decide if You want save the credentials in the credstore. You can enter ‘y’ as yes.

Wait until the appliance will go down. 🙂

I know that it’s not the quickest way, but the point is to have fun.

VCSA Tools – Part 1 – journalctl. Better way for vCSA log revision.

VCSA Tools – Part 1 – journalctl. Better way for vCSA log revision.

There’s a plenty of great CLI tools in VCSA that modern vSphere administrator should know, so I decided to share my knowledge and describe them in the series of articles.

The first one is journalctl. A tool that simplifies and quickens the VCSA troubleshooting process.

Below I’m presenting how I’m using it, to filter the logs records.

Log in to VCSA shell and run the commands below, regarding to the result you want to achive.

The logs from the current boot:

journalctl -b


The boots that journald is aware of:

journalctl --list-boots

It will show this kind of results representing each known boot:

-3 26c7f0e356eb4d0bbd8d9fad1b457808 Wed 2019-01-09 15:18:12 UTC—Wed 2019-01-09 16:58:18 UTC
-2 124d73cf46d441908db7609813e0c49a Wed 2019-01-09 17:01:08 UTC—Fri 2019-01-11 10:22:39 UTC
-1 ebf1ba1936404fb086727b61ac825d47 Fri 2019-01-11 11:22:59 UTC—Fri 2019-01-11 15:48:37 UTC
 0 bd70a6d99a7245dc9b7859c5f2a7ef6f Mon 2019-01-14 10:19:47 UTC—Tue 2019-01-15 12:38:16 UTC

Now you can use it, to display the results of the chosen boot:

journalctl -b -1


To limit the results to the given timeframe, use dates or keywords:

journalctl --since "2019-01-10" --until "2019-01-14 03:00"

or:

journalctl --since yesterday

or:

journalctl --since 09:00 --until "2 hour ago"


Limiting the logs by service name:

Get the service names first:

systemctl list-unit-files | grep -i vmware

To show only records for vpxd service in current boot:

journalctl -b -u vmware-vpxd.service


Filtering by Id (Process, User or Group):

Get the user Id, e.g.:

cat /etc/passwd | grep -i updatemgr

then:

journalctl _UID=1017 --since today


Filtering by the binary path:

journalctl -b --since "20 minute ago" /usr/sbin/vpxd


Displaying kernel messages:

journalctl -k


Limiting messages by their priorities:

journalctl -p err -b

where the priority codes are:

0: emerg
1: alert
2: crit
3: err
4: warning
5: notice
6: info
7: debug

Of course those examples don’t exhaust all the possibilities this tool has, but consider them as a usage starting point. Feel free to add new, useful examples in comments below.

That’s all for today!

VCSA deployment and migration options

VCSA deployment and migration options

The vCenter Server Appliance deployment experience has been enhanced in the vSphere 6.5 release. Installation workflow is now performed in 2 stages. The first stage deploys an appliance with the basic configuration parameters: IP, hostname, and sizing information including storage, memory, and CPU resources.
vcenter4

Stage 2 then completes the configuration by setting up SSO and role-specific settings. Once Stage 1 is complete we can now snapshot the VM and rollback if any mistakes are made in Stage 2. This prevents from having to start completely over if anything were to go wrong during the deployment process.

NOTE!!! There are versions of the deployment application available for Windows, Linux, and macOS.

 vcenter5

 A new feature in vSphere 6.5 is the ability to migrate a Windows vCenter Server 5.5 or 6.0 to a vCenter Server Appliance 6.5. The migration process starts by running the Migration Assistant, which serves two purposes. The first, pre-checks of the source Windows vCenter Server 5.5 or 6.0 to determine if it meets the criteria to be migrated. Second, it is the data transport mechanism that migrates data from the source Windows vCenter Server 5.5 or 6.0 to the target vCenter Server Appliance 6.5.

The Migration tool will automatically deploy a new vCenter Server Appliance 6.5 and migrate configuration, inventory, and alarm data by default from a Windows vCenter Server 5.5 or 6.0. If you want to keep your historical and performance data (stats, events, tasks) along with configuration, inventory, and alarm data there is the option to also migrate that information. The vSphere 6.5 release of the Migration Tool provides granularity for historical and performance data selection.

vcenter6

Both embedded and external topologies are supported, the Migration Tool will not allow changing your topology during the migration process. Changing of topologies will need to be done before the migration process if consolidation of your vSphere SSO domain is required.

SUMMARY:

  • 5 support for Windows vCenter 5.5 or 6.0 à 6.5
  • Migrations for both embedded and external topologies
  • VUM included
  • Embedded and external Database support: MSSQL, MSSQL Express, Oracle
  • Option to select historical and performance data
vCenter Server Appliance 6.5 – new default deployment choice

vCenter Server Appliance 6.5 – new default deployment choice

vcenter1The vCenter Server Appliance 6.5 is the first VMware Appliance to run on Photon OS, it is a Linux OS optimized for virtualization which will become in near future  standard for all VMware virtual appliances. Photon OS provide many benefits to the performance of the vCenter Server Appliance, which includes about 3x performance gain over its Windows counterpart and significantly reduces boot and restart times. This also means no more dependency on 3rd party for OS patching and should greatly reduces the amount of time it takes VMware to deliver security patches and updates to the vCenter Server Appliance.

VCSA – main features:

  • Native High Availability
  • VMware Update Manager
  • Improved Appliance Management
  • Native Backup / Restore

In vSphere 6.0 we saw performance and scalability parity for the vCenter Server Appliance when compared to it’s Windows-based counterpart. With vSphere 6.5 we now see feature parity and even new features that are exclusive to the vCenter Server Appliance. Let’s take a quick look at each of these new features before addressing them in more details later:

vcenter2

vcenter3

Let’s start with vCenter High Availability which is a native HA solution built right into the appliance. Using an Active/Passive/Witness architecture, vCenter is no longer a single point of failure and can provide a 5-minute RTO. This HA capability is available out of the box and has no dependency on shared storage, RDMs or external databases.

Next, we have the integration of VMware Update Manager into the vCenter Server Appliance. Now VMware Update Manager is included by default into the vCenter Server Appliance and makes deployment and configuration a snap.

Another exclusive feature of the vCenter Server Appliance 6.5 is the improved appliance management capabilities. The vCenter Server Appliance Management Interface continues its evolution and exposes additional health and configurations. This simple user interface now shows Network and Database statistics, disk space, and health in addition to CPU and memory statistics which reduces the reliance on using a command line interface for simple monitoring and operational tasks.

Finally, VMware have added a native backup and restore capability to the vCenter Server Appliance in 6.5 to allow for simple out-of-the-box backup options in addition to the traditional supported methods including VMware Data Protection and VMware vSphere Storage APIs – Data Protection (formerly known as VMware vStorage APIs for Data Protection or VADP). This new backup and restore mechanism allows customers to use a simple user interface to remove reliance on 3rd party backup solutions to protect their vCenter Servers and Platform Services Controllers.

Note !!! All these new features are only available in the vCenter Server Appliance.

vSphere 6.5 Installation – Part 4 – vCenter Server Appliance Upgrade

vSphere 6.5 Installation – Part 4 – vCenter Server Appliance Upgrade

In the previous parts I described the process of instalation new components of vSphere 6.5. In this article I’ll show you how the upgrade process looks like. It’s pretty straightforwar providing your DNS is working correctly 😉

During the upgrade process new appliance is deployed with temporary IP address to exchange the original appliance in the final step. This approach gives you the easy way to rollback, because you can turn off the new appliance and power on the original one at any stage.

1. The first step is to download the vCSA ISO image and mount it for instance to your desktop. Inside the ISO image go to D:\vcsa-ui-installer\win32 and run the installer.exe. (This is the same ISO image used for PSC deployment). This time we choose the Upgrade option.

1migracja

2. As other types of installation In vSphere 6.5 the process of upgrade is divided into two phases, or more correctly stages. The first stage contains the deployment of the new appliance where it is deployed in our infrastructure. The second stage will let you configure the PSC and creating SSO domain, etc. It’s nothing to do on this step, simply click Next.

2migracja3. Accept the End User License Agreement and click Next.

3migracja

4. Now you have to specify the information about source appliance (the original one which you are going to upgrade) and also the FQDN and credentials of the system where this appliance resides on. It could be either ESXi host or another vCenter server (e.g. Management’s cluster vCenter). Make sure you typed it correctly and click Next.

4migracja

5. Verify and confirm the Certificate warning.

5migracja

6. Specify the destination host/vCenter where the new appliance will be deployed. Click Next.

6migracja

7. In case you chose the vCenter to connect, you can indicate a specific folder for the appliance. Click Next.

7migracja

8. Additionally you can choose the specific host. 

8migracja

9. Provide the virtual machine name for new appliance and root password.

9migracja

10. Choose the right size of your deployment. VMware was so nice and inclueded information on the screen to let you choose the right size for your environment. In my case it’s “just” the lab so Thiny version will be more than enough. This is the time when you can easily expand the appliance limit if you need so. Click Next to go further.

10migracja

11. Choose the datastore you want to use. There is also an option to configure the appliance this in thin provisioning mode. If you prefer so, simply mark the checkbox “Enable Thin Disk Mode” and click Next.

11migracja

12. This steps requires the network configuration. You are supposed to provide port group from the available list of port groups configured on ESXi host/vCenter you choosed before. Furthermore you need to provide a temporary IP address which will be used untill the configuration from oryginal appliance is transfered.12migracja

13. Last step in stage one – confirmation. If all settings are correct click Finish to start the deployment process.

13migracja

14. When the deployment stage is done you go pass to stage 2 – the real migration of your vCenter Server Appliance data and configuration. To do that, click Continue.
15migracja

15. Again you will see the welcome screean which informs you that this is the beginning of stage 2. Click Next to start.

16migracja

16. Here you will see the summary of information you provided in previous stage. 17migracja

Caution!! From this panel you can not change these settings at this step. If you made a mistake before and you an error that source host is not reachable on specific address you can close this installer and access it at https://IP_of_temporary-VCSA:5480 and there you can change these settings and continue the installation.

bug

17. Here you can choose which ought to be migrated. In my case I want to perform complete upgrade, preserving all data, tah’s why I’m choosing the last option – COnfiguration, events, tasks and performance metrics. You have to notice that this option will need to migrate the most amount of data.
23migracja

18. Untick the participation in VMware CEIP program and click Next.

24migracja

19. Review the summary and click Finish.

25migracja

 

After few minutes (depending on the amount of data that have to be replicated) your new vCenter Appliance will be up and ready.

 

Please, see also the other parts of the series:

vSphere 6.5 Installation – Part 2 – vCenter Server Appliance

vSphere 6.5 Installation – Part 2 – vCenter Server Appliance

In the previous Part I of the series, I described the installation process of external PSC in vSphere 6.5.  In this part I’ll go through the process of vCenter Server appliance deployment.

  1. The first step is to download the vCSA ISO image and mount it for instance to your desktop. Inside the ISO image go to D:\vcsa-ui-installer\win32 and run the installer.exe. (This is the same ISO image used for PSC deployment). Then we choose the Install option, as you can see there are also available such option as Upgrade, Migrate and Rocever. All of them will be described further in next part of the series.

1vcsa

  1. In vSphere 6.5 the process of deployment is divided into two phases, or more correctly stages. The first stage contains the deployment of the appliance where it is deployed in our infrastructure. The second stage will let you configure the PSC and creating SSO domain, etc. It’s nothing to do on this step, simply click Next.

 

2vcsa

  1. Accept the End User License Agreement and click Next.

3vcsa

4. Choose the deployment type page allows you to choose which component should be deployed. In my case the external PSC was deployed in previous step and now I’m choosing vCenter Server. It’s important to notice that external PSC must be deployed before you start the deployment of vCenter Server Appliance.

4vcsa

5. In this step you have to provide the information about the host or vCenter where the appliance will be deployed. I’d like to emphasiss the option with vCenter which is new and in my opinion very helpful. It’s also the recommended option, of course if you already have a vCenter in place. That’s because if you connect directly to an ESXi host and it is in a DRS cluster, DRS initiated vMotions may occur during deployment process. To prevent this, you can either connect to vCenter managing the ESXi host or ensure the cluster where this ESXi host resides is not set to Fully Automated DRS for the duration of the deployment. You also need to provide the credentials to vCenter or ESXi host for an user that have the privileges do deploy and configure virtual appliances.

5vcsa

6. Verify and confirm the Certificate warning.

6vcsa

7. In case you have choosen the vCenter to connect tom, you can indicate a specific folder for the appliance. Click Next.

7vcsa

8. Choose the correct ESXi host to deploy it and click Next.

8vcsa

9. Specify the Virtual Machine name, root password and click Next.

9vcsa

10. Choose the right size of your deployment. VMware was so nice and inclueded information on the screen to let you choose the right size for your environment. In my case it’s “just” the lab so Thiny version will be more than enough. Click Next to go further.

10vcsa

11. Choose the datastore you want to use. There is also an option to configure the appliance this in thin provisioning mode. If you prefer so, simply mark the checkbox “Enable Thin Disk Mode” and click Next.

11vcsa12. This steps requires the network configuration. You are supposed to provide port group from the available list of port groups configured on ESXi host/vCenter you choosed before. There is also a place for system name which is optional (in case you don’t provide it, IP address will be used instead)

12vcsa13. Last step in stage one – confirmation. If all settings are correct click Finish to start the deployment process.

13vcsa

14. After all you can observe the progress via installator and host/vCenter.

15vcsa 14vcsa

15. When the deployment stage is done you go pass to stage 2 – basic configuration of our vCenter Server Appliance. To do that, click Continue.

16vcsa

16. Again you will see the welcome screean which informs you that this is the beginning of stage 2. Click Next to start.

17vcsa

17. Provide the IP address of NTP Server, mark the enable SSH checkbox and click Next.

18vcsa

18. This is the step when you have to connect with your PSC. Provide the PSC FQDN name, SSO domain name, password for Administrator, and click Next.

19vcsa

19. Review all the configured options and values and click Finish.

20vcsa

20. You will need to confirm the warning that you are completely sure about your choice. The process could not be interrupted after that.

21vcsa

21. Again as in the stage 1 you can monitor the progress untill it’s finished.

22vcsa

22. After the deployment is done, you can access the using the IP or FQDN name with port 443.

23vcsa

It’s done you vCenter Server Appliance is up and ready to start work with.

In the next part I’ll describe the straightforward process of Windows vCenter Server installation.

 

Please, check the other parts of the series: