[one-users] Old Vms directory not deleted - DB compromised
Duverne, Cyrille
cyrille.duverne at euranova.eu
Thu Oct 11 13:05:38 PDT 2012
Hello Carlos,
This worked as a charm, but I also had to update the STATE attribute
from 2 to 1, to put the image in READY state and allow me to remove it
from sunstone :)
Thanks a lot.
Cyrille Blog : http://blog.cduverne.com
Twitter : @CydsWorld
"Imagination is more important than Knowledge"
Albert Einstein
Jeudi 04/10/2012 à 15:07 Carlos Martín Sánchez a écrit:
Hi,
The VMs themselves are not deleted, just moved to the DONE state. You
can still execute a onevm show and see the information of deleted
VMs. To be consistent with this, we also leave the directories and log
files (note that the disks and checkpoint files are stored in the
system datastore).
About the Image, looks like the DB got corrupted. Did you have any
problem with your front-end machine, like a full disk, or hard reset?
Anyway, to change the RUNNING_VMS attribute manually you need to:
- stop opennebula: one stop
- get the body column of your image from the DB. Assuming you use
sqlite:
$ sqlite3 /var/lib/one/one.db "select body from image_pool where
oid=;"
Copy the text, and change the running vms xml element:
0
- update the DB
$ sqlite3 /var/lib/one/one.db 'update image_pool set body="........"
where oid=;'
Restart opennebula, and then you should be able to delete the Image
Regards
--
Carlos Martín, MSc
Project Engineer
OpenNebula - The Open-source Solution for Data Center
Virtualizationwww.OpenNebula.org [1] | cmartin at opennebula.org |
@OpenNebula [2] [3]
On Wed, Oct 3, 2012 at 9:10 AM, Duverne, Cyrille wrote:
Hello Carlos,
Thanks a lot for your feedback.
Regarding the Hooks, it works like a charm.
But you said that it was normal to not delete the old directory of
destroyed VMs, why ?
Regarding the reserved image, I haven't any VM in any state which is
using it... :)
Kind regards
CyD
Blog : http://blog.cduverne.com
Twitter : @CydsWorld
"Imagination is more important than Knowledge"
Albert Einstein
Mardi 02/10/2012 à 13:42 Carlos Martín Sánchez a écrit:
Hi,
On Mon, Oct 1, 2012 at 2:42 PM, Duverne, Cyrille 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 [1] | cmartin at opennebula.org | @OpenNebula [2] [3]
On Mon, Oct 1, 2012 at 2:42 PM, Duverne, Cyrille 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 [1] | cmartin at opennebula.org | @OpenNebula [2] [3]
On Mon, Oct 1, 2012 at 8:58 AM, Christoph Robbert 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
_______________________________________________
Users mailing list
Users at lists.opennebula.org
http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
Links:
------
[1] http://www.OpenNebula.org
[2] http://twitter.com/opennebula
[3] mailto:cmartin at opennebula.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20121011/068dbe36/attachment-0002.htm>
More information about the Users
mailing list