feat: Implement VM console with dedicated layout, WMKS integration, and jQuery 3 compatibility.
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
require __DIR__.'/vendor/autoload.php';
|
||||
$app = require_once __DIR__.'/bootstrap/app.php';
|
||||
$app->make(\Illuminate\Contracts\Console\Kernel::class)->bootstrap();
|
||||
|
||||
$vCenter = app(\App\Http\Services\vCenter::class);
|
||||
$vm = \App\Models\VirtualMachines::with('datacenter.vCenter')->first();
|
||||
|
||||
if (!$vm) {
|
||||
echo "No VM found\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
$vcenter_model = $vm->datacenter->vCenter;
|
||||
echo "Logging in to vCenter: " . $vcenter_model->host . "\n";
|
||||
$loggedIn = $vCenter->loginServer($vcenter_model);
|
||||
|
||||
if (!$loggedIn) {
|
||||
echo "Failed to login to vCenter\n";
|
||||
exit;
|
||||
}
|
||||
echo "Logged in successfully\n";
|
||||
|
||||
$ticket = $vCenter->GetConsoleTickets($vm->vm_id);
|
||||
print_r($ticket);
|
||||
Reference in New Issue
Block a user