vhd2tar command not found

In this troubleshooting guide we learn how to fix vhd2tar command not found error message

Introduction

When you run more command in linux terminal / console, you get the following error message

vhd2tar: command not found

or when using sudo you get the following error message

sudo: vhd2tar: command not found

Solutions to vhd2tar: command not found

How To Fix vhd2tar: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu vhd2tar is provided by opengcs package.

opengcs is:

Open Guest Compute Service is a Linux-based open source project to further the development of a production quality implementation of Linux Hyper-V container on Microsoft Windows (LCOW). It’s designed to run inside a custom Linux OS for supporting Linux container payload.

To fix this problem, we can install more using the command below.

sudo apt-get -y install opengcs

This command might take some time to finish depending on your machine internet connection.

You can also use apt command to install opengcs.

sudo apt -y install opengcs

Or if you have aptitude installed you can use the following command.

sudo aptitude install opengcs

Summary

In this tutorial we learn how to fix vhd2tar command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.