Class ImageTemplateRestartCustomizer


  • public final class ImageTemplateRestartCustomizer
    extends ImageTemplateCustomizer
    Reboots a VM and waits for it to come back online (Windows). Corresponds to Packer windows-restart provisioner.
    • Constructor Detail

      • ImageTemplateRestartCustomizer

        public ImageTemplateRestartCustomizer()
    • Method Detail

      • restartCommand

        public String restartCommand()
        Get the restartCommand property: Command to execute the restart [Default: 'shutdown /r /f /t 0 /c "packer restart"'].
        Returns:
        the restartCommand value.
      • withRestartCommand

        public ImageTemplateRestartCustomizer withRestartCommand​(String restartCommand)
        Set the restartCommand property: Command to execute the restart [Default: 'shutdown /r /f /t 0 /c "packer restart"'].
        Parameters:
        restartCommand - the restartCommand value to set.
        Returns:
        the ImageTemplateRestartCustomizer object itself.
      • restartCheckCommand

        public String restartCheckCommand()
        Get the restartCheckCommand property: Command to check if restart succeeded [Default: ''].
        Returns:
        the restartCheckCommand value.
      • withRestartCheckCommand

        public ImageTemplateRestartCustomizer withRestartCheckCommand​(String restartCheckCommand)
        Set the restartCheckCommand property: Command to check if restart succeeded [Default: ''].
        Parameters:
        restartCheckCommand - the restartCheckCommand value to set.
        Returns:
        the ImageTemplateRestartCustomizer object itself.
      • restartTimeout

        public String restartTimeout()
        Get the restartTimeout property: Restart timeout specified as a string of magnitude and unit, e.g. '5m' (5 minutes) or '2h' (2 hours) [Default: '5m'].
        Returns:
        the restartTimeout value.
      • withRestartTimeout

        public ImageTemplateRestartCustomizer withRestartTimeout​(String restartTimeout)
        Set the restartTimeout property: Restart timeout specified as a string of magnitude and unit, e.g. '5m' (5 minutes) or '2h' (2 hours) [Default: '5m'].
        Parameters:
        restartTimeout - the restartTimeout value to set.
        Returns:
        the ImageTemplateRestartCustomizer object itself.