[one-users] Problem shutting down a VM

Shankhadeep Shome shank15217 at gmail.com
Wed Dec 12 14:57:47 PST 2012


First make sure your VM shuts down in a regular kvm instance. Use virsh
shutdown or use virt-manager to shutdown the vm and see if the vm actually
picks up the signal. Get it working there and your template will surely
work on open nebula.


On Wed, Dec 12, 2012 at 9:59 AM, Carlos Martín Sánchez <
cmartin at opennebula.org> wrote:

> Hi,
>
> If the VM does not disappear after a shutdown, OpenNebula assumes that the
> guest ignored the acpi signal and changes its state to running. You may
> want to check that the acpi daemon is running.
> Alternatively you can execute a cancel operation, it is the equivalent of
> a shutdown but destroying the VM.
>
> When a VM is shut down, its life cycle ends and can't be redeployed, you
> need to instantiate another one from the original Template. To prevent this
> from happening, you can suspend, poweroff or stop your VMs. Suspended and
> powered-off machines are kept in the same Host, and will take some of the
> Host capacity.
>
> Regards
> --
> Carlos Martín, MSc
> Project Engineer
> OpenNebula - The Open-source Solution for Data Center Virtualization
> www.OpenNebula.org | cmartin at opennebula.org | @OpenNebula<http://twitter.com/opennebula><cmartin at opennebula.org>
>
>
>
> On Mon, Dec 10, 2012 at 11:13 AM, Carlos Jiménez <
> cjimenez at eneotecnologia.com> wrote:
>
>>  Hi,
>>
>> I have a computer running OpenNebula 3.8 and two hosts running CentOS 6.3
>> and KVM. I have one VM running in one of the hosts.
>> From OpenNebula/Sunstone, I select that VM and then:
>>
>>    - When I press "PowerOff", after a while, the state changes to
>>    "RUNNING" but the VM never shutdowns.
>>    - When I press "Shutdown" the state of the VM changes to "SHUTDOWN"
>>    but the VM continues working (perhaps KVM doesn't support correctly ACPI
>>    signaling). I've connected via ssh to the VM and the executed "poweroff".
>>    The VM successfully switched off but then the VM entry disappeared from
>>    Sunstone. I've checked the existence of the VM in the host using virsh and
>>    it lists nothing.
>>
>> Eventually, we had to instantiate again the template to recreate the VM.
>> The image was a persistent one.
>>
>>
>> This is the log of that VM after pressing Shutdown:
>>
>> Mon Dec 10 10:22:11 2012 [LCM][I]: New VM state is SHUTDOWN
>> Mon Dec 10 10:23:30 2012 [VMM][I]: ExitCode: 0
>> Mon Dec 10 10:23:30 2012 [VMM][I]: Successfully execute virtualization
>> driver operation: shutdown.
>> Mon Dec 10 10:23:30 2012 [VMM][I]: clean: Executed "sudo
>> /usr/bin/ovs-ofctl del-flows vbr1 ,in_port=19,dl_src=02:00:c0:a8:0f:7e".
>> Mon Dec 10 10:23:30 2012 [VMM][I]: clean: Executed "sudo
>> /usr/bin/ovs-ofctl del-flows vbr1 in_port=19".
>> Mon Dec 10 10:23:30 2012 [VMM][I]: ExitCode: 0
>> Mon Dec 10 10:23:30 2012 [VMM][I]: Successfully execute network driver
>> operation: clean.
>> Mon Dec 10 10:23:30 2012 [LCM][I]: New VM state is EPILOG
>> Mon Dec 10 10:23:30 2012 [TM][I]: mvds: Moving
>> /var/lib/one/datastores/0/32/disk.0 to datastore as
>> /var/lib/one/datastores/1/c1576eab6777fc91d8be145c1067911d
>> Mon Dec 10 10:23:30 2012 [TM][I]: ExitCode: 0
>> Mon Dec 10 10:23:31 2012 [TM][I]: delete: Deleting
>> /var/lib/one/datastores/0/32
>> Mon Dec 10 10:23:31 2012 [TM][I]: ExitCode: 0
>> Mon Dec 10 10:23:31 2012 [DiM][I]: New VM state is DONE
>>
>>
>> As stated in the logs, a "delete" command is executed, so the VM instance
>> has been erased. This would be an undesirable behaviour for us. What would
>> be the recommended procedure to shutdown a VM without deleting that
>> instance in a KVM environment?
>>
>>
>> Thanks in advance,
>>
>> Carlos.
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.opennebula.org
>> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>>
>>
>
> _______________________________________________
> Users mailing list
> Users at lists.opennebula.org
> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20121212/cdb04ef3/attachment-0002.htm>


More information about the Users mailing list