[ipxe-devel] [gPXE] Booting Windows VM from iSCSI at Solaris - Comstar

Michael Brown mbrown at fensystems.co.uk
Thu Nov 4 16:10:45 UTC 2010

On Thursday 04 Nov 2010 15:42:53 Gustav Brock wrote:
> <snip>
> But I have no success in attaching the image files, neither the vmdk file
>  as is, nor a raw img file converted by either the StarWind V2V Converter
>  nor the qemu-img tool using the command:
> sbdadm create-lu /tank/data/myimage.img
> The LUN is created with no errors. Having the LUN, all that is needed is a
>  target group and a target. This all works fine. But the initiator cannot
>  "see" the original NTFS file system, thus a boot from the LUN fails.

COMSTAR requires some space in which to store iSCSI target metadata.  By 
default, it will use the first 64kB of the file you provide to store this 
information, which means that you will end up with a disk that is missing its 
first 64kB.

The easiest way to fix this is to use an external file to hold the 64kB of 
metadata.  You need to use stmfadm to create the LU, rather than sbdadm; for 
some reason sbdadm doesn't support the relevant options.  Use the command

  stmfadm create-lu --lu-prop meta=/tank/data/myimage.meta \

You may need to recreate your /tank/data/myimage.img first, since the first 64kB 
may already have been corrupted by sbdadm.

An alternative approach would be to create a zvol and dd your image to the 
zvol rather than using an image file.  This gives you the option to use ZFS 
features such as snapshots etc., and also avoids the need for an external 
metadata file.


P.S. Please use this mailing list (ipxe-devel) for further discussion.

More information about the ipxe-devel mailing list