Remove VM from soli...
 
Notifications
Clear all

Remove VM from solidCP , reflect on hyper-v console but keep it's folder with disk

Page 2 / 4

MohammedSalah
Posts: 15
Topic starter
(@mohammedsalah)
Active Member
Joined: 4 years ago

so it's bug issue in SolidCP and not recovered on latest update.

Reply
Genadij
Posts: 103
(@berkut)
Estimable Member
Joined: 5 years ago

Show all logs when deleting a VM. From the SolidCP website and from the Windows event logs (in ASP.net and SolidCP categories)

Also, please show the result of this command: (you must run it in PowerShell where SolidCP Enterprise is installed)

Invoke-Command -ComputerName "RemoteHypervName" -ScriptBlock { Remove-item -path "full/Path/To/TheVps/Disk.vhdx" }
Reply
TechGuy
Posts: 205
(@hxkd)
Estimable Member
Joined: 5 years ago

ok so here is an interesting one, we moved our enterprise and portal to a vps which is not part of the domain of the hyperv servers, so when I tried executing the command it gave an error re authentication, I then tested the same access from the proxy hyperv server running standard windows and it could access all the servers fine, so the winrm was unable to access from the server running enterprise server, we then added the servers to the trusted hosts in winrm and this resolved the authentication issue. after that I could then run the command and the disk was deleted fine manually.

So I was hoping that this resolved the deletion issue, however i created a vm and tried to delete it, it runs through the whole process fine removes it from solidcp, but the hard disk file still remains and so does the server folder, etc that solid cp creates. Looking in the solidcp logs, indicates no error at all

0000 Deleting virtual machine
0001 Deleting VPS folder: d:\Hyper-V\koosie\koosie-1003
0002 The VM was deleted.
Looking on the windows folder on the server running enterprize and portal, does not have any log file entries relating to this vps creation /deletion.
Looking on the vm server logs doesnt indicate any error related to this creation or deletion of the server
However on the proxy server the windows cp log indicates this error :
[5/19/2022 1244 PM] WARNING: HostedSolution Invoke error: A positional parameter cannot be found that accepts argument 'Hard'.
now this looks like it might be related to the naming of the Virtual Hard Disks folder name possibly ? I seen some weird errors on windows where if you dont encapsulate the command in inverted commas it sees the space as a seperate value or subcommand and tries to execure just the virtual part as the path and sees Hard Disks as parameters.
This is the only error seen on all the machines, there is no further related log entries other than this..
Reply
TechGuy
Posts: 205
(@hxkd)
Estimable Member
Joined: 5 years ago

Other than that the issue with the enterprise server running on a non domain server doesnt have any issues creating machines, or hosting accounts accross the hyperv vms etc, but my question would be is it or would it be reccomended to have the enterprise server on a domain linked server ?  basically the hyper v servers host web servers, nmail and dbs servers, and then we create a vms for clients etc, everything is 100% ok except for this drive deletion issue. so not sure what is reccomended, to be quite honest I dont know how we missed this powershell issue from this server to the rest, but adding the trusted hosts in resolved the auth issues to all the remotes. but This doesnt seem to be the issue causer of the drive deletion problem.

Reply
Genadij
Posts: 103
(@berkut)
Estimable Member
Joined: 5 years ago

Thanks TechGuy. Finally someone shows the logs which helps to identify what the problem is.

That commit should fix the problem https://github.com/FuseCP/SolidCP/pull/98/commits/30394b81af99e390adfeefc5928e4c392efff3b9

If you have the opportunity to rebuild the source code with this fix and re-test it on your side, I will be grateful.

About the domain, etc. If you are using Remote Hyper, then the SolidCP user (Windows account) must have all required rights and be in a domain if you are using a domain. However, after the fix, you can check how it works without a domain 🙂

Reply
1 Reply
TechGuy
(@hxkd)
Joined: 5 years ago

Estimable Member
Posts: 205

@berkut Hi,

which version of visual studio and .net framework are you using, I am on windows 11 with .net 4.8 and visual studio 2022, when I build the project it bitches about the targeted framework of 4.5, I tried changing it to 4.8 but it runs errors. I am now trying to install visual studio 19, maybe you can advise firther what I need to do or can do..

 

Reply
Page 2 / 4
Share: