Clone Template to Library failed

Working with templates has become much easier in vSphere 7 since VMware added new features to content libraries. It is now possible to deploy VMs directly from templates in content libraries and to update templates while the orignal version stays in place.

If there are still classic templates in vCenter, you can clone them to a content library.

Transfer the old template to the content library as a new template.

Failed to export OVF package

After klicking OK, an error message “Failed to export OVF package” might be issued. Usually followed by a second message that leads to the root cause of the problem.

File ds:///vmfs/volumes/vsan:527a6824b9bfa7ad-36f48a2cd78b9685/1f40b55e-f88d-e569-9d66-002590bb2ed0/b02cb65d-e81b-49cb-a654-ef26ea21b2f7/ubuntu-20.04-live-server-amd64_5696e54c-c62a-4fa8-b007-0192a28ff53d.iso was not found

The only interesting part of the message are the last four words: “iso was not found“. Obviously the VM had an iso image mounted before it was converted to a template. Luckily that problem is easy to resolve by converting the template into a VM and removing the iso image from CD-ROM settings. Change it to “Client Device” for example. Convert the VM back to a template and retry cloning to content library. Without a mounted iso image the conversion works without an error.

VCSA update on the shell

Updates to the vCenter Server Appliance (VCSA) are usually easily done from the VAMI interface. In rare cases, however, problems may occur during the update. Recently I tried to update the VCSA in the lab from version 7.0.0 (16386335) to 7.0.0 U1 (16858589). The update was started via a locally mounted ISO image. It was detected that an update is available, but the update failed right after start. The problem referenced in the link above did not apply in this case.

In such cases it is worthwhile to try the VCSA shell. To do this, it must first be allowed in VAMI, then the session can be established via SSH client.

It is important that you’re NOT on the bash shell. You can return from bash to the VAMI shell with the command below.

appliancesh

In the first step the update packages are staged. The ISO should be mounted at this time.

software-packages stage --iso --acceptEulas

The process checks some requirements, detects source- and destination version and tests for a mounted iso.

software-packages list --staged

The command listed above will show details to the staged package.

If everything looks correct we can trigger the update.

software-packages install --staged

The update to version 7.0 U1 finished without any issues.

Update error VCSA 7 – vCenter Server not operational

During patching of a vCenter server appliance (VCSA) problems can occur. Maybe contact to the update source was lost or the whole process has been cancelled by an operator. If you try to reapply the patch, you might see an error like in the picture below.

Update Installation failed. VCenter Server is not operational.

In the VAMI interface of vCenter everything looks fine. All services are up and running and ovarall status is green. Even a reboot of the appliance doesn’t help. The source of the problem lies in an interrupted update procedure which leaves a status file behind. We need to fix (remove) that manually.

To do so open a SSH shell to the vCenter server appliance and change to the directory where the file was left.

# cd /etc/applmgmt/appliance

You’ll see a file called software_update_state.conf. Under normal circumstances this file will be removed after an update. But something went wrong and it wasn’t cleaned up. Let’s have a brief look inside the file.

# cat software_update_state.conf
{
"state": "INSTALL_FAILED",
"version": "7.0.0.10700",
"latest_query_time": "2020-09-17T11:42:37Z"
}

We can see that there’s been a failed update to VCSA 7.0.0.10700. You can just remove the file.

# rm software_update_state.conf

If you now trigger a new patch installation it will work.

Upgrade vCenter Server Appliance to vSphere 7

Recently I’ve upgraded my homelab from 6.7U3 to vSphere7. The workflow is straightforward and very easy. The VMware Design team did a very good job with the UI.

First steps

I cannot point that out enough: check the VMware HCL. Just because your system is supported under your current vSphere version, doesn’t mean it’ll be supported under vSphere7 too. On the day I’ve upgraded, vSphere7 was brand new and there were just a few entries in the HCL. But it’s a homelab and if something breaks I don’t care to rebuild it from scratch. Don’t do this in production!

Although my Supermicro E300-9D is not yet certified for version 7.0, it works like a charm. I guess it’s just a matter of time, because the VMware Nano-Edge cluster is based on that hardware.

Before we can start, you need to download the vCenter Server Appliance 7.0 (VCSA) from VMware downloads (Login required). You also need to have new license keys for vCenter, ESXi and vSAN (if yor cluster is hyperconverged).

Continue reading “Upgrade vCenter Server Appliance to vSphere 7”