Instantiate_cpu_factor not working in 5.6

(Hoang Hien Nguyen) #1

Please, describe the problem here and provide additional information below (if applicable) …

Try to set instantiate_cpu_factor: 1 however when user create VMs, vCPU/CPU not 1.

Versions of the related components and OS (frontend, hypervisors, VMs):
KVM, 5.6

Steps to reproduce:
set instantiate_cpu_factor: 1 in sunstone views

Current results:

Expected results:
vCPU/CPU = 1

(Kristian Feldsam) #2

Hello, missing “Current results”, did you set it in right views? there are views hierarchy in 5.6, by default in sunstone-server.conf is mode: mixed, so if you made changes in kvm views, them you need change mode to kvm

(Hoang Hien Nguyen) #3

Yes, i did make change in correct view, which is mixed. For peace mind, i did make change all views, same result.

(Kristian Feldsam) #4

Ok, and what exactly except from this feature and what is actual result?

(Hoang Hien Nguyen) #5

I set Instantiate_cpu_factor = 1, then when user select number of vcpu, the number cpu should be the same. However actual result is number of cpu always 1 (default number).

(Kristian Feldsam) #6

I see, ok it looks like bug… I have already setuped this, but to 0.5 and it is working on 5.6 version… but I have hidden CPU field in user templates, try to hide cpu field in your config

(Hoang Hien Nguyen) #7

here is my config in cloud view

     # True to hide the CPU setting in the VM creation dialog
        instantiate_hide_cpu: true

    # False to not scale the CPU. Number to scale from VCPU
    instantiate_cpu_factor: 1

Same result.

(Kristian Feldsam) #8

hmm, and in which template you edit it? in user or in cloud?

(Hoang Hien Nguyen) #9

All in cloud.

(Kristian Feldsam) #10

hmm, me too and it is working with factor 0.5. Try to test other factor that 1. Did you restart sunstone after changes?

(Hoang Hien Nguyen) #11

I try 0.5 and restart both sunstone and opennebula. CPU always 1 whatever number of vCPU.
I guess maybe the template default value override this option.
I can not set CPU option when create VMs as cloud user.


(David Brierley) #12

I had the same issue initially

the fix for me was to hide the CPU value for cloud view in the mixed cloud yaml and in the template leave the CPU value as blank then it scales it correctly otherwise it is overriden by the CPU value in the template