Bug #2120

support for Facter[virtual] == vmware on Solaris systems

Added by Jim Pirzyk almost 3 years ago. Updated 3 months ago.

Status:Closed Start date:03/30/2009
Priority:Normal Due date:
Assignee:- % Done:

0%

Category:library
Target version:-
Keywords: Affected Facter version:
Branch:
Votes: 0

Description

On Solaris, dmidecode and lspci does not exist, so no Solaris VMs will have Facter[virtual] == vmware. Here is a patch to try to use the vwmare-checkvm script (that comes with vmware-tools). If the script returns a zero error code, it is within a VM.

virtual.vmware.patch (1.6 kB) Jim Pirzyk, 03/30/2009 08:17 pm

virtual.rb.patch (2.2 kB) Jim Pirzyk, 05/13/2009 02:56 pm

History

Updated by James Turnbull almost 3 years ago

  • Status changed from Unreviewed to Accepted
  • Target version set to 1.5.5

Updated by Paul Nasrat almost 3 years ago

  • Status changed from Accepted to Code Insufficient

Patch no longer applies against master, can you re-submit?

Updated by Jim Pirzyk over 2 years ago

Patch against 1.5.5rc1 Also cleaned up this error I get on sol8 and sol9 VMs.

prtdiag: not implemented on i86pc

Updated by James Turnbull over 2 years ago

Does this apply clean to current HEAD?

Updated by James Turnbull over 2 years ago

Patches should generally apply to HEAD – in this case there have been changes to virtual.rb since rc1. Can I ask you to clone the current HEAD and test your patch please.

Updated by Paul Nasrat over 2 years ago

I can look at this on Friday, and test locally.

Updated by Paul Nasrat over 2 years ago

  • Status changed from Code Insufficient to In Topic Branch Pending Review

Rebased patch for 1.5.5

Tested

pnasrat@opensolaris:~$ uname -a SunOS opensolaris 5.11 snv_101b i86pc i386 i86pc Solaris pnasrat@opensolaris:~/facter$ ruby -Ilib bin/facter virtual vmware

Available at github on tickets/master/2120 and mailed to list

Updated by Paul Nasrat over 2 years ago

  • Status changed from In Topic Branch Pending Review to Ready For Checkin

Approved on list

Please pull

Updated by James Turnbull over 2 years ago

  • Status changed from Ready For Checkin to Closed

Pushed in commit:56760d34f070db4d7bb8e5fcfb7939fe3074bf49 in branch master.

Updated by Paul Nasrat over 2 years ago

  • Status changed from Closed to Re-opened
  • Target version changed from 1.5.5 to 1.6.0

This approach is incorrect we need to make Facter::Resolution handle the Process::Status object to enable $? type checking correctly.

Updated by James Turnbull 11 months ago

  • Status changed from Re-opened to Accepted

Updated by Michael Stahnke 8 months ago

  • Target version changed from 1.6.0 to 1.6.x

Updated by James Turnbull 6 months ago

  • Category set to library

Updated by Adrien Thebo 4 months ago

  • Status changed from Accepted to Closed

The virtual fact was updated to use prtdiag to detect VMware and other virtualization types.

Updated by Ken Barber 3 months ago

  • Target version deleted (1.6.x)

Also available in: Atom PDF