Comment 5 for bug 1540965

Robert C Jennings (rcj) wrote :

SmartOS: Add support for Joyent LX-Brand Zones

LX-brand zones on Joyent's SmartOS use a different metadata source
(socket file) than the KVM-based SmartOS virtualization (serial port).
This patch adds support for recognizing the different flavors of
virtualization on SmartOS and setting up a metadata source file object.
After the file object is created, the rest of the code for the datasource
can remain common.

This patch reads the metadata byte-by-byte rather than using readline
because we can not perform a readline on the file-like object for the
socket as this block indefintely waiting for an EOF that is will not be
sent by the host platform. This patch also moves to V2 metadata as it
provides checksum validation and makes reading the metadata much more