Setting up Haiku on Google Compute Engine

Pre-created Haiku r1/beta4 images are available on Google Cloud Platform’s Compute Engine. To deploy a Haiku VM to Google Compute Engine, all you need is the gcloud CLI tool.

Preparing gcloud cli

Follow the directions to install gcloud

Deploying Haiku

To deploy a Haiku VM, you simply need to leverage the official Haiku, Inc. image via the gcloud sdk

There is a cost to deploying VM’s to Google Cloud. Make sure you understand the costs before deploying systems.

cloud compute instances create haiku-test \
  --zone=us-central1-a \
  --machine-type=e2-micro \
  --network "default" \
  --maintenance-policy "MIGRATE" \
  --image-family "haiku-r1beta4-x64" \
  --image-project=haiku-inc \
  --boot-disk-size "10" --boot-disk-type "pd-balanced" \
  --metadata=ssh-keys="user:ssh-ed25519 AAAACRANDOMSTRING"

The above:

  • Creates a new VM called “haiku-test”
  • Places it into the us-central1-a zone
  • Using the default network VPC
  • Will migrate the VM when needed
  • Using the latest haiku-r1beta4-x64 image from the haiku-inc project
  • The boot disk will be the minimum 10GiB (you can create an additional partition to use the extra 6 GiB)
  • The boot disk will be a balanced disk (pd-ssd is also available for an additional cost)
  • Inject the SSH key for the “user” account. Your SSH public key should go here.
    • See your local ~/.ssh/ for your public key
created [].

haiku-test  us-central1-a  e2-micro           RUNNING

Accessing Haiku

Password authentication has been disabled within the Google Compute Engine image for security reasons. However, you can add as many SSH public keys as you like for the “user” user. sshd will dynamically receive the new keys from the Google metadata servers.

Now, using the SSH keys specified in the metadata:

$ ssh user@

Warning: Permanently added '' (ED25519) to the list of known hosts.

Welcome to the Haiku shell.