[one-users] Corrections for mkimage on vmware

Tino Vazquez tinova at opennebula.org
Wed Jul 18 09:46:16 PDT 2012


Hi Emmanuel,

That was indeed a bug, thanks a lot for your feedback! I've opened a ticket
[1] to keep track of the solution.

Regards,

-Tino

[1] http://dev.opennebula.org/issues/1373

--
Constantino Vázquez Blanco, MSc
Project Engineer
OpenNebula - The Open-Source Solution for Data Center Virtualization
www.OpenNebula.org | @tinova79 | @OpenNebula


On Mon, Jul 16, 2012 at 7:58 AM, Emmanuel Mathot <
emmanuel.mathot at terradue.com> wrote:

> Hello,
>
> Before posting a bug on dev.opennebula.org, I submit you some corrections
> I made to the transfer manager scripts to have the mkimage script working
> on vmware.
> Let me know.
>
> --- /usr/lib/one/sh/scripts_common.sh   2012-07-16 07:58:15.873452099 +0200
> +++ /usr/lib/one/sh/scripts_common.sh.old       2012-07-16
> 07:56:39.548454580 +0200
> @@ -251,12 +251,11 @@
>              return 0
>              ;;
>          vmdk_*)
> -            VMWARE_DISK_TYPE=`echo $FSTYPE|cut -d'_' -f 2`
> -            echo "if which sudo > /dev/null; then \
> -                       SUDO_CMD="sudo " \
> -                 fi \
> -                  $SUDO_CMD $VMKFSTOOLS -U $DST/disk.vmdk; \
> -                  $SUDO_CMD $VMKFSTOOLS -c ${SIZE}M -d
> ${VMWARE_DISK_TYPE} $DST_PATH/disk.vmdk"
> +            VMWARE_DISK_TYPE=`echo $FSTYPE|cut -d'_' -f 1`
> +            echo "WHICH_SUDO=\$(which sudo) ; \
> +                  [ ! -z \"\$WHICH_SUDO\" -a -f \"\$WHICH_SUDO\" ] &&
> SUDO=\"sudo\" ; \
> +                  $SUDO $VMKFSTOOLS -U $DST/disk.vmdk; \
> +                  $SUDO $VMKFSTOOLS -c ${SIZE}M -d ${VMWARE_DISK_TYPE}
> $DST_PATH/disk.vmdk"
>              return 0
>              ;;
>          *)
>
>
> --- /var/lib/one/remotes/tm/ssh/mkimage 2012-07-16 07:48:36.285451366 +0200
> +++ /var/lib/one/remotes/tm/ssh/mkimage.old     2012-07-16
> 07:52:26.531451982 +0200
> @@ -55,8 +55,6 @@
>
>  if ! echo "$FSTYPE"|grep -q ^vmdk; then
>    CREATE_IMAGE="$DD if=/dev/zero of=$DST_PATH bs=1 count=1 seek=${SIZE}M"
> -else
> -  CREATE_IMAGE="mkdir -p $DST_PATH"
>  fi
>
>  MKSCRIPT=$(cat <<EOF
>
> Cheers,
>
>  Emmanuel Mathot
> www.terradue.com
> [image: Terradue]
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opennebula.org
> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20120718/883aa87c/attachment-0003.htm>


More information about the Users mailing list