@php $vmRunning = $status && $status->status !== 'stopped'; @endphp

Storage Management

Manage virtual hard disks attached to your VPS. Add, configure, or remove storage drives.

@if($status && $status->status !== 'stopped')

Server Must Be Powered Off

Storage changes can only be made when the server is in a powered off state. Please shut down your server before making any storage modifications.

@endif @if($totalAllocatedStorage > $maxAllowedStorage && $maxAllowedStorage > 0)

Storage Quota Exceeded

Your server has {{ number_format($totalAllocatedStorage, 1) }} GB of storage configured, but your plan only allows {{ number_format($maxAllowedStorage, 1) }} GB. The server cannot be started until storage is reduced to within your plan limits. Please delete drives or upgrade your service to allow this configuration.

@endif

Storage Quota

{{ number_format($totalAllocatedStorage, 1) }} GB used of {{ number_format($maxAllowedStorage, 1) }} GB allocated @if(count($unusedDrives) > 0) (includes detached drives) @endif

@if($this->remainingStorage > 0 && !$vmRunning) @elseif($this->remainingStorage > 0 && $vmRunning) @endif
@php $usagePercent = $maxAllowedStorage > 0 ? min(100, ($totalAllocatedStorage / $maxAllowedStorage) * 100) : 0; $colorClass = $usagePercent < 70 ? 'bg-success' : ($usagePercent < 90 ? 'bg-warning' : 'bg-danger'); @endphp
{{ number_format($this->remainingStorage, 1) }} GB remaining {{ number_format($usagePercent, 1) }}% used

SCSI Controller

Select the SCSI controller type for SCSI drives.

@if($vmRunning && !$this->scsiControllerSynced)
VM must be stopped to change the SCSI controller type.
@endif

Attached Drives

Manage the virtual hard disks connected to your VPS.

@if(count($drives) === 0)

No drives attached to this VM.

@if($this->remainingStorage > 0 && !$vmRunning) @elseif($this->remainingStorage > 0 && $vmRunning)

Power off server to add drives

@endif
@else
@foreach($drives as $driveKey => $drive)

{{ $drive['label'] }}

{{ $driveKey }} @if($drive['ssd']) SSD @endif @if($drive['iothread']) IO Thread @endif
{{ number_format($drive['size'], 1) }} GB Cache: {{ ucfirst($drive['cache']) }} AIO: {{ $drive['aio'] }} @if($drive['discard']) Discard @endif
@if($vmRunning) @else @if(count($unusedDrives) >= 2) @else @endif @endif
@endforeach
@endif
@if(count($unusedDrives) > 0)

Detached Drives

{{ count($unusedDrives) }}/2

These drives have been detached but their data is preserved. You can reattach them or delete them permanently.

@if(count($unusedDrives) >= 2)

Maximum detached drives reached. Please reattach or delete drives before detaching more.

@endif @if($totalAllocatedStorage >= $maxAllowedStorage && $maxAllowedStorage > 0)

Storage quota reached ({{ number_format($totalAllocatedStorage, 1) }} GB / {{ number_format($maxAllowedStorage, 1) }} GB). Reattaching drives is disabled. Please upgrade your service or delete drives to allow this configuration.

@endif
@foreach($unusedDrives as $unusedKey => $unusedDrive)

{{ $unusedDrive['label'] }}

{{ $unusedKey }} @if(isset($unusedDrive['size_formatted'])) {{ $unusedDrive['size_formatted'] }} @endif
{{ $unusedDrive['volume'] }} @if(isset($unusedDrive['storage'])) Storage: {{ $unusedDrive['storage'] }} @endif
@if($vmRunning) @elseif($totalAllocatedStorage >= $maxAllowedStorage && $maxAllowedStorage > 0) @else @endif
@endforeach
@endif
@if($showAddDriveModal)

Add New Drive

@if($newDriveBus === 'scsi') SCSI provides best performance with IO thread support. Recommended for most use cases. @elseif($newDriveBus === 'virtio') VirtIO Block offers high performance but does not support SSD emulation. @elseif($newDriveBus === 'sata') SATA provides good compatibility with most operating systems. @else IDE is primarily for legacy compatibility. @endif

Maximum available: {{ number_format($this->remainingStorage, 1) }} GB

@if($status && $status->status !== 'stopped')
VM must be stopped to add new drives.
@endif
@endif @if($showEditDriveModal && $editingDriveKey && isset($drives[$editingDriveKey])) @php $editDrive = $drives[$editingDriveKey]; @endphp

Edit Drive Settings - {{ $editDrive['label'] }}

Device: {{ $editingDriveKey }}
Size: {{ number_format($editDrive['size'], 1) }} GB
Bus Type: {{ $busTypes[$editDrive['bus']]['label'] ?? ucfirst($editDrive['bus']) }}
@if(!$this->editDriveSsdSupported)

Note: SSD emulation is not available for {{ $busTypes[$editDrive['bus']]['label'] ?? ucfirst($editDrive['bus']) }} drives.

@endif @if(!$this->editDriveIothreadSupported)

Note: IO Thread is not available for {{ $busTypes[$editDrive['bus']]['label'] ?? ucfirst($editDrive['bus']) }} drives.

@endif
@endif @if($showMoveDriveModal && $movingDriveKey && isset($drives[$movingDriveKey])) @php $moveDrive = $drives[$movingDriveKey]; @endphp

Change Device Bus - {{ $moveDrive['label'] }}

Current Device: {{ $movingDriveKey }} ({{ $busTypes[$moveDrive['bus']]['label'] ?? ucfirst($moveDrive['bus']) }})

Size: {{ number_format($moveDrive['size'], 1) }} GB

Moving a drive changes its bus type. This may require reinstalling drivers in the guest OS.
@if($status && $status->status !== 'stopped')
VM must be stopped to change device bus.
@endif
@endif @if($showDetachModal && $detachingDriveKey && isset($drives[$detachingDriveKey])) @php $detachDrive = $drives[$detachingDriveKey]; @endphp

Detach Drive

Drive: {{ $detachDrive['label'] }} ({{ $detachingDriveKey }})

Size: {{ number_format($detachDrive['size'], 1) }} GB

Are you sure you want to detach this drive?

The data will be preserved but the drive will no longer be accessible to the VM until reattached.

@if($status && $status->status !== 'stopped')
VM must be stopped to detach drives.
@endif
@endif @if($showDeleteModal && $deletingDriveKey && isset($drives[$deletingDriveKey])) @php $deleteDrive = $drives[$deletingDriveKey]; @endphp

Delete Drive

Drive: {{ $deleteDrive['label'] }} ({{ $deletingDriveKey }})

Size: {{ number_format($deleteDrive['size'], 1) }} GB

Are you sure you want to DELETE this drive?

This action cannot be undone. All data on this drive will be permanently lost!

@if($status && $status->status !== 'stopped')
VM must be stopped to delete drives.
@endif
@endif @if($showReattachModal)

Reattach Drive

@if($reattachingDriveKey && isset($unusedDrives[$reattachingDriveKey]))

{{ $reattachingDriveKey }}

{{ $unusedDrives[$reattachingDriveKey]['size_formatted'] ?? 'Unknown size' }}

@endif

The drive will be reattached to the lowest available slot on the selected bus.

@if($status && $status->status !== 'stopped')
VM must be stopped to reattach drives.
@endif
@endif