Running OSv on Google Compute Engine

Joe Duarte edited this page May 17, 2018 · 4 revisions
Clone this wiki locally
Step 1: Create a GCE project

Create GCE project on Google's web console:

https://cloud.google.com/console

Step 2: Download and Install SDK

https://cloud.google.com/sdk/

Step 3: Download or generate OSv GCE image

Download the image from our website

To generate your own:

$ cd src/osv
$ make image=default
$ scripts/gen-gce-tarball.sh
Step 4: Login to GCE
$ gcloud auth login
Step 5: Set the project id for the following cmd
$ gcloud config set project $project_id
Step 6: Upload disk tarball to Google Cloud Storage
$gsutil mb gs://$buckets_name
$gsutil cp build/release/osv.tar.gz gs://$buckets_name/osv.tar.gz

where $buckets_name is your own unique bucket name

Step 7: Create an image which can be used to start instance
$ gcutil addimage osv gs://$buckets_name/osv.tar.gz
Step 8: Start a new instance
$ gcutil addinstance --image=osv  --machine_type=f1-micro  --zone=us-central1-a  $instance_name
Step 9: Get serial output or ssh into your OSv instance
$ gcutil getserialportoutput $instance_name 

or

$ gcutil ssh $instance_name