Hello Juanra,<div><br></div><div>could you please describe in more detail the functionality you want to achieve? I have the feeling what you ask is a bit tricky since it involves adding new states in the C++ core.</div><div>
<br></div><div>Is something like this what you're looking for?</div><div>onevm resize <vm_id> <disk_id> +<size></div><div>which will do:</div><div>1) LV/qemu-img convert in the host extending the disk by +<size></div>
<div>2) onevm reset <vm_id></div><div><br></div><div>Note that the onevm resize command doesn't exist, I'm just trying to figure out if that's what you want.</div><div><br></div><div>cheers,</div><div>
Jaime<br>
<div class="gmail_quote">On Fri, Aug 10, 2012 at 11:26 AM, Juanra <span dir="ltr"><<a href="mailto:amon.raj@gmail.com" target="_blank">amon.raj@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello list.<br><br>I have made a shell script that resizes a disk to get all free space. I put it in rc.local and after it I run resize2fs.<br><br>I am using lvm and qemu and first I resize the disk in host, but I want to know how can I add a command to opennebula that calls lvresize or qemu-img convert ??.<br>
<br><br>Thanks in advice.<br><br>PD: This is script I am using.<br><br>#!/bin/bash<br><br>INICIO=`sfdisk -u S -l /dev/vda | sed -n '6 p' | sed "s/^ *//;s/ *$//;s/ \{1,\}/ /g" | cut -d" " -f2`<br>
FIN=`sfdisk -u S -l /dev/vda | sed -n '6 p' | sed "s/^ *//;s/ *$//;s/ \{1,\}/ /g" | cut -d" " -f3`<br>TAM=`sfdisk -u S -s /dev/vda`<br><br>if [ "$TAM" != "$FIN" ]; then<br>
echo $INICIO $FIN $TAM > /root/resize.txt<br>
echo "$INICIO,,L *" | sfdisk -u S -f /dev/vda<br> shutdown -rF now<br>fi<br><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>
<br></blockquote></div><br></div><br clear="all"><div><br></div>-- <br>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><br>