#!/usr/bin/env herodo
// Virt-What Detection Demo

print("Detecting virtualization environment...");
let virt = virt_what();

print(`Platform: ${virt.platform}`);
print(`Virtualized: ${virt.is_virtualized}`);

if virt.virtualization_type != () {
    print(`Virtualization Type: ${virt.virtualization_type}`);
}

if virt.hypervisor != () {
    print(`Hypervisor: ${virt.hypervisor}`);
}

if virt.container != () {
    print(`Container: ${virt.container}`);
}

if !virt.is_virtualized {
    print("Environment: Bare Metal");
} else {
    print("Environment: Virtualized");
}
