From 31459f463a32dc6c1818fa1aaa3d1f56c367b718 Mon Sep 17 00:00:00 2001 From: Ronnie Sahlberg Date: Mon, 6 Aug 2012 18:24:55 +1000 Subject: iscsi: Pick default initiator-name based on the name of the VM This patch updates the iscsi layer to automatically pick a 'unique' initiator-name based on the name of the vm in case the user has not set an explicit iqn-name to use. Create a new function qemu_get_vm_name() that returns the name of the VM, if specified. This way we can thus create default names to use as the initiator name based on the guest session. If the VM is not named via the '-name' command line argument, the iscsi initiator-name used wiull simply be iqn.2008-11.org.linux-kvm If a name for the VM was specified with the '-name' option, iscsi will use a default initiatorname of iqn.2008-11.org.linux-kvm: These names are just the default iscsi initiator name that qemu will generate/use only when the user has not set an explicit initiator name via the commandlines or config files. Signed-off-by: Ronnie Sahlberg --- qemu-doc.texi | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'qemu-doc.texi') diff --git a/qemu-doc.texi b/qemu-doc.texi index f32e9e2fb9..35cabbcb9e 100644 --- a/qemu-doc.texi +++ b/qemu-doc.texi @@ -734,6 +734,11 @@ Various session related parameters can be set via special options, either in a configuration file provided via '-readconfig' or directly on the command line. +If the initiator-name is not specified qemu will use a default name +of 'iqn.2008-11.org.linux-kvm[:'] where is the name of the +virtual machine. + + @example Setting a specific initiator name to use when logging in to the target -iscsi initiator-name=iqn.qemu.test:my-initiator -- cgit v1.2.1