I have made some progress tracking down the root cause of this issue.<br><br>In tm_common.sh, function fix_paths significantly alters the image file source and destination path strings. I would make the changes, but I'd like to know the intent of the code. <br>
<br>In the tm_commom.sh script below, variables ONE_CONF and ONE_LOCAL_VAR are setup depending on whether environment variable ONE_LOCATION is configured. If the location variable is not set, the default system install path is used. When the location variable is set, the string has either a "/etc/oned.conf" and a "/var" appended to it. <br>
<br>In my configuration, I would have:<br>ONE_CONF: /opt/one/etc/oned.conf<br>ONE_LOCAL_VAR= /opt/one/var<br>
<br>From tm_common.sh:<br><br>if [ -z "$ONE_LOCATION" ]; then <br>    ONE_CONF=/etc/one/oned.conf<br>    ONE_LOCAL_VAR=/var/lib/one<br>else<br>    ONE_CONF=$ONE_LOCATION/etc/oned.conf<br>    ONE_LOCAL_VAR=$ONE_LOCATION/var<br>
fi<br><br>Below,  function "get_vmdir" sets variable VMDIR to the path. In my case its 
"/vm-images"<br>

 <br>
function get_vmdir<br>{<br>    VMDIR=`cat $ONE_CONF | grep ^VM_DIR= | cut -d= -f2`<br>}<br><br><br>If the VMDIR is set,  function fix_paths attempts to adjust the source and destination. I'm not sure what they are trying to achieve here, concatenating the existing path, the VMDIR and local var path or a substitution ? <br>
<br>function fix_paths<br>{<br>    if [ -n "$VMDIR" ]; then<br>        SRC_PATH=${SRC_PATH/$VMDIR/$ONE_LOCAL_VAR}<br>        DST_PATH=${DST_PATH/$VMDIR/$ONE_LOCAL_VAR}<br>    fi<br>}<br>:<br><br><br><br><br> <br>
<div class="gmail_quote">On Thu, Jun 3, 2010 at 2:22 PM, gary mazzaferro <span dir="ltr"><<a href="mailto:garym@oedata.com" target="_blank">garym@oedata.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Hi,<br><br>I'm deploying on xen with shared disk for cluster nodes. I have the VM_DIR set to /vm-images. This configuration seems to be causing a deployment failure.<br>

<br>When I attempt to clone disk image /vm-images/install/Demo-Target-Baseline.img, the clone script attempts to source it from /opt/one/var/install/Demo-Target-Baseline.img. I was expecting to see it sourced from the location defined in the template. During the clone operation, the clone script places the destination file in /opt/one/var/<VM_ID>/images instead of /vm-images/<VM_ID>. The iso file for the context, other context scripts and deployment.0 file are also placed in directory /opt/one/var/<VM_ID>/images.  <br>


<br>This where I run into the failure;  the ssh call to the xen utilities specifies the deployment.0 file in the /vm-images/<VM_ID>/images directory, not in /opt/one/var/<VM_ID>/images. <br><br>I'm assuming its another config issue on my end.  How do I fix this ?<br>


<br>cheers,<br>gary<br><br><br>oned.log<br><br>Thu Jun  3 13:33:52 2010 [TM][D]: Message received: LOG - 13 tm_clone.sh: occi-server:/vm-images/install/Demo-Target-Baseline.img 10.1.254.117:/vm-images/13/images/disk.0<br>


Thu Jun  3 13:33:52 2010 [TM][D]: Message received: LOG - 13 tm_clone.sh: DST: /opt/one/var/13/images/disk.0<br>Thu Jun  3 13:33:52 2010 [TM][D]: Message received: LOG - 13 tm_clone.sh: Creating directory /opt/one/var/13/images<br>


Thu Jun  3 13:33:52 2010 [TM][D]: Message received: LOG - 13 tm_clone.sh: Executed "mkdir -p /opt/one/var/13/images".<br>Thu Jun  3 13:33:52 2010 [TM][D]: Message received: LOG - 13 tm_clone.sh: Executed "chmod a+w /opt/one/var/13/images".<br>


Thu Jun  3 13:3 3:52 2010 [TM][D]: Message received: LOG - 13 tm_clone.sh: Cloning /opt/one/var/install/Demo-Target-Baseline.img<br>Thu Jun  3 13:33:53 2010 [TM][D]: Message received: LOG - 13 tm_clone.sh: Executed "chmod a+w /opt/one/var/13/images/disk.0".<br>


 Thu Jun  3 13:33:53 2010 [TM][D]: Message received: LOG - 13 tm_context.sh: Executed "mkisofs -o /opt/one/var/13/images/disk.1 -J -R /opt/one/var/13/images/isofiles".<br>Thu Jun  3 13:33:53 2010 [TM][D]: Message received: LOG - 13 tm_context.sh: Executed "rm -rf /opt/one/var/13/images/isofiles".<br>


Thu Jun  3 13:33:54 2010 [TM][D]: Message received: TRANSFER SUCCESS 13 -<br>Thu Jun  3 13:33:54 2010 [VMM][D]: Message received: LOG - 13 Command execution fail: 'cat > /vm-images/13/images/deployment.0 && sudo /usr/sbin/xm create /vm-images/13/images/deployment.0 && sudo /usr/sbin/xm sched-cred -d one-13 -w 128'<br>


Thu Jun  3 13:33:54 2010 [VMM][D]: Message received: LOG - 13 STDERR follows.<br>Thu Jun  3 13:33:54 2010 [VMM][D]: Message received: LOG - 13 bash: /vm-images/13/images/deployment.0: No such file or directory<br>Thu Jun  3 13:33:54 2010 [VMM][D]: Message received: LOG - 13 ExitCode: 1<br>


Thu Jun  3 13:33:55 2010 [VMM][D]: Message received: DEPLOY FAILURE 13 -<br>Thu Jun  3 13:33:58 2010 [TM][D]: Message received: LOG - 13 tm_delete.sh: Deleting /opt/one/var/13/images<br><br><br><br><VM_ID>vm.log<br>


Thu Jun  3 12:51:51 2010 [DiM][I]: New VM state is ACTIVE.<br>Thu Jun  3 12:51:53 2010 [LCM][I]: New VM state is PROLOG.<br>Thu Jun  3 13:33:52 2010 [TM][I]: tm_clone.sh: occi-server:/vm-images/install/Demo-Target-Baseline.img 10.1.254.117:/vm-images/13/images/disk.0<br>


Thu Jun  3 13:33:52 2010 [TM][I]: tm_clone.sh: DST: /opt/one/var/13/images/disk.0<br>Thu Jun  3 13:33:52 2010 [TM][I]: tm_clone.sh: Creating directory /opt/one/var/13/images<br>Thu Jun  3 13:33:52 2010 [TM][I]: tm_clone.sh: Executed "mkdir -p /opt/one/var/13/images".<br>


Thu Jun  3 13:33:52 2010 [TM][I]: tm_clone.sh: Executed "chmod a+w /opt/one/var/13/images".<br>Thu Jun  3 13:33:52 2010 [TM][I]: tm_clone.sh: Cloning /opt/one/var/install/Demo-Target-Baseline.img<br>Thu Jun  3 13:33:53 2010 [TM][I]: tm_clone.sh: Executed "cp /opt/one/var/install/Demo-Target-Baseline.img /opt/one/var/13/images/disk.0".<br>


Thu Jun  3 13:33:53 2010 [TM][I]: tm_clone.sh: Executed "chmod a+w /opt/one/var/13/images/disk.0".<br>Thu Jun  3 13:33:53 2010 [TM][I]: tm_context.sh: Executed "mkdir -p /opt/one/var/13/images/isofiles".<br>


Thu Jun  3 13:33:53 2010 [TM][I]: tm_context.sh: Executed "cp -R /opt/one/var/13/context.sh /opt/one/var/13/images/isofiles".<br>Thu Jun  3 13:33:53 2010 [TM][I]: tm_context.sh: Executed "cp -R /vm-images/VMs/init.sh /opt/one/var/13/images/isofiles".<br>


Thu Jun  3 13:33:53 2010 [TM][I]: tm_context.sh: Executed "mkisofs -o /opt/one/var/13/images/disk.1 -J -R /opt/one/var/13/images/isofiles".<br>Thu Jun  3 13:33:53 2010 [TM][I]: tm_context.sh: Executed "rm -rf /opt/one/var/13/images/isofiles".<br>


Thu Jun  3 13:33:54 2010 [LCM][I]: New VM state is BOOT<br>Thu Jun  3 13:33:54 2010 [VMM][I]: Generating deployment file: /opt/one/var/13/deployment.0<br><br><br><br>
</blockquote></div><br>