diff --git a/frontend-modern/src/components/Dashboard/GuestRow.tsx b/frontend-modern/src/components/Dashboard/GuestRow.tsx
index f72e8096b..4c3bcd39a 100644
--- a/frontend-modern/src/components/Dashboard/GuestRow.tsx
+++ b/frontend-modern/src/components/Dashboard/GuestRow.tsx
@@ -69,6 +69,8 @@ export function GuestRow(props: GuestRowProps) {
});
const diskPercent = createMemo(() => {
if (!props.guest.disk || props.guest.disk.total === 0) return 0;
+ // Check if usage is -1 (unknown/no guest agent)
+ if (props.guest.disk.usage === -1) return -1;
return (props.guest.disk.used / props.guest.disk.total) * 100;
});
@@ -185,7 +187,7 @@ export function GuestRow(props: GuestRowProps) {
{/* Disk */}
0}
+ when={props.guest.disk && props.guest.disk.total > 0 && diskPercent() !== -1}
fallback={-}
>
0 && res.Status == "running" {
+ diskUsage = -1
+ }
+
// For running VMs, try to get filesystem info from guest agent
if res.Status == "running" {
// First check if agent is enabled by getting VM status
@@ -1355,6 +1361,12 @@ func (m *Monitor) pollVMsWithNodes(ctx context.Context, instanceName string, cli
diskFree := diskTotal - diskUsed
diskUsage := safePercentage(float64(diskUsed), float64(diskTotal))
+ // If VM shows 0 disk usage but has allocated disk, it's likely guest agent issue
+ // Set to -1 to indicate "unknown" rather than showing misleading 0%
+ if diskUsed == 0 && diskTotal > 0 && vm.Status == "running" {
+ diskUsage = -1
+ }
+
// If VM has guest agent enabled and is running, try to get filesystem info
if vm.Agent > 0 && vm.Status == "running" {
log.Debug().
|