[virt-tools-list] [virt-manager][PATCH ] Add option to control whether to leave VM running when closing console.

Leonardo Augusto Guimarães Garcia lagarcia at linux.vnet.ibm.com
Tue Jul 2 14:45:48 UTC 2013


On 07/01/2013 03:18 PM, Cole Robinson wrote:
> On 06/28/2013 01:49 PM, Leonardo Garcia wrote:
>> From: Leonardo Garcia <lagarcia at br.ibm.com>
>>
>> It is sometimes counter intuitive for a desktop user that the virtual machine
>> continues to run when they left the console viewer application. They are used
>> that when they close an application all the resources being used by it are also
>> freed up, and from their perspective, the console viewer is just one more
>> application running.
> Hmm, I don't know if I buy this. Closing a VNC client window doesn't shut down
> the remote machine, nor does exiting an SSH connection.
Yes, but in these cases the user is probably accessing a remote machine, 
so machine resource utilization is generally not a concern of the user. 
The general desktop user whose necessity I am trying to address is just 
accessing VMs on their own personal system. And, unfortunately, they 
usually get upset by the fact that even though they are not using the 
VM, it is still consuming the machine resources.
>   And doing virt-manager
> --uuid <blah> doesn't auto-start an inactive VM so users are forced to
> recognize this concept IMO.
Well, that would be my next patch. :)

Actually I was thinking to contribute a similar option to autostart the 
VM when the console is opened and the VM is not running. I was just 
thinking whether I should use the same option or another one to do that.
>
> There's also the issue that reliably shutting down a VM in a safe way is hard:
I agree, and that's why I am using the routine that is already available 
in virt-manager, which can show an error message if the shutdown 
procedure fails somehow.
> shutdown often doesn't do what's expected, and destroy is potentially
> dangerous. If we just kick off 'shutdown' on exit then the user may not notice
> for a long time that the VM never shut down.
>
> I think I'd be more comfortable with just recommending a wrapper script if
> someone really wants this functionality, it's basically:
>
> virsh start <vmname>
> virt-manager --no-fork --uuid $(virsh domuuid <vmname>)
> virsh destroy <vmname>
I thought about a wrapper script, but it would only cover the case in 
which a user doesn't open the manager window at all.

In a nutshell, I am not against your comments (I personally share lots 
of them, actually), but I am used with VM management work and the 
feedback from real desktop users is not good on that regard.

Best regards,

Leonardo Garcia
>
> - Cole
>




More information about the virt-tools-list mailing list