Feature #5224

update disk size in the VM database(the internal template?)

Added by Anton Todorov over 3 years ago. Updated over 3 years ago.

Status:ClosedStart date:07/11/2017
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Core & System
Target version:-
Resolution:worksforme Pull request:

Description

A command to update only the internal VM template.

onevm set-disk $VM_ID $DISK_ID $SIZE

There are several use cases:

  • Current live resize is only to extend a image. When administrator know what is doing and want to shrink the disk he could shutdown the vm alter the VM disk images, and here he will want only to update the VM database with the actual size.
  • when the disks backups are snapshots of the entire disk - when the snapshot we revert to is with different size I would like to have an interface to tell OpenNebula that the current disk size is...

Alternate solution is the disk monitoring probes to return the total disk size too and OpenNebula to update from them...

What do you think?

(again I am not sure how to categorize the feature: "Core & system" OR "Drivers - storage")

Best Regards,
Anton Todorov

History

#1 Updated by Ruben S. Montero over 3 years ago

Hi Anton,

Could you check if the new onedb change-body covers this functionality? Note that this is an administrator only command, but you could do something like:

onedb change-body vm --id 23 '/VM/TEMPLATE/DISK[DISK_ID="1"]/SIZE' 1024000

#2 Updated by Anton Todorov over 3 years ago

What to say... wow :)

This is exactly what I am looking for!

It is a very powerful tool and that will simplify implementation of other features I have in mind...

You can mark the issue as resolved :)

Best Regards
Anton Todorov

#3 Updated by Ruben S. Montero over 3 years ago

  • Resolution set to worksforme

Perfect!, :)

#4 Updated by Ruben S. Montero over 3 years ago

  • Status changed from Pending to Closed

Also available in: Atom PDF