Michael,<br><br>My apologies, my patch had a gross typo (baseame --> basename). You can either change that, or try the following which is a bit more elegant:<br><br> images_path = File.dirname remote_dfile<br><div id=":8i" class="ii gt">
cmd = "mkdir -p #{images_path} && cat > #{remote_dfile} && #{LIBVIRT[:create]} #{remote_dfile}"</div><br>Best,<br><br>-Tino<br clear="all"><br>--<br>Constantino Vázquez, Grid Technology Engineer/Researcher: <a href="http://www.dsa-research.org/tinova">http://www.dsa-research.org/tinova</a><br>
DSA Research Group: <a href="http://dsa-research.org">http://dsa-research.org</a><br>Globus GridWay Metascheduler: <a href="http://www.GridWay.org">http://www.GridWay.org</a> <br>OpenNebula Virtual Infrastructure Engine: <a href="http://www.OpenNebula.org">http://www.OpenNebula.org</a><br>
<br><br><div class="gmail_quote">On Tue, Nov 17, 2009 at 9:50 PM, Michael W. Lucas <span dir="ltr"><<a href="mailto:mwlucas@blackhelicopters.org">mwlucas@blackhelicopters.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Hi,<br>
<br>
Thanks for the patch.<br>
<br>
Short answer: still not working, but the failure is different.<br>
<br>
My patched one_vmm_kvm.rb looks like the below (I don't know Ruby, so<br>
I could have quite easy made an error and not known it):<br>
<br>
--- one_vmm_kvm.rb-dist 2009-11-17 15:15:24.966874194 -0500<br>
+++ one_vmm_kvm.rb 2009-11-17 15:15:56.445072283 -0500<br>
@@ -85,7 +85,12 @@<br>
domain = tmp.read<br>
tmp.close()<br>
<br>
- cmd = "cat > #{remote_dfile} && #{LIBVIRT[:create]} #{remote_dfile}"<br>
+# cmd = "cat > #{remote_dfile} && #{LIBVIRT[:create]} #{remote_dfile}"<br>
+ deployment_filename = File.baseame remote_dfile<br>
<div class="im">+ images_path =<br>
+remote_dfile.gsub(deployment_filename,'')<br>
+ cmd = "mkdir -p #{images_path} && cat > #{remote_dfile} &&<br>
+#{LIBVIRT[:create]} #{remote_dfile}"<br>
<br>
</div> deploy_exe = SSHCommand.run("'#{cmd}'", host, log_method(id), domain)<br>
<br>
oned.log says:<br>
<br>
Tue Nov 17 15:32:42 2009 [ReM][D]: VirtualMachineAllocate invoked<br>
Tue Nov 17 15:32:42 2009 [DiM][D]: Allocating a new VM<br>
Tue Nov 17 15:33:04 2009 [ReM][D]: VirtualMachineDeploy invoked<br>
Tue Nov 17 15:33:04 2009 [DiM][D]: Deploying VM 2<br>
Tue Nov 17 15:33:04 2009 [TM][D]: Message received: TRANSFER SUCCESS 2 -<br>
<br>
2/vm.log shows:<br>
<br>
Tue Nov 17 15:33:04 2009 [DiM][I]: New VM state is ACTIVE.<br>
Tue Nov 17 15:33:04 2009 [LCM][I]: New VM state is PROLOG.<br>
Tue Nov 17 15:33:04 2009 [VM][I]: Virtual Machine has no context<br>
Tue Nov 17 15:33:05 2009 [LCM][I]: New VM state is BOOT<br>
Tue Nov 17 15:33:05 2009 [VMM][I]: Generating deployment file: /usr/local/one/var/2/deployment.0<br>
<br>
It appears that we never try to run the command to start the VM,<br>
however.<br>
<br>
Tcpdump on the compute node shows that the head node is not even<br>
attempting to SSH to the compute node when deploying the VM. (I do<br>
see SSH traffic when oned monitors the compute node, so I believe my<br>
packet sniffer is configured correctly.)<br>
<br>
Any other suggestions?<br>
<br>
Thanks,<br>
==ml<br>
<div><div></div><div class="h5"><br>
On Mon, Nov 16, 2009 at 04:38:23PM +0100, Tino Vazquez wrote:<br>
> Hi Michael,<br>
><br>
> The problem is that a diskless VM will cause that the transfer driver<br>
> doesn't get called. This transfer driver is responsible for creating the<br>
> 'images' directory. If you want t a network-booted machine you can try out<br>
> the following: in src/vmm_mad/kvm/one_vmm_kvm.rb change line 88 from:<br>
><br>
> cmd = "cat > #{remote_dfile} && #{LIBVIRT[:create]} #{remote_dfile}"<br>
><br>
> to<br>
><br>
> deployment_filename = File.baseame remote_dfile<br>
> images_path =<br>
> remote_dfile.gsub(deployment_filename,'')<br>
> cmd = "mkdir -p #{images_path} && cat > #{remote_dfile} &&<br>
> #{LIBVIRT[:create]} #{remote_dfile}"<br>
><br>
><br>
> Please try this out, and if you find it useful please come back to us with<br>
> some feedback to we can include it in future releases.<br>
><br>
> About your second questions, there are two deployment.0 images due to<br>
> OpenNebula design and its ability to use ssh or nfs. Because the VMM driver<br>
> doesn't know wihch storage it is being used, OpenNebula always uses a<br>
> scratch 'images' directory in the remote node were the deployment.0 file and<br>
> disks are copied from the front-end to there. If the storage is NFS based<br>
> you end up with two deployment.0 files locally. The 'images' directory is<br>
> used because doing a cat of a file over the same file will result on a null<br>
> file. Hope this makes sense :o<br>
><br>
> Regards,<br>
><br>
> -Tino<br>
><br>
> --<br>
</div></div>> Constantino V?zquez, Grid Technology Engineer/Researcher:<br>
<div><div></div><div class="h5">> <a href="http://www.dsa-research.org/tinova" target="_blank">http://www.dsa-research.org/tinova</a><br>
> DSA Research Group: <a href="http://dsa-research.org" target="_blank">http://dsa-research.org</a><br>
> Globus GridWay Metascheduler: <a href="http://www.GridWay.org" target="_blank">http://www.GridWay.org</a><br>
> OpenNebula Virtual Infrastructure Engine: <a href="http://www.OpenNebula.org" target="_blank">http://www.OpenNebula.org</a><br>
><br>
><br>
> On Wed, Nov 11, 2009 at 9:21 PM, Michael W. Lucas <<br>
> <a href="mailto:mwlucas@blackhelicopters.org">mwlucas@blackhelicopters.org</a>> wrote:<br>
><br>
> > Hi,<br>
> ><br>
> > My ON 1.4beta2/KVM environment is working fine with disk images. ON<br>
> > cannot start a network-booted machine, however. The problem appears<br>
> > to be with the path used for the deployment file. If I use this template:<br>
> ><br>
> > NAME = onvm1<br>
> > CPU = 0.5<br>
> > MEMORY = 512<br>
> > OS = [ BOOT = network ]<br>
> > NIC = [ BRIDGE = "br0",<br>
> > MAC = "00:16:8B:AB:C7:14" ]<br>
> > GRAPHICS = [type="vnc",listen="127.0.0.1",port="-1"]<br>
> ><br>
> > the error log shows:<br>
> ><br>
> > Wed Nov 11 15:14:34 2009 [VMM][D]: Message received: LOG - 2 Command<br>
> > execution fail: 'cat > /one_dir/2/images/deployment.0 && virsh --connect<br>
> > qemu:///system create /one_dir/2/images/deployment.0'<br>
> ><br>
> > /one_dir/2/images/deployment.0 doesn't exist. But<br>
> > /one_dir/2/deployment.0 does exist, along with vm.log and the transfer<br>
> > files. There's no "images" subdirectory.<br>
> ><br>
> > On a simple VM with a hard drive, such as this, we do have an images<br>
> > subdirectory. Oddly, I have separate but identical deployment.0 files<br>
> > in multiple locations.<br>
> ><br>
> > clusterhead1/one_dir/1;ls -lai<br>
> > total 10K<br>
> > 156066 drwxrwxrwx 3 oneadmin oneadmin 6 2009-11-11 15:06 .<br>
> > 155649 drwxr-xr-x 6 oneadmin oneadmin 13 2009-11-11 15:17 ..<br>
> > 156092 -rw-r--r-- 1 oneadmin oneadmin 368 2009-11-11 15:06 deployment.0<br>
> > 156088 drwxrwxrwx 2 oneadmin oneadmin 4 2009-11-11 15:06 images<br>
> > 156087 -rw-r--r-- 1 oneadmin oneadmin 83 2009-11-11 15:06<br>
> > transfer.0.prolog<br>
> > 156067 -rw-r--r-- 1 oneadmin oneadmin 2173 2009-11-11 15:17 vm.log<br>
> ><br>
> > clusterhead1/one_dir/1;ls -lai images/<br>
> > total 5K<br>
> > 156088 drwxrwxrwx 2 oneadmin oneadmin 4 2009-11-11 15:06 .<br>
> > 156066 drwxrwxrwx 3 oneadmin oneadmin 6 2009-11-11 15:06 ..<br>
> > 156093 -rw-r--r-- 1 oneadmin oneadmin 368 2009-11-11 15:06 deployment.0<br>
> > 156089 lrwxrwxrwx 1 oneadmin oneadmin 28 2009-11-11 15:06 disk.0 -><br>
> > /one_dir/one_images/dns1.raw<br>
> > clusterhead1/one_dir/1;<br>
> ><br>
> > Any suggestions, folks?<br>
> ><br>
> > Thanks,<br>
> > ==ml<br>
> ><br>
> > --<br>
> > Michael W. Lucas mwlucas@BlackHelicopters.org<br>
> > <a href="http://www.MichaelWLucas.com/" target="_blank">http://www.MichaelWLucas.com/</a><br>
> > Latest book: Cisco Routers for the Desperate, 2nd Edition<br>
> > <a href="http://www.CiscoRoutersForTheDesperate.com/" target="_blank">http://www.CiscoRoutersForTheDesperate.com/</a><br>
> > _______________________________________________<br>
> > Users mailing list<br>
> > <a href="mailto:Users@lists.opennebula.org">Users@lists.opennebula.org</a><br>
> > <a href="http://lists.opennebula.org/listinfo.cgi/users-opennebula.org" target="_blank">http://lists.opennebula.org/listinfo.cgi/users-opennebula.org</a><br>
> ><br>
<br>
</div></div>--<br>
<div><div></div><div class="h5">Michael W. Lucas mwlucas@BlackHelicopters.org<br>
<a href="http://www.MichaelWLucas.com/" target="_blank">http://www.MichaelWLucas.com/</a><br>
Latest book: Cisco Routers for the Desperate, 2nd Edition<br>
<a href="http://www.CiscoRoutersForTheDesperate.com/" target="_blank">http://www.CiscoRoutersForTheDesperate.com/</a><br>
</div></div></blockquote></div><br>