1
0
Fork 0
mirror of https://github.com/Corsinvest/cv4pve-pepper.git synced 2025-02-12 10:01:53 +00:00

Improve debug

This commit is contained in:
Daniele Corsini 2020-09-09 10:17:39 +02:00
parent 543dc6b9d2
commit b95f7160c8
3 changed files with 14 additions and 2 deletions

View file

@ -102,3 +102,7 @@ root@debian:~# cv4pve-pepper --host=192.168.0.100 --username=root@pam --password
* Linux /usr/bin/remote-viewer
* Windows C:\Program Files\VirtViewer v?.?-???\bin\remote-viewer.exe
## Error
* **no spice port**: This error appears when you have not configured the display hardware on SPICE.

View file

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<Version>1.3.3</Version>
<Version>1.3.4</Version>
<TargetFramework>netcoreapp3.1</TargetFramework>
<AssemblyName>cv4pve-pepper</AssemblyName>
<Company>Corsinvest Srl</Company>

View file

@ -36,7 +36,8 @@ namespace Corsinvest.ProxmoxVE.Pepper
app.OnExecute(() =>
{
var fileName = Path.GetTempFileName().Replace(".tmp", ".vv");
var ret = SpiceHelper.CreateFileSpaceClient(app.ClientTryLogin(), optVmId.Value(), fileName);
var client = app.ClientTryLogin();
var ret = SpiceHelper.CreateFileSpaceClient(client, optVmId.Value(), fileName);
if (ret)
{
@ -75,6 +76,13 @@ namespace Corsinvest.ProxmoxVE.Pepper
ret = process.HasExited ? process.ExitCode == 0 : true;
}
}
else
{
if(!client.LastResult.IsSuccessStatusCode)
{
app.Out.WriteLine($"Error: {client.LastResult.ReasonPhrase}");
}
}
return ret ? 0 : 1;
});