[Kimchi-devel] [PATCH] Issue #667: Unable to rename guest when it is paused

Aline Manera alinefm at linux.vnet.ibm.com
Fri Sep 4 12:38:14 UTC 2015


Hi Ramon,

With this patch the whole General tab is disabled for editing when the 
guest is paused.

As we've already has support for memory and CPU hotplug, those 2 fields 
should be changed when the guest is paused.
Have you tested this scenario?

 From a quick tests I did, I noticed the UI is sending all the data form 
to the backend even though the user hasn't changed the field.
To workaround it, I changed the backed to "if name in params and 
params[name] != vm_name" so update the guest name, otherwise keep it as is.

After doing that, I was able to change CPU but the UI kept displaying 
the old value. After rebooting the guest I was able to see the new CPU 
value in the UI.
We need to check why the reboot was needed. Was it a bug on backend or 
only need to update the UI to get the new value?
The same applied to memory! As I am using a libvirt version without 
memory hotplug support I was not able to test it. But it worth a test  too.

Based on all that, I will wait on your tests result to decide on this patch.

Regards,
Aline Manera

On 01/09/2015 16:50, Ramon Medeiros wrote:
> Block guest edition when paused.
>
> Signed-off-by: Ramon Medeiros <ramonn at linux.vnet.ibm.com>
> ---
>   ui/js/src/kimchi.guest_edit_main.js | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/ui/js/src/kimchi.guest_edit_main.js b/ui/js/src/kimchi.guest_edit_main.js
> index fc1b4c1..fdc46cb 100644
> --- a/ui/js/src/kimchi.guest_edit_main.js
> +++ b/ui/js/src/kimchi.guest_edit_main.js
> @@ -662,7 +662,7 @@ kimchi.guest_edit_main = function() {
>                   event.preventDefault();
>                   kimchi.window.open("guest-storage-add.html");
>               });
> -        if(kimchi.thisVMState === "running") {
> +        if ((kimchi.thisVMState === "running") || (kimchi.thisVMState === "paused")) {
>               $("#form-guest-edit-general input").prop("disabled", true);
>           } else {
>               $("#action-button-container").removeClass("hidden");




More information about the Kimchi-devel mailing list