Can you define your own Instance types?

Hi, a weird question I guess.

Is it possible to define some instance types of my own?
Maybe by editing some file?

I could only find this:

Instance types

LXD supports simple instance types. Those are represented as a string which can be passed at container creation time.

There are three allowed syntaxes:

  • <instance type>
  • <cloud>:<instance type>
  • c<CPU>-m<RAM in GB>

For example, those 3 are equivalent:

  • t2.micro
  • aws:t2.micro
  • c1-m1

On the command line, this is passed like this:

lxc launch ubuntu:16.04 my-container -t t2.micro

The list of supported clouds and instance types can be found here:

Thank you!

Also found this excelent article, but not a way to define your own.

Yeah, we don’t have an easy way to define your own.

The closest you can get is to just define some profiles that are only used for this purpose.
You’d then create your containers with: lxc launch IMAGE NAME -p default -p medium

Where medium is a profile that’s got a bunch of limits, including things that instance types can’t currently do like network and disk limits.

1 Like

I get it, define general settings on the default profile and specify sizes on a new set of profiles and then apply both profiles… does the same and gives you a lot of extra granularity.

Thank you!