Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Background

  • Provisioning module objects are created by State.pm::initialize() when a new state object is created.
  • Provisioning module objects are available within state modules
  • Provisioning module objects are not available within other types of modules for safety.

Provisioning Module Subroutines

It is highly recommended that all provisioning modules implement the following subroutines.  There may be many additional subroutines implemented within a provisioning module.  These will not be called by any of the core VCL modules.

  • capture
  • load
  • power_off
  • power_on
  • power_reset
  • get_current_image
  • get_image_size

  

...

capture
Anchor
capture
capture

  • Description
    • ...
  • Expected Beginning State
    • ...
  • Expected Ending State
    • ...
  • Called By
    • ...
  • Arguments & Calling Environment
    • Must only be called as an object method of a provisioning object ($provisioner->pre_capture()) 
    • No Arguments
  • Return Values
    • 1
      • ...
    • 0
      • ...
    • Undefined
      • ...

load
Anchor
load
load

  • Description
    • ...
  • Expected Beginning State
    • ...
  • Expected Ending State
    • ...
  • Called By
    • ...

...

  • Description
    • Configures the OS so that it can be captured by a provisioning module.
    • Configures the OS so that it will successfully boot after the captured image is reloaded on another resource.
    • Adds and configures drivers so that the image will load on other resources.
    • Removes files which should not be saved in the image.
    • Examples of tasks performed by the pre_capture subroutine:
      • Log off users which were created for the imaging reservation and delete the accounts
      • Set root and administrator passwords to standard, known values 
      • Disable and delete page or swap files
      • Delete temp files
      • Copy scripts and utilities to the computer which are required after the computer boots up but before it has network connectivity
      • Copy drivers to the computer
      • Run a generalization or sealing utility such as Sysprep.exe
  • Expected Beginning State
    • Resource is up and accessible
    • Administrator has configured the resource
    • Administrator may or may not have logged out
  • Expected Ending State
    • (Default) Resource is shut down and turned off
    • Image captured of resource can be loaded and booted on other hardware
    • Loaded image will successfully boot up, establish network connectivity, and be accessible by the OS module's post_load() subroutine
  • Called By
    • Provisioning module's capture() subroutine
  • Arguments & Calling Environment
    • Must only be called as an object method of an OS object ($osa provisioning object ($provisioner->pre_capture()) 
    • Optional Argument:
      • Name: end_state
      • Type: hash reference
      • Description:
        • Instructs pre_capture() to leave the resource in a particular state after the subroutine's tasks are complet instead of shutting down the resource.
      • Possible Values:
        • on - Leave the resource on.  Do not shut it down or reboot it.
        • off (Default) - Shut the resource down.
        • reboot - Initiate a reboot and return.
    • No Arguments
  • Return Values
    • 1
      • ...
    • 0
      • ...
    • Undefined
      • ...

power_off
Anchor
power_off
power_off

  • Description
    • ...
  • Expected Beginning State
    • ...
  • Expected Ending State
    • ...
  • Called By
    • ...
  • Arguments & Calling Environment
    • Must only be called as an object method of a provisioning object ($provisioner->pre_capture()) 
    • No Arguments
  • Return Values
    • 1
      • ...
    • 0
      • ...
    • Undefined
      • ...

power_on
Anchor
power_on
power_on

  • Description
    • ...
  • Expected Beginning State
    • ...
  • Expected Ending State
    • ...
  • Called By
    • ...
  • Arguments & Calling Environment
    • Must only be called as an object method of a provisioning object ($provisioner->pre_capture()) 
    • No Arguments
  • Return Values
    • 1
      • ...
    • 0
      • ...
    • Undefined
      • ...

get_current_image
Anchor
get_current_image
get_current_image

  • Description
    • ...
  • Expected Beginning State
    • ...
  • Expected Ending State
    • ...
  • Called By
    • ...
  • Arguments & Calling Environment
    • Must only be called as an object method of a provisioning object ($provisioner->pre_capture()) 
    • No Arguments
  • Return Values
    • 1
      • ...
    • 0
      • ...
    • Undefined
      • ...

get_image_size 
Anchor
get_image_size
get_image_size

  • Description
    • ...
  • Expected Beginning State
    • ...
  • Expected Ending State
    • ...
  • Called By
    • ...
  • Arguments & Calling Environment
    • Must only be called as an object method of a provisioning object ($provisioner->pre_capture()) 
    • No Arguments
  • Return Values
    • 1
      • ...
    • 0
      • ...
    • Undefined
      • ..
    Return Values
    • 1
      • All pre_capture tasks completed successfully.
      • Resource was either shut down or left in the state specified by the end_state argument.
      • Provisioning module can proceed to capture the image.
    • 0
      • Resource OS could not be completely prepared to be captured.
      • Provisioning module should not proceed to capture the image.