[one-users] How to manage vm created by opennebula by virsh tools?

Sharuzzaman Ahmat Raslan sharuzzaman at gmail.com
Mon Nov 11 22:48:56 PST 2013


Hi Dennis,

When Opennebula shutdown a VM, it will destroy the XML file on the host,
and unregister the VM from KVM.

If you just want it to stop, so that you can do something to the image, eg.
making a backup, you can use the command

onevm suspend <vmid>

then the VM will still be available in the host, and can be queried by
virsh list command.

Read more at:

http://opennebula.org/documentation:rel4.2:vm_guide_2
http://opennebula.org/doc/4.2/cli/onevm.1.html






On Tue, Nov 12, 2013 at 12:33 PM, caohf <caohf at wedogame.com> wrote:

>
> Thanks
>
> But when i use  virsh  list --all command
>
>
> -----------------------------------------------------------------
>  [root at opennebula-node1 ~]# virsh  list --all
>  Id    Name                           State
> ----------------------------------------------------
>  43    one-111                        running
>  44    one-104                        running
>  48    one-123                        running
>  -     centos5.6.kvm                  shut off
> ----------------------------------------------------------------
>
>
> if the vm managed by one  is runnning ,it can be list by virsh list --all
> command
>
> when I destory a vm.
>
>
> -------------------------------------------------------------------------
> [root at opennebula-node1 ~]# virsh  destroy 44
> Domain 44 destroyed
> ------------------------------------------------------------------------
>
>
> It can't be display by virsh command
>
>
> --------------------------------------------------------
> [root at opennebula-node1 ~]# virsh  list --all
>  Id    Name                           State
> ----------------------------------------------------
>  43    one-111                        running
>  48    one-123                        running
>  -     centos5.6.kvm                  shut off
> -----------------------------------------------------------
>
> How to fix this
> ------------------------------
> Best Wishes!
> Dennis
>
>  *From:* Sharuzzaman Ahmat Raslan <sharuzzaman at gmail.com>
> *Date:* 2013-11-12 11:48
> *To:* caohf <caohf at wedogame.com>
> *CC:* users at lists.opennebula.org <Users at lists.opennebula.org>
> *Subject:* Re: Re: [one-users] How to manage vm created by opennebula by
> virsh tools?
>    Hi Dennis,
>
> Opennebula is still using libvirt for KVM-based nodes.
>
> You can still stop/start the VM using normal virsh command, such as virsh
> stop, virsh start, virsh attach-device etc.
>
> But doing so directly to the VM, will cause your VM to not shutting down
> properly if you onevm shutdown from Opennebula later. That's what I have
> experience before.
>
> Thanks.
>
>
>
>
> On Tue, Nov 12, 2013 at 11:34 AM, caohf <caohf at wedogame.com> wrote:
>
>>  Hi :
>>  I have another  system use virsh(libvirt) manage the kvm vms,when i use
>> opennebula ,I also want to use my old system.
>>  Opennebula provide the libvirt drivers in the old version.
>> ------------------------------
>>
>> Best Wishes!
>> Dennis
>>
>>  *From:* Sharuzzaman Ahmat Raslan <sharuzzaman at gmail.com>
>> *Date:* 2013-11-12 11:13
>> *To:* caohf <caohf at wedogame.com>
>> *CC:* users at lists.opennebula.org <Users at lists.opennebula.org>
>> *Subject:* Re: [one-users] How to manage vm created by opennebula by
>> virsh tools?
>>    Hi Dennis,
>>
>> What actually that you want to achieve?
>>
>> Thanks.
>>
>>
>>
>>
>> On Tue, Nov 12, 2013 at 9:58 AM, caohf <caohf at wedogame.com> wrote:
>>
>>>  Dear All:
>>> How to manage vm created by opennebula by virsh tool?
>>>
>>> ------------------------------
>>>  Best Wishes!
>>> Dennis
>>>
>>>
>>> _______________________________________________
>>> Users mailing list
>>> Users at lists.opennebula.org
>>> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>>>
>>>
>>
>>
>> --
>> Sharuzzaman Ahmat Raslan
>>
>
>
>
> --
> Sharuzzaman Ahmat Raslan
>



-- 
Sharuzzaman Ahmat Raslan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20131112/bff49434/attachment-0002.htm>


More information about the Users mailing list