After yesterday’s little trick, now I have my dashboard up and running.

The portal looks like the Eucalyptus admin page without the image store and where to configure the instance type. That is our mission today. Find out where to configure the instance type.

By default, the few instance type looks like the following:

m1.medium – 4096M, 2CPU, 40G Space
m1.large – 8192M, 4CPU, 80G Space
m1.tiny – 512M, 1CPU, 0G Space
m1.xlarge – 16384M, 8CPU, 160G Space
m1.small – 2048M, 1CPU, 20G Space

Which for my testing purpose, I would like to customise it. In Eucalyptus, it used to let user change it directly on the web page. But in OpenStack, I think we will need to use the command line to create/delete the instance types.

First, let’s take a look at what you have already from the command line:

sudo nova-manage instance_type list

which, not surprisingly, you should have the output looks similar to the table above. But, a little surprise that you won’t see in the webpage is the FlavorID, which might gives you a little trouble later.

m1.medium: Memory: 4096MB, VCPUS: 2, Storage: 40GB, FlavorID: 3, Swap: 0GB, RXTX Quota: 0GB, RXTX Cap: 0MB
m1.small: Memory: 2048MB, VCPUS: 1, Storage: 20GB, FlavorID: 2, Swap: 0GB, RXTX Quota: 0GB, RXTX Cap: 0MB
m1.large: Memory: 8192MB, VCPUS: 4, Storage: 80GB, FlavorID: 4, Swap: 0GB, RXTX Quota: 0GB, RXTX Cap: 0MB
k1.small: Memory: 1024MB, VCPUS: 1, Storage: 8GB, FlavorID: 8, Swap: 2GB, RXTX Quota: 0GB, RXTX Cap: 0MB
m1.xlarge: Memory: 16384MB, VCPUS: 8, Storage: 160GB, FlavorID: 5, Swap: 0GB, RXTX Quota: 0GB, RXTX Cap: 0MB

Second, let’s take a look at the help with the nova-manage instance_type create command which we use it to create the instance type:

instance_type create: Creates instance types / flavors
arguments: name memory vcpus local_gb flavorid [swap] [rxtx_quota] [rxtx_cap]

So, to create a “s1.small” (this name could be anything) instance type with 1024M memory, 1 CPU, 5000M storage with flavorID 7, you need:

sudo nova-manage instance_type create s1.small 1024 1 5000 7

with the return of

s1.small created

Then, we want to delete this instance type. Similar command is called but change from create to delete to remove the entry:

sudo nova-manage instance_type delete s1.small

Now, the final twist, if you want to create another entry using the same command which should work, right? Instead, you will get an Unknown error. Doesn’t really tell you much here, does it?

Later I found out the issue is the FlavorID that I mention earlier. Even you delete the entry, the FlavorID cannot be reuse. If you try to use the flavor list command, you still won’t see the deleted entry.

sudo nova-manage flavor list

So, if you are getting the Unknown error, look into the /var/log/nova/nova-manage.log file for clues, but this might be the reason why!