Hi, you should use tm_shared instead of tm_ssh (tm_lvm won't work either for your setup).
Regarding your first issue: managing iscsi targets with OpenNebula, there is no native way to handle iscsi block devices with OpenNebula. What you can do out-of-the-box is to use any block device available in the target host (just like you're trying to do in the above logs), whether it's iscsi or not. However I reckon that's too limited for your scenario, since it requires an administrator to discover the iscsi targets on the target host. We've opened a ticket to provide native support for iscsi targets (planned for OpenNebula 3.4): http://dev.opennebula.org/issues/1032 We've been thinking about the possible implementation, and for the moment we believe the best approach will be the following: 1) Define a iscsi handler, such as: iscsi://hostname/target, which will be used in image templates under the SOURCE attribute: DISK = [ TYPE = block, SOURCE="iscsi://my-san/my-lun", TARGET = "hda", CLONE=NO] 2) Modify the TM drivers to handle in a specific way sources starting with "iscsi://" (just like we did in tm_lvm for "/dev/*" devices [1]) The driver will run a re-scan of the iscsi targets, and create a symlink for "disk.0" to point to the new /dev/ device. [1] https://github.com/OpenNebula/one/blob/master/src/tm_mad/lvm/tm_clone.sh#L70 Regards, Jaime On Thu, Dec 15, 2011 at 9:52 AM, Prakhar Srivastava <prakhar....@gmail.com>wrote: > Hi, > It appears that you are using the tm_ssh transfer drivers. Use tm_lvm > transfer manager drivers instead. > > Prakhar > > > On Thu, Dec 15, 2011 at 2:01 PM, Tengvall, Ilkka (NSN - FI Espoo) < > ilkka.tengv...@nsn.com> wrote: > >> Hi, >> >> I'm writing related to issue: >> >> http://dev.opennebula.org/issues/1025 >> >> Ruben, thanks for answer, you commented there that iscsi could be used >> as a disk: >> >> "you should be able to use iSCSI block devices with >> DISK=[TYPE=block,SOURCE=<path_to_dev>....]." >> >> I tried to follow you instruction, I don't see it working. What am I >> missing, since the oned tries to cp the iscsi image, instead as pass it >> to guest as disk: >> >> -------------------------------- >> $ cat >> iscsi-vm.txt >> >> NAME=f16-min-iscsi >> USER=oneadmin >> GROUP=oneadmin >> PUBLIC=No >> >> DISK=[ >> BUS=virtio, >> TYPE=block, >> >> >> SOURCE=/dev/disk/by-path/ip-192.168.117.1:3260-iscsi-iqn.2009-02.net.nsn-net:whipper.f16-min-lun-0 >> ] >> GRAPHICS=[ >> KEYMAP=fi, >> TYPE=vnc ] >> INPUT=[ >> BUS=usb, >> TYPE=mouse ] >> MEMORY=512 >> NIC=[ >> NETWORK_ID=1, >> WHITE_PORTS_TCP=22 ] >> OS=[ >> ARCH=x86_64, >> BOOT=hd ] >> RAW=[ >> TYPE=kvm ] >> VCPU=1 >> -------------------------------- >> >> Creating the machine using the disk: >> >> -------------------------------- >> $ onevm create iscsi-vm.txt >> ID: 10 >> -------------------------------- >> >> and after it fails I see from the logs that it tried to copy the image >> (cp), instead of passing it to libvirt as a virtio device: >> >> -------------------------------- >> Thu Dec 15 10:26:09 2011 [DiM][I]: New VM state is ACTIVE. >> Thu Dec 15 10:26:09 2011 [LCM][I]: New VM state is PROLOG. >> Thu Dec 15 10:26:09 2011 [VM][I]: Virtual Machine has no context >> Thu Dec 15 10:26:09 2011 [TM][I]: Command execution fail: >> /usr/lib/one/tm_commands/shared/tm_clone.sh >> >> /dev/disk/by-path/ip-192.168.117.1:3260-iscsi-iqn.2009-02.net.nsn-net:whipper.f16-min-lun-0 >> onebula:/var/lib/one//10/images/disk.0 >> Thu Dec 15 10:26:09 2011 [TM][D]: tm_clone.sh: >> >> /dev/disk/by-path/ip-192.168.117.1:3260-iscsi-iqn.2009-02.net.nsn-net:whipper.f16-min-lun-0 >> onebula:/var/lib/one//10/images/disk.0 >> Thu Dec 15 10:26:09 2011 [TM][D]: tm_clone.sh: DST: >> /var/lib/one//10/images/disk.0 >> Thu Dec 15 10:26:09 2011 [TM][I]: tm_clone.sh: Creating directory >> /var/lib/one//10/images >> Thu Dec 15 10:26:09 2011 [TM][I]: tm_clone.sh: Executed "mkdir -p >> /var/lib/one//10/images". >> Thu Dec 15 10:26:09 2011 [TM][I]: tm_clone.sh: Executed "chmod a+w >> /var/lib/one//10/images". >> Thu Dec 15 10:26:09 2011 [TM][I]: tm_clone.sh: Cloning >> 3260-iscsi-iqn.2009-02.net.nsn-net:whipper.f16-min-lun-0 >> Thu Dec 15 10:26:09 2011 [TM][E]: tm_clone.sh: Command "cp -r >> 3260-iscsi-iqn.2009-02.net.nsn-net:whipper.f16-min-lun-0 >> /var/lib/one//10/images/disk.0" failed. >> Thu Dec 15 10:26:09 2011 [TM][E]: tm_clone.sh: cp: cannot stat >> `3260-iscsi-iqn.2009-02.net.nsn-net:whipper.f16-min-lun-0': No such file >> or directory >> Thu Dec 15 10:26:09 2011 [TM][E]: Error copying >> >> /dev/disk/by-path/ip-192.168.117.1:3260-iscsi-iqn.2009-02.net.nsn-net:whipper.f16-min-lun-0 >> to onebula:/var/lib/one//10/images/disk.0 >> Thu Dec 15 10:26:09 2011 [TM][I]: ExitCode: 1 >> Thu Dec 15 10:26:09 2011 [TM][E]: Error excuting image transfer script: >> Error copying >> >> /dev/disk/by-path/ip-192.168.117.1:3260-iscsi-iqn.2009-02.net.nsn-net:whipper.f16-min-lun-0 >> to onebula:/var/lib/one//10/images/disk.0 >> Thu Dec 15 10:26:09 2011 [DiM][I]: New VM state is FAILED >> -------------------------------- >> >> Thanks for the answer so far. >> >> >> On 2011-12-12 15:33, ext Tengvall, Ilkka (NSN - FI Espoo) wrote: >> > Hi, >> > >> > I'm new to Open Nebula, and have some questions. First one would be >> > about iscsi support. I can't find any reference from oned documents >> > itself about iscsi. Is it possible to configure guests using iscsi lun >> > from remote server as a os block device? >> > >> > I have done it using libvirt, so it works, but how to map this to oned >> > configs? >> > >> > another way which would also work would be booting kernel directly or >> > via ipxe and give it iscsi as a root device. Both of those work too. >> > >> > Is there a way to do this in oned? >> > >> > I found an old related posting here, but I don't know if it ever led to >> > anything: >> > >> > >> http://lists.opennebula.org/htdig.cgi/users-opennebula.org/2009-July/000599.html >> > >> >> >> -- >> Ilkka Tengvall >> Senior Specialist, Linux & Virtualization Architecture >> >> _______________________________________________ >> Users mailing list >> Users@lists.opennebula.org >> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org >> > > > _______________________________________________ > Users mailing list > Users@lists.opennebula.org > http://lists.opennebula.org/listinfo.cgi/users-opennebula.org > > -- Jaime Melis Project Engineer OpenNebula - The Open Source Toolkit for Cloud Computing www.OpenNebula.org | jme...@opennebula.org
_______________________________________________ Users mailing list Users@lists.opennebula.org http://lists.opennebula.org/listinfo.cgi/users-opennebula.org