<div dir="ltr">Hi Harald,<div><br></div><div>this is a tricky one. </div><div><br></div><div>There is no easy way to do this, but I can suggest two paths:</div><div><br></div><div>1 - The easy one (you don't care about Quotas)</div>
<div><br></div><div>Edit /var/lib/one/remotes/datastore/ceph/cp and add "return $RBD_SOURCE" in L86 (<a href="https://github.com/OpenNebula/one/blob/master/src/datastore_mad/remotes/ceph/cp#L86" target="_blank">https://github.com/OpenNebula/one/blob/master/src/datastore_mad/remotes/ceph/cp#L86</a>)</div>
<div>The you can register a ceph image in ceph datastore (type = rbd, etc...) but select a "bogus" path, such as /etc/hosts. Let's say this produced image number "10".</div><div>The source would then be the ceph pool ("one" by default) and the image is one-<ID> => that will produce a source "one/one-10"</div>
<div>Then simply rename your image to "one-10", and there you go.</div><div>Remember to set the proper Ceph pool in the ceph.conf</div><div><br></div><div style>The drawback of this method is that you won't have the proper size, since the size will be the one of /etc/hosts, so it's not good image size based quotas...</div>
<div style><br></div><div style>2 - The hard way (you DO care about Quotas)</div><div style><br></div><div style>Do option 1 and modify /var/lib/one/remotes/datastore/ceph/stat so it actually ssh's into the ceph cluster and gets the SIZE.</div>
<div style><br></div><div style>cheers,<br>Jaime</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, May 15, 2013 at 11:08 AM, Harald Rößler <span dir="ltr"><<a href="mailto:Harald.Roessler@btd.de" target="_blank">Harald.Roessler@btd.de</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
is there a way to change the image source. because I have some existing<br>
rbd images in my ceph storage and I want to migrate them to opennebula.<br>
Alternatively what is the best way to migrate existing vm's / images to<br>
opennebula.<br>
<br>
<br>
With Regards<br>
Harry<br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opennebula.org">Users@lists.opennebula.org</a><br>
<a href="http://lists.opennebula.org/listinfo.cgi/users-opennebula.org" target="_blank">http://lists.opennebula.org/listinfo.cgi/users-opennebula.org</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">Join us at <a href="http://opennebulaconf.com/" style="color:rgb(17,85,204)" target="_blank">OpenNebulaConf2013</a> in Berlin, <span><span>24-26 September, 2013</span></span><br>
--<div>Jaime Melis<br>Project Engineer<br>OpenNebula - The Open Source Toolkit for Cloud Computing<br><a href="http://www.OpenNebula.org" target="_blank">www.OpenNebula.org</a> | <a href="mailto:jmelis@opennebula.org" target="_blank">jmelis@opennebula.org</a></div>
</div>
</div>