Skip to content
This repository was archived by the owner on Mar 1, 2026. It is now read-only.

Data Capsule Guest VM image creation

Suraj Gupta Gudla edited this page Mar 25, 2022 · 8 revisions

Pre-requisites:

Any Operating System that is capable of running packer and Qemu.

Below is a brief demo on how to create a DC Guest VM image on a Linux based OS.

Steps

1. Install Packer (https://www.packer.io/downloads) by running the below commands,

$ sudo apt install curl
$ curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add -
$ sudo apt-add-repository "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main"
$ sudo apt-get update && sudo apt-get install packer
  • One can verify the installation of packer by running
$ packer --version

2. Install Qemu [qemu-system-x86_64 ] by running the below commands,

$ sudo apt-get update -y 
$ sudo apt-get install -y qemu-system-x86-64

3. Building the DC VM image,

  1. Clone the GitHub repo (https://github.com/TempleDSS/data-capsule-appliance.git)
  2. Navigate to the directory "Data Capsule Guest" of the cloned repo.
  3. Create GitHub SSH keys (ed25519, RSA) and then replace the contents of the ‘uploads/root_authorized_keys” file with the created public keys (one key per line).

4. Validate the JSON file

$ packer validate ubuntu_vanilla.json 

5. Fix the syntactical errors in the JSON file if any

$ packer fix ubuntu_vanilla.json

5. Finally Build the image

$ packer build ubuntu_vanilla.json

6. Once an image is built into the output folder, copy it to the target using scp command.

Troubleshooting:

Ubuntu iso version issues:

Update the Ubuntu 16.04 iso image details ubuntu_vanilla.json with the latest information. Check for the below fields and update accordingly,

Time to build the image.

Please know that the build process is going to take a lot of time depending on system configuration (from a minimum of 1 hour to a maximum of 3 hours)

Do not halt the process in the mid, wait till you get some error or response output.

Extended debugging:

In order to debug the issues of the build process, set PACKER_LOG=1 to view a detailed log of the setup process.

Clone this wiki locally