[one-users] esxi vm instantiation not on scsi disk

Michael Curran michael.curran at connectsolutions.com
Thu Aug 15 07:09:20 PDT 2013


So - I am having an issue with building VM's in ESXi from templates

The root drive always instantiates as IDE and not SCSI - and no SCSI adapter is added that would allow me to add more disks to the VM
Looking over this part of scripts_common.sh for VMKFSTOOLS - it doesn't appear to look like the build task from VMware's site - I don't see the -a that identifies the BUS type

I have added this to the actual disk IMAGE

BUS="scsi"

And these to the template

DISK=[
  BUS="scsi",
  IMAGE_ID="0" ]


RAW=[
  DATA="<devices><controller type='scsi' index='0' model='lsilogic'/></devices>",
  TYPE="vmware" ]


But never see a SCSI attached disk as the primary disk - always IDE

Any suggestions?

function mkfs_command {
    DST=$1
    FSTYPE=${2:-ext3}
    SIZE=${3:-0}

    # Specific options for different FS
    case "$FSTYPE" in
        "ext2"|"ext3"|"ext4"|"ntfs")
            OPTS="-F"
            ;;

        "reiserfs")
            OPTS="-f -q"
            ;;

        "jfs")
            OPTS="-q"
            ;;
        "raw"|"")
            echo ""
            return 0
            ;;
        "swap")
            echo "$MKSWAP -L swap $DST"
            return 0
            ;;
        "qcow2")
            echo "$QEMU_IMG create -f qcow2 $DST ${SIZE}M"
            return 0
            ;;
        "vmdk_"*)
            VMWARE_DISK_TYPE=`echo $FSTYPE|cut -d'_' -f 2`

            echo "$VMWARE_DISK_TYPE" | \
            grep '\<thin\>\|\<zeroedthic\>\|\<eagerzeroedthick\>' 2>&1 /dev/null

            if [ $? -eq 1 ] ; then
                VMWARE_DISK_TYPE="thin"
            fi

            echo "$VMKFSTOOLS -U $DST/disk.vmdk; \
                  rm -f $DST/*; \
                  $VMKFSTOOLS -c ${SIZE}M  -d ${VMWARE_DISK_TYPE} $DST                                    /disk.vmdk"
            return 0
            ;;
        *)
            OPTS=""
            ;;
    esac

    echo "$MKFS -t $FSTYPE $OPTS $DST"
}


Michael Curran | connectsolutions | Lead Network Architect
Phone 614.568.2285 | Mobile 614.403.6320 | www.connectsolutions.com<http://www.connectsolutions.com>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20130815/ebb54b8a/attachment.htm>


More information about the Users mailing list