Bug #2120

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

Added by Jim Pirzyk over 1 year ago. Updated 4 months ago.

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

0%

Category:-
Target version:1.6.0
Keywords: 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 over 1 year ago

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

Updated by Paul Nasrat over 1 year ago

  • Status changed from Accepted to Code Insufficient

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

Updated by Jim Pirzyk over 1 year 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 1 year ago

Does this apply clean to current HEAD?

Updated by James Turnbull over 1 year 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 1 year ago

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

Updated by Paul Nasrat over 1 year ago

  • Status changed from Code Insufficient to Ready for Testing

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 1 year ago

  • Status changed from Ready for Testing to Ready for Checkin

Approved on list

Please pull

Updated by James Turnbull over 1 year ago

  • Status changed from Ready for Checkin to Closed

Pushed in commit:“56760d34f070db4d7bb8e5fcfb7939fe3074bf49” in branch master.

Updated by Paul Nasrat over 1 year 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.

Also available in: Atom PDF