Since the CreateSnapshot() extrinsic has 2 vendor defined values added
for SnapshotType parameter, I think the method should be overridden to
define these new values. The attached patch does so by creating a new
class Virt_VirtualSystemSnapshotService where CreateSnapshot is
overridden. The various virtualizer flavors then inherit from
Virt_VirtualSystemSnapshotService instead of
CIM_VirtualSystemSnapshotService directly.
Some tools will parse the class info and format gui based on qualifiers
it finds. In the case of CreateSnapshot, such tools will not display
the vendor additions unless we override the method and describe the
additions.
While on the subject, I would like to understand the usefulness of
SnapshotType 32768. This type will save the vm's memory state and
subsequently restore the vm. IMO applying this memory snapshot later
would be quite dangerous. The vm has since been running and the disk
state will be quite different from when the memory snapshot was taken.
Does this make sense or am I not thinking clearly :-)?
Finally, invoking CreateSnapshot with SnapshotType 32769 will save the
vm and leave it powered off. Querying EnabledState shows the vm
'Enabled but Offline' (suspended). According to System Virtualization
Profile, one should be able to move a vm in this state to Enabled by
invoking RSC(Enabled) but doing so results in "snapshot exists, apply
snapshot" error. So the behavior diverges from the spec IMO. It seems
the current behavior of SnapshotService should just be implemented via
RSC. CreateSnapshot -> RSC(Enabled but Offline), ApplySnapshot ->
RSC(Enabled)
Regards,
Jim