Categories

How to add your own vm image to your G8

You are here:
  • Main
  • How To
  • How to add your own vm image to your G8
< All Topics

Preface

Image management is normally done through meneja.gig.tech. This is the proper way to do it, because meneja will test if your image works properly before making it available to the G8's, plus it also handles the distribution to the G8's that are subscribed to it.

Sometimes you just want to test a vm image, which is why you can just make it available on one of your G8's

Procedure

Uploading an image to a G8 is possible via the CloudApi.

Go into the portal of your G8 and click the "Machine API" on the top of the screen:

file

In the cloudapi_images section you will find the "Create a image from a url":

file

You can use this API browser to actually invoke the API. Press the [Try it out!] button and provide values for the following fields:

  • Required fields:

    • name: The name for the vm image
    • url: The URL from which the G8 can download the qcow2 disk image
    • gid: The global ID of your G8. You can get this value by listing the locations api in the cloudapi_locations section of the API browser
    • boottype: The boot type of the vm image. Possible values are:
      • bios
      • uefi
    • memory: The minimum amount of memory for vms created by this image in MiB.
    • bootDiskSize: The minimum size of the boot disk for vms created by this image in GiB.
    • addMemory: Flag that indicates whether vms created of this vm image support adding memory while the vm is running.
    • addVCPU: Flag that indicates whether vms created of this vm image support adding virtual cores while the vm is running.
    • removeVCPU: Flag that indicates whether vms created of this vm image support removing virtual cores while the vm is running.
    • addNIC: Flag that indicates whether vms created of this vm image support adding network interfaces while the vm is running.
    • removeNIC: Flag that indicates whether vms created of this vm image support removing network interfaces while the vm is running.
    • imagetype: Operating system type of the vm image. Possible values are:
      • Linux
      • Windows
      • Unix
      • BSD
      • Darwin
      • Other
  • Optional fields

    • username: By default the G8 creates a user account in the vm with username user via cloudinit. If the image only works with a very specific username then specify it here.
    • password: By default the G8 generates a random password for each new vm via cloudinit. If the image only works with a hardcoded password, you can specify it here.
    • accountID: By default images are usable by all accounts on the G8. You can limit the availability of the image to a single account here by putting the account ID. You can get the account ID by listing the accounts via the accounts api in the cloudapi_accounts section of the API browser.
    • sharedAccounts: Comma-seperated account ID's to share the image with if accountId is set
    • tags: A free string field to store metadata along with the image registration in the G8.

When all the fields are filled in, execute the API call by pressing the [Execute] button located below the fields. If there are no errors, the G8 will start downloading the vm image from the url you passed.

This api call is meant to be executed assynchronously. This is not possible via the API browser, so if it takes more than 300 seconds to download the api, you will see a gateway error. Now, this does not mean that the image failed to create. Be patient and wait until it becomes available as one of the images when creating a vm in the portal.

Table of Contents