[one-users] Errors in tm_clone.sh for NFS hosts

Tino Vazquez tinova79 at gmail.com
Fri May 6 03:05:16 PDT 2011


Hi Richard,

Did you set the VM_DIR variable?

Regards,

-Tino

--
Constantino Vázquez Blanco | dsa-research.org/tinova
Virtualization Technology Engineer / Researcher
OpenNebula Toolkit | opennebula.org



On Tue, Apr 19, 2011 at 3:58 PM, Whiffen, Richard
<Richard_Whiffen at cable.comcast.com> wrote:
>
> This is looking more and more like a bug or variable scope issue.
> I added the following to /usr/lib/one/tm_commands/nfs/tm_clone.sh:
> log "SRC Value: $SRC"
> log "DST value: $DST"
> (after the line "get_vmdir")
> The log entries now say:
> Tue Apr 19 09:39:30 2011 [TM][I]: tm_clone.sh: SRC Value:
> io-kvm-ctrl-01.streamsage.com:/home/oneadmin/one-templates/ttylinux.img
> Tue Apr 19 09:39:30 2011 [TM][I]: tm_clone.sh: DST value:
> sn-kvm-11:/srv/cloud/one/var/59/images/disk.0
> Tue Apr 19 09:39:30 2011 [TM][I]: tm_clone.sh:
> io-kvm-ctrl-01.streamsage.com:/home/oneadmin/one-templates/ttylinux.img
> sn-kvm-11:/srv/cloud/one/var/59/images/disk.0
> Tue Apr 19 09:39:30 2011 [TM][I]: tm_clone.sh: DST:
> /var/lib/one/59/images/disk.0
> Tue Apr 19 09:39:30 2011 [TM][I]: tm_clone.sh: Creating directory
> /var/lib/one/59/images
> Tue Apr 19 09:39:30 2011 [TM][I]: tm_clone.sh: Executed "mkdir -p
> /var/lib/one/59/images".
> Tue Apr 19 09:39:30 2011 [TM][I]: tm_clone.sh: Executed "chmod a+w
> /var/lib/one/59/images".
> Tue Apr 19 09:39:30 2011 [TM][I]: tm_clone.sh: Cloning
> /home/oneadmin/one-templates/ttylinux.img
> Tue Apr 19 09:39:30 2011 [TM][I]: tm_clone.sh: Executed "cp -r
> /home/oneadmin/one-templates/ttylinux.img /var/lib/one/59/images/disk.0".
> Tue Apr 19 09:39:30 2011 [TM][I]: tm_clone.sh: Executed "chmod a+rw
> /var/lib/one/59/images/disk.0".
>
> So DST has the correct value: /srv/cloud/one/var/59/image/disk.0. But two
> log lines later, DST is set to: /var/lib/one/59/images/disk.0
> Tue Apr 19 09:39:30 2011 [TM][I]: tm_clone.sh: DST:
> /var/lib/one/59/images/disk.0
> So somewhere in the sub-routine "fix_paths" we're picking up /var/lib
> instead of /srv/cloud/???
> For now I've commented out "fix_paths" in tm_clone.sh and fix_dst_path
> in /usr/lib/one/tm_commands/nfs/tm_context.sh and it's now creating virts on
> my NFS enabled hosts.
> Rich
>
>
> From: Rich Whiffen <richard_whiffen at cable.comcast.com>
> Date: Mon, 18 Apr 2011 15:51:39 -0400
> To: <users at lists.opennebula.org>
> Subject: Errors in tm_clone.sh for NFS hosts
>
> I think this one is pretty straight forward, I just need someone to tell me
> where I set it.    When I try to create a virt on a tm_nfs target, the
> tm_clone is cloning into the wrong directory.
> It says its trying to do it right:
>  tm_clone.sh:
> io-kvm-ctrl-01.streamsage.com:/srv/cloud/var/images/83603da305e13410317b0c947f435a019644f46f
> sn-kvm-11:/srv/cloud/one/var/56/images/disk.0
> /srv/cloud/one/var/56/images is the correct target path, but the clone
> script  appears to be putting it in:  /var/lib/one/56/images/disk.0
> tm_clone.sh: DST: /var/lib/one/56/images/disk.0
> Where do I set the variable for the tm_nfs config to not use
> '${ONE_LOCATION}' for the destination but rather use the /srv/cloud/one/var/
> (/srv is the NFS mount common to both the oneadmin control box and the
> target host).
> The log file of a failure:
> Mon Apr 18 15:10:30 2011 [DiM][I]: New VM state is ACTIVE.
> Mon Apr 18 15:10:30 2011 [LCM][I]: New VM state is PROLOG.
> Mon Apr 18 15:11:53 2011 [TM][I]: tm_clone.sh:
> io-kvm-ctrl-01.streamsage.com:/srv/cloud/var/images/83603da305e13410317b0c947f435a019644f46f
> sn-kvm-11:/srv/cloud/one/var/56/images/disk.0
> Mon Apr 18 15:11:53 2011 [TM][I]: tm_clone.sh: DST:
> /var/lib/one/56/images/disk.0
> Mon Apr 18 15:11:53 2011 [TM][I]: tm_clone.sh: Creating directory
> /var/lib/one/56/images
> Mon Apr 18 15:11:53 2011 [TM][I]: tm_clone.sh: Executed "mkdir -p
> /var/lib/one/56/images".
> Mon Apr 18 15:11:53 2011 [TM][I]: tm_clone.sh: Executed "chmod a+w
> /var/lib/one/56/images".
> Mon Apr 18 15:11:53 2011 [TM][I]: tm_clone.sh: Cloning
> /srv/cloud/var/images/83603da305e13410317b0c947f435a019644f46f
> Mon Apr 18 15:11:53 2011 [TM][I]: tm_clone.sh: Executed "cp -r
> /srv/cloud/var/images/83603da305e13410317b0c947f435a019644f46f
> /var/lib/one/56/images/disk.0".
> Mon Apr 18 15:11:53 2011 [TM][I]: tm_clone.sh: Executed "chmod a+rw
> /var/lib/one/56/images/disk.0".
> Mon Apr 18 15:11:53 2011 [TM][I]: tm_context.sh: Executed "mkdir -p
> /var/lib/one/56/images/isofiles".
> Mon Apr 18 15:11:53 2011 [TM][I]: tm_context.sh: Executed "cp -R
> /var/lib/one/56/context.sh /var/lib/one/56/images/isofiles".
> Mon Apr 18 15:11:53 2011 [TM][I]: tm_context.sh: Executed "/usr/bin/mkisofs
> -o /var/lib/one/56/images/disk.1 -J -R /var/lib/one/56/images/isofiles".
> Mon Apr 18 15:11:53 2011 [TM][I]: tm_context.sh: Executed "rm -rf
> /var/lib/one/56/images/isofiles".
> Mon Apr 18 15:11:55 2011 [LCM][I]: New VM state is BOOT
> Mon Apr 18 15:11:55 2011 [VMM][I]: Generating deployment file:
> /var/lib/one/56/deployment.0
> Mon Apr 18 15:12:25 2011 [VMM][I]: Command execution fail: 'if [ -x
> "/var/tmp/one/vmm/kvm/deploy" ]; then /var/tmp/one/vmm/kvm/deploy
> /srv/cloud/one/var/56/images/deployment.0; else
>  exit 42; fi'
> Mon Apr 18 15:12:25 2011 [VMM][I]: STDERR follows.
> Mon Apr 18 15:12:25 2011 [VMM][I]: Warning: Permanently added
> 'sn-kvm-11,192.168.241.41' (RSA) to the list of known hosts.
> Mon Apr 18 15:12:25 2011 [VMM][I]: error: Failed to create domain from
> /srv/cloud/one/var/56/images/deployment.0
> Mon Apr 18 15:12:25 2011 [VMM][I]: error: internal error unable to start
> guest: qemu: could not open disk image /srv/cloud/one/var/56/images/disk.0
> Mon Apr 18 15:12:25 2011 [VMM][I]:
> Mon Apr 18 15:12:25 2011 [VMM][I]: ExitCode: 255
> Mon Apr 18 15:12:25 2011 [VMM][E]: Error deploying virtual machine: Warning:
> Permanently added 'sn-kvm-11,192.168.241.41' (RSA) to the list of known
> hosts.^M
> Mon Apr 18 15:12:25 2011 [DiM][I]: New VM state is FAILED
> Mon Apr 18 15:12:27 2011 [TM][W]: Ignored: LOG - 56 tm_delete.sh: Deleting
> /var/lib/one/56/images
> Mon Apr 18 15:12:27 2011 [TM][W]: Ignored: LOG - 56 tm_delete.sh: Executed
> "rm -rf /var/lib/one/56/images".
> Mon Apr 18 15:12:27 2011 [TM][W]: Ignored: TRANSFER SUCCESS 56 -
> Mon Apr 18 15:13:43 2011 [DiM][I]: New VM state is DONE.
> Mon Apr 18 15:13:44 2011 [HKM][I]: Hook image successfully executed.
> Cheers,
> Rich
> --
> Rich Whiffen
> _______________________________________________
> Users mailing list
> Users at lists.opennebula.org
> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>
>



More information about the Users mailing list