[one-users] Old Vms directory not deleted - DB compromised

Carlos Martín Sánchez cmartin at opennebula.org
Tue Oct 2 04:42:59 PDT 2012


Hi,

On Mon, Oct 1, 2012 at 2:42 PM, Duverne, Cyrille <
cyrille.duverne at euranova.eu> wrote:
>
> I've noticed that when I delete a VM, the directory
> /var/lib/one/one-data/$VMID is left behind and never deleted.
> Is this normal ?
> I've seen this behaviour in 3.2, but it's still happening in 3.8
>

The VM dirs are left behind, that's normal. You can clean-up them using
hooks [1], take a look at this ticket [2].

VM_HOOK = [
   name      = "vmdir_cleanup",
   on        = "DONE",
   command   = "/bin/rm",
   arguments = "-r /var/lib/one/$VMID" ]

VM_HOOK = [
   name      = "log_cleanup",
   on        = "DONE",
   command   = "/bin/rm",
   arguments = "/var/log/one/$VMID.log" ]

In previous versions the dirs would be recreated, but it should work in 3.6.

By the way, where did you get opennebula 3.8? Can I take a look at it? That
will speed development! :-)


And on another side, I have an image that can't be deleted, Sunstone says
> that it's used by 4 VMs, but none is running, and the image can't be
> deleted from the DB I think.


The Image can still be reserved for VMs in states other than running, like
stopped or suspended.
Is this your case?


Regards

[1] http://opennebula.org/documentation:rel3.6:hooks
[2] http://dev.opennebula.org/issues/1026
--
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, Oct 1, 2012 at 2:42 PM, Duverne, Cyrille <
cyrille.duverne at euranova.eu> wrote:

> Hello dear community,
>
> I've noticed that when I delete a VM, the directory
> /var/lib/one/one-data/$VMID is left behind and never deleted.
> Is this normal ?
> I've seen this behaviour in 3.2, but it's still happening in 3.8
>
> And on another side, I have an image that can't be deleted, Sunstone says
> that it's used by 4 VMs, but none is running, and the image can't be
> deleted from the DB I think.
>
> Any idea ?
>
> Thanks in advance.
>
> PS : ONE 3.6 rocksss !!! :p
>
> Cyrille
>
> Blog : http://blog.cduverne.com
> Twitter : @CydsWorld
>
> "Imagination is more important than Knowledge"
> Albert Einstein
>
>
>
> Lundi 01/10/2012 à 12:57 Carlos Martín Sánchez a écrit:
>
> Hi,
>
> The files should have been deleted. Do you have any error messages in
> /var/log/one/oned.log?
>
> You can also check each image file path using 'oneimage show', it's the
> SOURCE attribute.
>
> 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, Oct 1, 2012 at 8:58 AM, Christoph Robbert <
> chrobbert at googlemail.com> wrote:
>
>> Hello,
>>
>> my hard drive is running out of space. So i deleted some unused images in
>> Opennebula via the sunstone gui.
>> But i didn't get any additional free hard drive space. But the datastore
>> contains only files with hash names.
>> Why happen this? Is this a bug or a feature?
>>
>> Regards,
>>
>> Christoph Robbert
>> ______________________________**_________________
>> Users mailing list
>> Users at lists.opennebula.org
>> http://lists.opennebula.org/**listinfo.cgi/users-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/20121002/6f211e74/attachment-0002.htm>


More information about the Users mailing list