Re: [virt-tools-list] [PATCH] Add detection of bhyve (FreeBSD hypervisor)

2016-10-10 Thread Richard W.M. Jones

Thanks, I've pushed this.  CC me on future patches for faster turnaround!

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
libguestfs lets you edit virtual machines.  Supports shell scripting,
bindings from many languages.  http://libguestfs.org

___
virt-tools-list mailing list
virt-tools-list@redhat.com
https://www.redhat.com/mailman/listinfo/virt-tools-list


[virt-tools-list] [PATCH] Add detection of bhyve (FreeBSD hypervisor)

2016-09-17 Thread Leonardo Brondani Schenkel
---
 Makefile.am |   1 +
 tests/bhyve/proc/cpuinfo|   0
 tests/bhyve/sbin/dmidecode  | 193 
 tests/bhyve/sbin/uname  |   2 +
 tests/bhyve/sbin/virt-what-cpuid-helper |   2 +
 tests/test-bhyve.sh |  34 ++
 virt-what.in|   7 ++
 7 files changed, 239 insertions(+)
 create mode 100644 tests/bhyve/proc/cpuinfo
 create mode 100755 tests/bhyve/sbin/dmidecode
 create mode 100755 tests/bhyve/sbin/uname
 create mode 100755 tests/bhyve/sbin/virt-what-cpuid-helper
 create mode 100755 tests/test-bhyve.sh

diff --git a/Makefile.am b/Makefile.am
index d5ee027..e32c07c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -40,6 +40,7 @@ endif
 
 TESTS = \
tests/test-baremetal.sh \
+   tests/test-bhyve.sh \
tests/test-docker.sh \
tests/test-esx4.1.sh \
tests/test-hyperv.sh \
diff --git a/tests/bhyve/proc/cpuinfo b/tests/bhyve/proc/cpuinfo
new file mode 100644
index 000..e69de29
diff --git a/tests/bhyve/sbin/dmidecode b/tests/bhyve/sbin/dmidecode
new file mode 100755
index 000..b8e4d80
--- /dev/null
+++ b/tests/bhyve/sbin/dmidecode
@@ -0,0 +1,193 @@
+#!/bin/sh -
+cat <<'EOF'
+# dmidecode 3.0
+Getting SMBIOS data from sysfs.
+SMBIOS 2.6 present.
+12 structures occupying 562 bytes.
+Table at 0x000F101F.
+
+Handle 0x0001, DMI type 0, 24 bytes
+BIOS Information
+   Vendor: BHYVE
+   Version: 1.00
+   Release Date: 03/14/2014
+   Address: 0xF
+   Runtime Size: 64 kB
+   ROM Size: 64 kB
+   Characteristics:
+   ISA is supported
+   PCI is supported
+   BIOS shadowing is allowed
+   Boot from CD is supported
+   EDD is supported
+   ACPI is supported
+   BIOS boot specification is supported
+   System is a virtual machine
+   BIOS Revision: 0.0
+
+Handle 0x0002, DMI type 1, 27 bytes
+System Information
+   Manufacturer:  
+   Product Name: BHYVE
+   Version: 1.0
+   Serial Number: None
+   UUID: 5420C3C9-6963-5F33-A700-11604F0FCDF2
+   Wake-up Type: Power Switch
+   SKU Number: None
+   Family:  
+
+Handle 0x0003, DMI type 3, 18 bytes
+Chassis Information
+   Manufacturer:  
+   Type: Unknown
+   Lock: Not Present
+   Version: 1.0
+   Serial Number: None
+   Asset Tag: None
+   Boot-up State: Safe
+   Power Supply State: Safe
+   Thermal State: Safe
+   Security Status: None
+   OEM Information: 0x
+
+Handle 0x0004, DMI type 4, 42 bytes
+Processor Information
+   Socket Designation: CPU #0
+   Type: Central Processor
+   Family: Other
+   Manufacturer:  
+   ID: 00 00 00 00 00 00 00 00
+   Version:  
+   Voltage: Unknown
+   External Clock: Unknown
+   Max Speed: Unknown
+   Current Speed: Unknown
+   Status: Populated, Enabled
+   Upgrade: None
+   L1 Cache Handle: Not Provided
+   L2 Cache Handle: Not Provided
+   L3 Cache Handle: Not Provided
+   Serial Number: None
+   Asset Tag: None
+   Part Number: None
+   Characteristics:
+   64-bit capable
+
+Handle 0x0005, DMI type 4, 42 bytes
+Processor Information
+   Socket Designation: CPU #1
+   Type: Central Processor
+   Family: Other
+   Manufacturer:  
+   ID: 00 00 00 00 00 00 00 00
+   Version:  
+   Voltage: Unknown
+   External Clock: Unknown
+   Max Speed: Unknown
+   Current Speed: Unknown
+   Status: Populated, Enabled
+   Upgrade: None
+   L1 Cache Handle: Not Provided
+   L2 Cache Handle: Not Provided
+   L3 Cache Handle: Not Provided
+   Serial Number: None
+   Asset Tag: None
+   Part Number: None
+   Characteristics:
+   64-bit capable
+
+Handle 0x0006, DMI type 4, 42 bytes
+Processor Information
+   Socket Designation: CPU #2
+   Type: Central Processor
+   Family: Other
+   Manufacturer:  
+   ID: 00 00 00 00 00 00 00 00
+   Version:  
+   Voltage: Unknown
+   External Clock: Unknown
+   Max Speed: Unknown
+   Current Speed: Unknown
+   Status: Populated, Enabled
+   Upgrade: None
+   L1 Cache Handle: Not Provided
+   L2 Cache Handle: Not Provided
+   L3 Cache Handle: Not Provided
+   Serial Number: None
+   Asset Tag: None
+   Part Number: None
+   Characteristics:
+   64-bit capable
+
+Handle 0x0007, DMI type 4, 42 bytes
+Processor Information
+   Socket Designation: CPU #3
+   Type: Central Processor
+   Family: Other
+   Manufacturer:  
+   ID: 00 00 00 00 00 00 00 00
+   Version:  
+   Voltage: Unknown
+   External Clock: Unknown
+   Max Speed: Unknown
+   Current Speed: Unknown
+   Status: Populated, Enabled
+   Upgrade: None
+   L1 Cache Handle: N