vSphere

Using ovftool to import VMs during kickstart fails |VMware Communities


I finally came back to work on this and found your reply.

 

Here’s my env output

 

[root@localhost:~] env

USER=root

MAIL=/var/mail/root

SSH_CLIENT=192.168.130.76 61795 22

SHLVL=1

HOME=/

TERMINFO=/usr/share/terminfo

SSH_TTY=/dev/char/pty/t0

PS1=[root@h:w]

LOGNAME=root

VI_USERNAME=root

TERM=xterm-256color

PATH=/bin:/sbin

LANG=en_US.UTF-8

SHELL=/bin/sh

LC_ALL=en_US.UTF-8

PWD=/

SSH_CONNECTION=192.168.130.76 61795 192.168.130.40 22

TMOUT=0

 

And here is the ovftool I’m using on my ESXi host. Yes, I know I didn’t put all the variables in there, but I didn’t think the SSH variables would make a difference.

 

 

#!/bin/sh

# ————————

# Start Script for ovftool

# ————————

 

# resolve links – $0 may be a softlink

 

export PS1=[root@h:w]

export PS2=>

export PS4=+

export TMOUT=0

export HOME=/

export SHLVL=1

export PATH=/bin:/sbin

export SHELL=/bin/sh

export USER=root

export PWD=/

export LOGNAME=root

export LINENO=

export TERMINFO=/usr/share/terminfo

 

 

 

PRG=$0

 

if [ -L $PRG ]; then

   PRG=`readlink $PRG`

fi

 

PRGDIR=`dirname $PRG`

OVFTOOL_BIN=$PRGDIR/ovftool.bin

 

export LD_LIBRARY_PATH=$PRGDIR:$LD_LIBRARY_PATH

 

if [ ! -e $OVFTOOL_BIN ]; then

   echo Cannot find $OVFTOOL_BIN

   exit 1

fi

 

exec $OVFTOOL_BIN $@

exit $?

 

Did you come across the variables that would be needed to get this to run?

Perhaps I have my KS.cfg file out of sorts…



Source link

 

To see the full content, share this page by clicking one of the buttons below

Related Articles

Leave a Reply