This document describes the enhancements made to the Pure Storage Simulator based on actual log files from real Pure Storage arrays.
The simulator now includes:
- Complete command set from actual Pure Storage logs
- USB drive version management - ability to specify different Purity versions
- Configurable hard drive sizes - extensible system for future drive size selection
- Enhanced virtual file system - including chmod, chown, and other Linux commands
The USB port can now simulate different versions of Purity OS, allowing testing of various upgrade scenarios.
The USBPort class now includes:
public string purityVersionOnDrive = "6.5.8"; // Default version
// Method to change Purity version
public void SetPurityVersion(string version)
// Method to get current version
public string GetPurityVersion()In Unity editor or at runtime:
// Change USB drive to contain Purity 6.6.0
usbPort.SetPurityVersion("6.6.0");
// This will automatically update the files to:
// - purity_6.6.0.ppkg
// - purity_6.6.0.ppkg.sha1To add a UI for version selection:
- Create a dropdown menu in Unity
- Populate with available versions
- Call
SetPurityVersion()when user selects a version - The files will automatically update
Hard drives now have extensible size configuration, allowing different capacities to be simulated and reflected in all command outputs.
The HardDrive class includes:
public double StorageSpace; // Size in MB
// New helper methods:
public void SetStorageSize(double sizeInMB)
public string GetFormattedSize()
public double GetSizeInTB()
public double GetSizeInGB()
public double GetSizeInMB()// Set drive to 2TB
hardDrive.SetStorageSize(2000000); // 2,000,000 MB = 2TB
// Or use Init() method
hardDrive.Init(chassis, 2000000, 0, "CH0.BAY0", HardDriveStatus.healthy);Drive sizes automatically appear in:
puredrive listcommand outputdfcommand output (via VirtualHardwareManager)lsblkcommand output- Any other command that shows drive information
To add a UI for drive size selection:
- Create a dropdown or slider in Unity for each drive bay
- Options could include: 1.92TB, 3.84TB, 7.68TB, 15.36TB, etc.
- Call
SetStorageSize()when user selects a size - All command outputs will automatically reflect the new size
Based on actual log files, the following commands are now supported:
purearray list- List arrayspurearray list --controller- List controller statuspurearray phonehome --send-today- Send phonehome datapurearray phonehome --send-dotoday- Send phonehome datapurearray remoteassist --connect- Connect remote assistancepurearray remoteassist --status- Check remote assistance status
purenetwork list- List all network interfacespurenetwork eth list- List Ethernet interfaces with detailspurenetwork fc list- List Fibre Channel interfaces with details
purehw list- List all hardware componentspurehw list --type pwr- List power supplies only
puremessage list --open- List open messages/alertspuremessage list --open --hidden- List open and hidden messages
purealert tag --timeout <time> --maintenance- Tag system for maintenancepurealert untag --maintenance- Remove maintenance tag
pureport list --initiator- List port initiator connections
puretune --list- List tunable parameters
puredb- Database query commands (basic support)
iobalance --sampletime <seconds>- Show I/O balance across controllers
purevol list- List volumespurevol list --connect- List volume connectionspurevol list --pending- List pending volumespurevol list --snap- List snapshotspurevol list --protocol-endpoint- List protocol endpoints
puremastership list- List mastership status
Change file permissions (basic simulation)
chmod 755 /path/to/file
chmod +x script.shChange file ownership (requires root)
chown user:group /path/to/file
chown pureeng:pureeng /home/pureeng/file.txtAll command outputs are based on actual Pure Storage array logs, ensuring realistic simulation.
Name Address Netmask Gateway MTU Enabled
eth0 192.168.1.100 255.255.255.0 192.168.1.1 1500 True
eth1 192.168.1.101 255.255.255.0 192.168.1.1 1500 True
eth2 192.168.2.100 255.255.255.0 192.168.2.1 9000 True
eth3 - - - 1500 False
Sampling I/O balance...
Controller Read IOPS Write IOPS Read BW Write BW
CT0 2453 5671 234MB/s 456MB/s
CT1 2389 5823 228MB/s 467MB/s
Shows actual drive sizes as configured:
Name Type Status Size
CH0.BAY0 SSD healthy 2T
CH0.BAY1 SSD healthy 2T
CH0.BAY2 SSD healthy 3.84T
- In Unity, select a USBPort object
- In Inspector, change
purityVersionOnDriveto "6.6.0" - Insert the USB drive in simulation
- Run
ls /mntafter mounting - Verify files show:
purity_6.6.0.ppkgandpurity_6.6.0.ppkg.sha1
- In Unity, select a HardDrive object
- In Inspector, change
StorageSpaceto different values:- 1920000 for 1.92TB
- 3840000 for 3.84TB
- 7680000 for 7.68TB
- Run simulation and execute
puredrive list - Verify the size shows correctly in the output
Run each command and verify output matches expected format:
purearray phonehome --send-today
purenetwork eth list
purehw list --type pwr
puremessage list --open
pureport list --initiator
iobalance --sampletime 30
purevol list --connect
puremastership list
chmod 755 /tmp/test.sh
chown pureeng:pureeng /tmp/test.shThe implementation is designed for easy extension:
- USB Versions: Simply call
SetPurityVersion()with any version string - Drive Sizes: Call
SetStorageSize()with any size in MB - New Commands: Add to OS.cs following existing pattern
- Command Outputs: All outputs can be customized in their respective handlers
- All Linux commands (chmod, chown, etc.) integrate with VirtualFileSystem
- File permissions and ownership are tracked per file/directory
- Changes persist during the simulation session
User Input → OS.ProcessCommand() →
If Pure command: Direct handler in OS.cs
If Linux command: VirtualFileSystemHandler
If System command: VirtualHardwareManager
→ Output to CommandProcessor
- Add UI dropdown for version selection
- Support multiple USB drives with different versions
- Add validation for compatible versions
- Add UI for selecting drive capacities per bay
- Support different drive types (SSD, NVMe, etc.)
- Add drive failure simulation based on size/type
- Add more Pure Storage commands from additional logs
- Implement full puredb query support
- Add purepgroup (protection groups)
- Add pureapp (application management)
- Add purepod (pod management)
- Save/load drive configurations
- Import/export array configurations
- Replay command sequences from log files
- Generate realistic performance metrics based on drive sizes
Fixed a bug where the loop was always accessing index 1 instead of index i:
// Before:
s += " "+ _Files[1]; // Bug: always index 1
// After:
s += " "+ _Files[i]; // Correct: use loop variableThese enhancements make the Pure Storage Simulator more realistic and useful for training and testing:
- Complete command coverage from real arrays
- Version management for upgrade scenario testing
- Size configuration for capacity planning simulation
- File operations for realistic Linux experience
- Extensible design for easy future enhancements
All implementations are based on actual Pure Storage array logs, ensuring authenticity and practical value for training purposes.