How can an OpenSolaris Dom0 mount an iSCSI target and export the filesystem for a DomU? I''ve seen this done for a Linux-based Dom0 and I''m sure Solaris can do it, but I''d like to be sure before buying any hardware... Thanks, Kent
Tobias Esser
2007-Dec-02 23:17 UTC
Re: How can a Dom0 mount an iSCSI target for DomU storage?
Kent, Just use "iscsiadm" to discover the iSCSI devices within the Dom0 and then use "virt-inst" and create the DomU using the iscsi block device. I''ve used a x4500 as the iSCSI-Target and a x4200M2 as the iSCSI-Initiator. Works pretty good for me. For more infos, read here: http://docs.sun.com/app/docs/doc/819-2723/fmvcd?a=view Regards, Tobias This message posted from opensolaris.org
Kent Watsen
2007-Dec-03 00:55 UTC
Re: How can a Dom0 mount an iSCSI target for DomU storage?
Tobias Esser wrote:> Just use "iscsiadm" to discover the iSCSI devices within the Dom0 and then use "virt-inst" and create the DomU using the iscsi block device. >Excellent! - and thank you so much for responding... I had already read some documentation on how to configure Solaris to initiate an iSCSI connection, but I wasn''t sure how to make sure that it happens before Xen starts up - do you use a script to first run iscsiadm and then virtinst? Thanks again, Kent
Kent, I think you are meaning "DomU starts up" by writing "Xen starts up", correct? By using the following at the iSCSI-Initiatior (or xVM-Host) # iscsiadm add discovy-address xxx.xxx.xxx.xxx # iscsiadm modify discovery --sendtargets enable # iscsiadm list targets -S [..] You will see the list of available iSCSI-Targets on the host xxx.xxx.xxx.xxx. You will also so a local device path for that targets like "/dev/rdsk/c?t............" Use that device path for the virt-install "--file /dev/rdsk/c?t......" and you DomU will be installed on that iSCSI-Target. HTH, Tobias This message posted from opensolaris.org
Tobias Esser wrote:> Kent, > > I think you are meaning "DomU starts up" by writing "Xen starts up", correct? >Yes, that is what I meant> By using the following at the iSCSI-Initiatior (or xVM-Host) > > # iscsiadm add discovy-address xxx.xxx.xxx.xxx > # iscsiadm modify discovery --sendtargets enable > # iscsiadm list targets -S > [..] > > You will see the list of available iSCSI-Targets on the host xxx.xxx.xxx.xxx. You will also so a local device path for that targets like "/dev/rdsk/c?t............" > > Use that device path for the virt-install "--file /dev/rdsk/c?t......" and you DomU will be installed on that iSCSI-Target.Perfect! I''ll do just this when I get the system set up Thanks, Kent
OK, so I know it''s been awhile, but I finally got around to trying
to do this...
First I created and exported a zvol on the SAN machine (running b125)
and then, from the Dom0 machine (running b126), I ran:
$ pfexec iscsiadm add discovy-address xxx.xxx.xxx.xxx
$ pfexec iscsiadm modify discovery --sendtargets enable
$ pfexec iscsiadm list target -S
Target:
iqn.1986-03.com.sun:02:ff2bca93-4c18-cfab-c0ad-a694019bb8f5
Alias: tank/domu-dmz-v1 TPGT: 1
ISID: 4000002a0000
Connections: 1
LUN: 0
Vendor: SUN
Product: SOLARIS
OS Device Name:
/dev/rdsk/c0t600144F04AFEE55D000030487E438800d0s2
Following the instructions below on b126, I get:
$ pfexec virt-install --name puffy1 --hvm --ram 1024 --file
/dev/rdsk/c0t600144F04AFEE55D000030487E438800d0s2 --cdrom
/export/home/kent/cd46_amd64.iso --nographics --os-type=unix
--os-variant=openbsd4 --vcpus=1 --network bridge=nge1 --extra-args "-B
subnet-mask=255.255.255.0"
Starting install...
POST operation failed: xend_post: error from xen daemon: (xend.err
''Error creating domain: Disk image does not exist:
/dev/rdsk/c0t600144F04AFEE55D000030487E438800d0s2'')
Domain installation may not have been
successful. If it was, you can restart your domain
by running ''virsh start puffy1''; otherwise, please
restart your installation.
ERROR POST operation failed: xend_post: error from xen daemon:
(xend.err ''Error creating domain: Disk image does not exist:
/dev/rdsk/c0t600144F04AFEE55D000030487E438800d0s2'')
Traceback (most recent call last):
File "/usr/bin/virt-install", line 860, in ?
main()
File "/usr/bin/virt-install", line 754, in main
start_time, guest.start_install)
File "/usr/bin/virt-install", line 809, in do_install
dom = install_func(conscb, progresscb, wait=(not wait))
File
"/export/builds/xvm_126///proto/install/usr/lib/python2.4/site-packages/virtinst/Guest.py",
line 568, in start_install
File
"/export/builds/xvm_126///proto/install/usr/lib/python2.4/site-packages/virtinst/Guest.py",
line 660, in _do_install
File "libvirt.py", line 1077, in createLinux
if ret is None:raise libvirtError(''virDomainCreateLinux()
failed'',
conn=self)
libvirtError: POST operation failed: xend_post: error from xen daemon:
(xend.err ''Error creating domain: Disk image does not exist:
/dev/rdsk/c0t600144F04AFEE55D000030487E438800d0s2'')
Then, following the instructions listed in the Wiki,
under "Configuring an iSCSI volume, I get:
$ pfexec virt-install --name puffy1 --hvm --ram 1024 --disk
path=/alias/0/tank/domu-dmz-v1,driver=phy,subdriver=iscsi --cdrom
/export/home/kent/cd46_amd64.iso --nographics --os-type=unix
--os-variant=openbsd4 --vcpus=1 --network bridge=nge1 --extra-args "-B
subnet-mask=255.255.255.0"
Starting install...
POST operation failed: xend_post: error from xen daemon: (xend.err
''Device 768 (vbd) could not be connected. error: iSCSI disk
"/alias/0/tank/domu-dmz-v1" is not present.'')
Domain installation may not have been
successful. If it was, you can restart your domain
by running ''virsh start puffy1''; otherwise, please
restart your installation.
ERROR POST operation failed: xend_post: error from xen daemon:
(xend.err ''Device 768 (vbd) could not be connected. error: iSCSI disk
"/alias/0/tank/domu-dmz-v1" is not present.'')
Traceback (most recent call last):
File "/usr/bin/virt-install", line 860, in ?
main()
File "/usr/bin/virt-install", line 754, in main
start_time, guest.start_install)
File "/usr/bin/virt-install", line 809, in do_install
dom = install_func(conscb, progresscb, wait=(not wait))
File
"/export/builds/xvm_126///proto/install/usr/lib/python2.4/site-packages/virtinst/Guest.py",
line 568, in start_install
File
"/export/builds/xvm_126///proto/install/usr/lib/python2.4/site-packages/virtinst/Guest.py",
line 660, in _do_install
File "libvirt.py", line 1077, in createLinux
if ret is None:raise libvirtError(''virDomainCreateLinux()
failed'',
conn=self)
libvirtError: POST operation failed: xend_post: error from xen daemon:
(xend.err ''Device 768 (vbd) could not be connected. error: iSCSI disk
"/alias/0/tank/domu-dmz-v1" is not present.'')
What am I doing wrong?
Thanks,
Kent
Tobias Esser wrote:
Kent,
I think you are meaning "DomU starts up" by writing "Xen starts
up", correct?
By using the following at the iSCSI-Initiatior (or xVM-Host)
# iscsiadm add discovy-address xxx.xxx.xxx.xxx
# iscsiadm modify discovery --sendtargets enable
# iscsiadm list targets -S
[..]
You will see the list of available iSCSI-Targets on the host xxx.xxx.xxx.xxx.
You will also so a local device path for that targets like
"/dev/rdsk/c?t............"
Use that device path for the virt-install "--file /dev/rdsk/c?t......"
and you DomU will be installed on that iSCSI-Target.
HTH,
Tobias
This message posted from opensolaris.org
_______________________________________________
xen-discuss mailing list
xen-discuss@opensolaris.org