ISCSI Target Windows API

1.1k Views Asked by At

I'm a newbie My boss asked me make a iscsi target server by C++ using windows api (run on windows server 2012) project requirements - create iscsi target - connect target with a vhd I was find alot, but only fond

iSCSI Discovery Library Functions

Volume Shadow Copy API Interfaces

i was created a file .vhd anh truy with WINAPI AddIscsiStaticTarget windows api but cannot add into "File and storage service"

Thank you and Best Regards

Sr because my english

2

There are 2 best solutions below

2
On BEST ANSWER

The first link in your question is to the API for configuring the iSCSI client component, not the iSCSI server component.

The second link is to the Volume Shadow Copy API, which I don't think is relevant either. That's used for the intelligent snapshotting of volumes, usually in order to run a backup.

To manipulate the iSCSI target server component, use the iSCSI Target Server Provider API.

Since you're dealing with a VHD file, you might also need the Virtual Hard Disk API.

0
On

It is a lot of work to write an iSCSI target. I have written both target and initiator ... the initiator and be very simple if it wants and can be written very easy. But if the target usually has to work with lots of initiators which make it much more difficult to write. Given that, if you write your own very simple initiator then you could write a simple target which only works with your initiator.