Hello Francesco,<div><br></div><div>sorry for the late response. The problem then is that the block device is not referenced in the qemu-kvm process? Can you send us the deployment file? /var/lib/one/datastores/0/<VM_ID>/deployment.0</div>

<div><br></div><div>cheers,</div><div>Jaime</div><div><br><div class="gmail_quote">On Sun, Apr 15, 2012 at 1:35 PM, Francesco Camisa <span dir="ltr"><<a href="mailto:francesco.camisa@policlinicosanmarco.it" target="_blank">francesco.camisa@policlinicosanmarco.it</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Jaime,<br>
<br>
thanks for your reply, and you clarification.<br>
<br>
I have been busy trying to debug my 3.4 installation. I was using 3.2 and decided to start from scratch to avoid upgrade issues. The host are running centos 6 64 bit. They have the same configuration that was working with 3.2.<br>


<br>
Let me first explain what I understood so far:<br>
<br>
- I register a VM image with IQN: xxx<br>
- I then deploy a VM with said IQN<br>
- when the VM is created (deployed) the iscsi target is logged in on the host and a link is created in a directory in a progressive number on the host<br>
<br>
The problem is when I deploy a VM from sunstone the machine is deployed on the host as follows (in this example the VM is deployed as "one-3":<br>
[root@phoebe ~]# ps -ef | grep one-3<br>
oneadmin 17830     1  4 13:24 ?        00:00:21 /usr/libexec/qemu-kvm -S -M rhel6.2.0 -cpu qemu32 -enable-kvm -m 2048 -smp 2,sockets=2,cores=1,threads=1 -name one-3 -uuid b1134d7a-b11f-a209-8b09-38a8d9d28304 -nodefconfig -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/one-3.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown -netdev tap,fd=27,id=hostnet0,vhost=on,vhostfd=28 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:b7:cd:86,bus=pci.0,addr=0x3 -usb -device usb-tablet,id=input0 -vnc <a href="http://127.0.0.1:3" target="_blank">127.0.0.1:3</a> -vga cirrus -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4<br>


<div class="im HOEnZb"><br>
Francesco<br>
<br>
<br>
Francesco Camisa<br>
Vice Direttore Generale<br>
Policlinico San Marco<br>
via Zanotto 40<br>
30173 Mestre-VE<br>
Italy<br>
<br>
<br>
</div><div class="HOEnZb"><div class="h5">----- Original Message -----<br>
From: "Jaime Melis" <<a href="mailto:jmelis@opennebula.org">jmelis@opennebula.org</a>><br>
To: "Francesco Camisa" <<a href="mailto:francesco.camisa@policlinicosanmarco.it">francesco.camisa@policlinicosanmarco.it</a>><br>
Cc: <a href="mailto:users@lists.opennebula.org">users@lists.opennebula.org</a><br>
Sent: Thursday, 12 April, 2012 6:40:25 PM<br>
Subject: Re: [one-users] Import iscsi images<br>
<br>
Hello Francesco,<br>
<br>
yes you can. The key is to use SOURCE=<your_iqn> in the image template instead of using PATH.<br>
<br>
Keep in mind that you need to be careful with the oneimage delete action. If you do oneimage delete, this snippet of code will get called:<br>
<a href="https://github.com/OpenNebula/one/blob/release-3.4/src/datastore_mad/remotes/iscsi/rm" target="_blank">https://github.com/OpenNebula/one/blob/release-3.4/src/datastore_mad/remotes/iscsi/rm</a><br>
<br>
<br>
RM_COMMAND=$(cat <<EOF<br>
$SUDO $(tgtadm_target_delete "$TID")<br>
$SUDO $LVREMOVE -f $VG_NAME/$LV_NAME<br>
EOF<br>
)<br>
log "Removing $DST_HOST:$DEV from the image repository"<br>
ssh_exec_and_log "$DST_HOST" "$RM_COMMAND" \<br>
"Error removing $DST_HOST:$DEV" Which would fail. I suggest you can either substitute the iscsi/rm file with an a simple 'exit 0' and manually delete the image. Or you could modify it to really remove your device, which would be the best approach.<br>


<br>
<br>
Also, I think it would be wise to substitute iscsi/mkfs with 'exit 1' so it will always fail since it won't be supported either (this will be called when doing 'oneimage create' for a TYPE = DATABLOCK image). Or same as before you could modify the script to really create an empty datablock. The same applies for the iscsi/cp command ('oneimage create' when using PATH). You could also modify it to really create an equallogic device.<br>


<br>
<br>
If you do adapt the iscsi drivers to really take action on equallogic devices, so you can create a new image, an empty datablock and delete images, please let us know so we can upload the code to the ecosystem. The files you need to modify are:<br>


<a href="https://github.com/OpenNebula/one/blob/release-3.4/src/datastore_mad/remotes/iscsi/rm" target="_blank">https://github.com/OpenNebula/one/blob/release-3.4/src/datastore_mad/remotes/iscsi/rm</a><br>
<br>
<a href="https://github.com/OpenNebula/one/blob/release-3.4/src/datastore_mad/remotes/iscsi/cp" target="_blank">https://github.com/OpenNebula/one/blob/release-3.4/src/datastore_mad/remotes/iscsi/cp</a><br>
<a href="https://github.com/OpenNebula/one/blob/release-3.4/src/datastore_mad/remotes/iscsi/mks" target="_blank">https://github.com/OpenNebula/one/blob/release-3.4/src/datastore_mad/remotes/iscsi/mks</a><br>
<br>
<br>
If you need any extra help adapting the drivers we will be happy to help you out.<br>
<br>
<br>
Cheers,<br>
Jaime<br>
<br>
<br>
On Thu, Apr 12, 2012 at 5:55 PM, Francesco Camisa < <a href="mailto:francesco.camisa@policlinicosanmarco.it">francesco.camisa@policlinicosanmarco.it</a> > wrote:<br>
> Hi,<br>
><br>
> I have installed 3.4. I have read the documentation regarding the iscsi datastore and I understand that it is tightly integrated with tgt. We don't use tgt but equallogic devices.<br>
><br>
> I was wondering if it's possible to add a pre-existing target via sunstone or oneimage providing the target ip and the iqn.<br>
><br>
> Thanks in advance<br>
><br>
> Francesco<br>
><br>
> Francesco Camisa<br>
> Vice Direttore Generale<br>
> Policlinico San Marco<br>
> via Zanotto 40<br>
> 30173 Mestre-VE<br>
> Italy<br>
><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>
<br>
--<br>
Jaime Melis<br>
Project Engineer<br>
OpenNebula - The Open Source Toolkit for Cloud Computing<br>
<a href="http://www.OpenNebula.org" target="_blank">www.OpenNebula.org</a> | <a href="mailto:jmelis@opennebula.org">jmelis@opennebula.org</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Jaime Melis<br>Project Engineer<br>OpenNebula - The Open Source Toolkit for Cloud Computing<br><a href="http://www.OpenNebula.org" target="_blank">www.OpenNebula.org</a> | <a href="mailto:jmelis@opennebula.org" target="_blank">jmelis@opennebula.org</a><br>


</div>