How to create a sandbox with a specific duration¶
Use --duration with whzbox create aws or whzbox create azure to request a sandbox lifetime.
Prerequisites¶
- A valid Whizlabs session or an interactive terminal for re-login
- The
whzboxbinary on yourPATH
Steps¶
1. Run create with a duration¶
whzbox accepts Go duration syntax. The current implementation allows values that round into the range 1h through 9h.
2. Verify the expiration time¶
The EXPIRES column should reflect the requested lifetime.
Verification¶
For a machine-readable check, use:
90m is rounded up before the upstream API call, so the requested lifetime becomes 2h.
Azure uses the same whole-hour rounding but has a smaller range:
Azure accepts 1h through 3h. GCP accepts only 1h.
Troubleshooting¶
Problem: the command rejects the duration¶
AWS rejects values that round below 1h or above 9h. Azure rejects values below 1h or above 3h. GCP rejects every value except 1h.
Problem: a new sandbox was not created¶
create can reuse an unexpired cached sandbox for the same provider. Check the current cache with:
If you need a fresh sandbox, destroy the current one first.