-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
Former user of Xen and newbie in kvm/qemu/libvirt stuff, I give it a try
on my network ;-)
I need to run a VM with iSCSI target attached.
I did it this way :
1) Creation of iscsi pool (equa.xml) :
<pool type="iscsi">
<name>equalog</name>
<source>
<host name="10.10.0.1"/>
<device
path="iqn.2001-05.com.equallogic:0-8a0906-4992c7f05-39c000000114b8fc-vglog"/>
</source>
<target>
<path>/dev/disk/by-path</path>
</target>
</pool>
This pool start smoothly (when open-iscsi started), no problems. An
entry is created in /dev/disk/by-path/ related to iscsi target.
2) I flagged it autostart :
root@sandi:~# virsh pool-autostart equalog
Pool equalog marked as autostarted
root@sandi:~# virsh pool-list
Name State Autostart
- -----------------------------------------
equalog active yes
3) In my guest VM, I have following section :
<disk type='block' device='disk'>
<driver name='qemu'/>
<source
dev='/dev/disk/by-path/ip-10.10.0.1:3260-iscsi-iqn.2001-05.com.equallogic:0-8a0906-4992c7f05-39c000000114b8fc-vglog-lun-0'/>
<target dev='vdc' bus='virtio'/>
<alias name='virtio2'/>
<address type='pci' domain='0x0000' bus='0x00'
slot='0x06'
function='0x0'/>
</disk>
When I start VM, iscsi target is availaible.
The snag is that when I reboot the host, the pool is not automatically
started (making it impossible to autostart VM relying on this iscsi volume).
I verified that open-iscsi is started first. Startup script is localised
in /etc/rcS.d which is prior to /etc/rc2.d (my default runlevel).
Libvirtd is started in rc2.d and not mentionned in rcS.d.
My questions are :
- - Is this the correct way to attach iscsi volume to a guest ?
- - Did I missed something to have iscsi pool autostart working at boot
time ?
My environement :
Debian Squeeze 64 bits
root@sandi:~# virsh -v
0.7.6
root@sandi:~# /usr/sbin/libvirtd --version
/usr/sbin/libvirtd (libvirt) 0.7.6
Thanks for your attention,
- --
Nicolas Greneche - RSSI et Sysadmin
Centre de Ressources Informatiques (CRI)
Doctorant au sein du projet SDS -
www.sds-project.fr
Mail : nicolas.greneche_(at)_univ-orleans.fr
GPG :
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x5FEBD0EF
Universite d'Orleans Web :
http://blog.garnett.fr
Batiment 3IA - 2e etage Tel : 02 38 49 25 26
6 rue Leonard de Vinci
BP 6102 45061 ORLEANS Cedex 2
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla -
http://enigmail.mozdev.org
iEYEARECAAYFAkugsQsACgkQTx/Y+1/r0O90NACeMvgK2mA4EUaB+JzA7v6+xQxO
jNsAmwSIh428gtZRa2jVkekyYBTpVVJK
=ltP0
-----END PGP SIGNATURE-----