On 10/21/2014 12:27 PM, Aline Manera wrote:
Disk hot plug is supported for virtio and SCSI bus and we use IDE bus
for CDROM devices.
So with this patch set, the user can try to add a new CDROM but it will
always fail as it is IDE bus.
We have 2 options to improve user experience in this case:
1) Do not allow CDROM hot plug, ie, remove "CDROM" option from combo box
when VM is running.
2) Modify backend to allow user specifies a new CDROM when VM is running
but it will be only available on next reboot.
I vote for option 2, with some help text indicating that it won't take
effect until after a reboot.
On 10/16/2014 09:07 AM, Wen Wang wrote:
> From: Wen Wang <wenwang(a)linux.vnet.ibm.com>
>
> Enable users add and detach disk when vm is running.
>
> Signed-off-by: Wen Wang <wenwang(a)linux.vnet.ibm.com>
> ---
> ui/js/src/kimchi.guest_edit_main.js | 29
> ++++++++++++-----------------
> 1 files changed, 12 insertions(+), 17 deletions(-)
>
> diff --git a/ui/js/src/kimchi.guest_edit_main.js
> b/ui/js/src/kimchi.guest_edit_main.js
> index 030e112..eb0254e 100644
> --- a/ui/js/src/kimchi.guest_edit_main.js
> +++ b/ui/js/src/kimchi.guest_edit_main.js
> @@ -57,17 +57,14 @@ kimchi.guest_edit_main = function() {
> text: false
> });
>
> - if(kimchi.thisVMState != "running") {
> - $('.detach', container).button({
> - icons: {
> - primary: 'ui-icon-trash'
> - },
> - text: false
> - });
> + $('.detach', container).button({
> + icons: {
> + primary: 'ui-icon-trash'
> + },
> + text: false
> + });
>
> - } else {
> - $('.detach', container).remove();
> - }
> + $('.view .detach', container).remove();
>
> $('.save', container).button({
> icons: {
> @@ -443,14 +440,8 @@ kimchi.guest_edit_main = function() {
> guest['icon'] = guest['icon'] ||
'images/icon-vm.png';
> $('#form-guest-edit-general').fillWithObject(guest);
> kimchi.thisVMState = guest['state'];
> -
> refreshCDROMs();
> - if(kimchi.thisVMState === "running") {
> - $("#form-guest-edit-general
input").prop("disabled",
> "disabled");
> - $("#guest-edit-attach-cdrom-button").remove();
> - $("#form-guest-edit-interface .header button").remove();
> - } else {
> - $('#guest-edit-attach-cdrom-button').button({
> + $('#guest-edit-attach-cdrom-button').button({
> icons: {
> primary: "ui-icon-plusthick"
> },
> @@ -459,6 +450,10 @@ kimchi.guest_edit_main = function() {
> event.preventDefault();
> kimchi.window.open("guest-storage-add.html");
> });
> + if(kimchi.thisVMState === "running") {
> + $("#form-guest-edit-general
input").prop("disabled",
> "disabled");
> + $("#form-guest-edit-interface .header button").remove();
> + } else {
>
$("#action-button-container").removeClass("hidden");
> }
>
_______________________________________________
Kimchi-devel mailing list
Kimchi-devel(a)ovirt.org
http://lists.ovirt.org/mailman/listinfo/kimchi-devel