How To Install xva-img on Kali Linux

In this tutorial we learn how to install xva-img on Kali Linux. xva-img is Citrix XenServer .xva disk extraction tool

Introduction

In this tutorial we learn how to install xva-img on Kali Linux.

What is xva-img

xva-img is:

xva-image is a tool to generate disk images from Citrix XenServer .xva VM images as well as to generate .xva VM images from raw disks and the according ova.xml files.

It’s for example needed if you want to forensically analyse a virtual machine in .xva format on a non-Citrix operating system.

Citrix Xen uses a custom virtual appliance format for import/export called “XVA”. it’s basically a strangely crafted tar-file. You don’t need this program to unpack this tar-file, just use your favourite tar unpacker (tar, gtar, bsdtar). Once unpacked you will end up with a lot of different files, ova.xml (which contains the settings for the virtual appliance, think VMware vmx) and a number of folders called Ref:/, this is your disks. Each of these folders contain hundreds of files named 00000000, 00000001 with a accompanying .CHECKSUM file (SHA1). Each file is a 1MB slice of the disk, but some of the files in the sequence will probably be missing this is because XVA do not use compression; instead it will exclude slices of the disk that only contains zeros (are empty). This tool can assemble the disk for you (you will end up with a RAW disk) that can easily be mounted and modified. It can then also split the file again and generate checksum. Once ready, you will probably want to use the “package” command to rebuild the XVA file.

There are three methods to install xva-img on Kali Linux. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install xva-img Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install xva-img using apt-get by running the following command:

sudo apt-get -y install xva-img

Install xva-img Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install xva-img using apt by running the following command:

sudo apt -y install xva-img

Install xva-img Using aptitude

If you want to follow this method, you might need to install aptitude on Kali Linux first since aptitude is usually not installed by default on Kali Linux. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install xva-img using aptitude by running the following command:

sudo aptitude -y install xva-img

How To Uninstall xva-img on Kali Linux

To uninstall only the xva-img package we can use the following command:

sudo apt-get remove xva-img

Uninstall xva-img And Its Dependencies

To uninstall xva-img and its dependencies that are no longer needed by Kali Linux, we can use the command below:

sudo apt-get -y autoremove xva-img

Remove xva-img Configurations and Data

To remove xva-img configuration and data from Kali Linux we can use the following command:

sudo apt-get -y purge xva-img

Remove xva-img configuration, data, and all of its dependencies

We can use the following command to remove xva-img configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge xva-img

Dependencies

xva-img have the following dependencies:

References

Summary

In this tutorial we learn how to install xva-img package on Kali Linux using different package management tools: apt, apt-get and aptitude.