cloudstack
cloudstack copied to clipboard
Compute offering "Custom constrained" not working
ISSUE TYPE
- Bug Report
COMPONENT NAME
Core
CLOUDSTACK VERSION
4.17.0.1 installed on CentOS 7
CONFIGURATION
KVM Hypervisor with compute offering type custom unconstrained
OS / ENVIRONMENT
CentOS 7
SUMMARY
When applying a custom constrained compute offering on a virtual machine on a KVM host it fails to start with error: "internal error: process exited while connecting to monitor: qemu: invalid ram size". Parameter "memory" in the compute offering is indicated in MB. There are no issues when applying on the VM a fixed compute offering.
STEPS TO REPRODUCE
Create a VM with a custom constrained compute offering on a KVM host
EXPECTED RESULTS
The VM is created and starts as it happens on previous cloudstack versions.
ACTUAL RESULTS
VM creation fails with error "internal error: process exited while connecting to monitor: qemu: invalid ram size"
Thanks for opening your first issue here! Be sure to follow the issue template!
@cdfgallo I'm not able to reproduce in my lab. Can you please share logs of the complete deploy VM action? What value of RAM was VM provided?
here attached you can find the log of the vm deploy. debug.log I trried as RAM value 1024 or 2048 with same result.
@cdfgallo can you try with a template or compute offering which dynamically scalable parameter set to false. I was able to reproduce this with dynamically scalable enabled for VM with a centos7 host having following config:
# virsh version
Compiled against library: libvirt 4.5.0
Using library: libvirt 4.5.0
Using API: QEMU 4.5.0
Running hypervisor: QEMU 1.5.3
However same thing worked fine with a Ubuntu host with the following config,
# virsh version
Compiled against library: libvirt 8.0.0
Using library: libvirt 8.0.0
Using API: QEMU 8.0.0
Running hypervisor: QEMU 6.2.0
@DaanHoogland @GutoVeronezi cc @rohityadavcloud @weizhouapache @nvazquez @harikrishna-patnala VM deployment with following qemu-libvirt config on CentOS7, for a dynamically scalable VM with custom offerings,
# virsh version
Compiled against library: libvirt 4.5.0
Using library: libvirt 4.5.0
Using API: QEMU 4.5.0
Running hypervisor: QEMU 1.5.3
Should this be documented or do we need to add a check in KVM hypervisor code for qemu version? Didn't find any existing documentation for it.
it is very operator friendly if we do an software check for version on each feature but this will not be very maintainable. I vote documentation.
I've created doc PR to address this, https://github.com/apache/cloudstack-documentation/pull/283
@cdfgallo can you please try deploying VM with template and offering that do not have dynamic scaling enabled
@cdfgallo can you please try deploying VM with template and offering that do not have dynamic scaling enabled
@shwstppr sorry but if I apply a fixed compute offering how can it scale dinamically?
@cdfgallo can you please try deploying VM with template and offering that do not have dynamic scaling enabled
@shwstppr sorry but if I apply a fixed compute offering how can it scale dinamically?
@cdfgallo , I think the message is that you can not if
Compiled against library: libvirt 4.5.0
Using library: libvirt 4.5.0
Using API: QEMU 4.5.0
Running hypervisor: QEMU 1.5.3
but if for instance
# virsh version
Compiled against library: libvirt 8.0.0
Using library: libvirt 8.0.0
Using API: QEMU 8.0.0
Running hypervisor: QEMU 6.2.0
you can. You´ll have to check your combination.
@cdfgallo can you please try deploying VM with template and offering that do not have dynamic scaling enabled
@shwstppr sorry but if I apply a fixed compute offering how can it scale dinamically?
@cdfgallo please refer http://docs.cloudstack.apache.org/en/latest/adminguide/virtual_machines.html#cpu-and-memory-scaling-for-running-vms
When you create a compute offering there is an option to enable/disable dynamic scaling. Similar option is there when you register a template.
The QEMU error is not seen when you use a fixed offering because for that minRam
, maxRam
attributes are the same while creating VM definition. To deploy VM with a custom offering when using qemu/kvm version that isn't supporting dynamic scaling you'll have to create a new custom offering which has dynamic scaling option disabled.
@shwstppr if I apply a compute offring without dynamic scaling enabled the dynamic scale option is grayed out in the UI
@shwstppr if I apply a compute offring without dynamic scaling enabled the dynamic scale option is grayed out in the UI
@cdfgallo I didn't understand your comment. Currently, dynamic scaling option cannot be used with a custom compute offering and the following qemu/kvm config,
Compiled against library: libvirt 4.5.0
Using library: libvirt 4.5.0
Using API: QEMU 4.5.0
Running hypervisor: QEMU 1.5.3
Dynamic scaling and offering type are two different things here. When your offering has dynamic scaling enabled and the corresponding template is also dynamic scaling enabled, the user can deploy a dynamic scaling enabled VM. A VM which can be scaled using a new offering in Running state. The custom offering allows users to deploy VMs with desired CPU, and memory. This is in contrast to fixed offerings where the admin has already set CPU and memory. Both fixed and custom offerings can be dynamic scaling enabled or not. Please refer to the documentation for more clarity.
Closing this as we added in the documentation for dynamic scaling behaviour on KVM, https://github.com/apache/cloudstack-documentation/pull/283