Request #179
Ability to expand disk source on physical host
| Status: | New | Start date: | 12/03/2009 | |
|---|---|---|---|---|
| Priority: | Low | Due date: | ||
| Assignee: | % Done: | 0% |
||
| Category: | - | |||
| Target version: | - |
Description
I use opennebula in an xen environment where a shared storage solution is not available, as such keeping the xen instance image small is very desirable for transferring to a lot of different machines. It is also desirable to expand (ie dd, resizefs) on the physical host before the instance is brought up simliar to mkimage.sh but on the transfered image. I thought about this a while it seemed reasonable to added an option to the DISK machine template. Below is the option I choose to use:
DISK = [
source = "/data/abimg",
target = "xvda",
bus = "xen",
extend = 5240,
readonly = "no" ]
Where extend is the how many megabytes you wish to expand the image on the destination / physical node. To accomplish this I modified the one/tm/TransferManager.cc to accept this new paramater (see TransferManager-fstutz-0.0.1.patch), and two new bash commands src/tm_mad/ssh/tm_mkextend.sh (attached) and contrib/fit (attached). I realize the scheduler was not modfiied to do a complete disk check for the addition, but at least its usable right now.
I realize everyone might not want this feature and in its current form is not complete, but I wanted to through it out there.
History
Updated by Ruben S. Montero almost 2 years ago
- Status changed from New to 4
- Assignee set to Ruben S. Montero
- Target version set to Release 1.4.2
- Resolution set to fixed
Hi Frank,
Thank you very much for your contribution. This can certainly come in handy in ssh setups. I am wondering if we can not just use the size attribute, like:
DISK = [
source = "/data/abimg",
target = "xvda",
bus = "xen",
size = 5240,
readonly = "no" ]
This will give you SIZE at the last argument of the CLONE statement like
CLONE <source> <target> <size>
Then you can add the tm_mkextend.sh function to the tm_clone.sh for your setup. Does it make sense?
Updated by Frank Stutz almost 2 years ago
Makes sense, not sure why I did not see it in the first place.
--Frank
Updated by jordan pittier 9 months ago
I am also using this "feature". But I would like to use the Opennebula image repository, that is, in my VM Template using something like :
DISK = [image = "my custom Ubuntu defined in Image Repository", size=5240]
But with this line, the SIZE argument is not passed to tm_clone.sh.
Why is that the SIZE argument is passed only if DISK is described with its "source = /path/example" argument ?
Thanks !
Updated by Ruben S. Montero 4 months ago
- Tracker changed from Feature to Request
- Target version deleted (
Release 1.4.2)
Updated by Ruben S. Montero 4 months ago
- Status changed from 4 to New