diff --git a/QemuVmManager.Services/VmManagementService.cs b/QemuVmManager.Services/VmManagementService.cs index 53f73ef..2464f0e 100644 --- a/QemuVmManager.Services/VmManagementService.cs +++ b/QemuVmManager.Services/VmManagementService.cs @@ -380,17 +380,27 @@ public class VmManagementService try { var json = File.ReadAllText(configFile); + Console.WriteLine($"Loading config from {configFile}"); + Console.WriteLine($"JSON content: {json}"); + var config = JsonSerializer.Deserialize(json); if (config != null && !string.IsNullOrWhiteSpace(config.Name)) { + Console.WriteLine($"Successfully loaded VM: {config.Name}"); + Console.WriteLine($"Network interfaces count: {config.Network?.Interfaces?.Count ?? 0}"); _vmConfigurations[config.Name] = config; } + else + { + Console.WriteLine($"Failed to deserialize config from {configFile}: config is null or has no name"); + } } catch (Exception ex) { // Log error but continue loading other configurations Console.WriteLine($"Failed to load configuration from {configFile}: {ex.Message}"); + Console.WriteLine($"Exception details: {ex}"); } } } diff --git a/port-forwards.json b/port-forwards.json new file mode 100644 index 0000000..b1e480a --- /dev/null +++ b/port-forwards.json @@ -0,0 +1,9 @@ +[ + { + "VmName": "ubuntu-desktop", + "HostPort": 8080, + "VmPort": 80, + "Protocol": "TCP", + "Created": "2025-08-31T23:55:53.202737Z" + } +] \ No newline at end of file