Issue #9482 has been updated by Jeff Weiss.

Assignee changed from shubhra sinha varma to Hailee Kenney
Target version changed from 1.6.x to 2.1.0

Hailee, if you can do something with this, great.  If not, please remove the 
target version.
----------------------------------------
Bug #9482: Fact virtual and is_virtual  wrong for Solaris VM inside KVM/QEMU
https://projects.puppetlabs.com/issues/9482#change-63758

Author: Kent Holloway
Status: Code Insufficient
Priority: Normal
Assignee: Hailee Kenney
Category: library
Target version: 2.1.0
Keywords: 
Branch: [email protected]:ssvarma/facter.git
Affected Facter version: 1.5.8


Solaris VM's show up as physical when running inside a KVM/QEMU hypervisor.
<pre>
# facter virtual is_virtual
is_virtual => false
virtual => physical

# facter -v
1.5.8

# uname -a
SunOS myhostname 5.10 Generic_142910-17 i86pc i386 i86pc

# prtdiag
System Configuration: Red Hat KVM
BIOS Configuration: Seabios 0.5.1 01/01/2007
</pre>

Attached is a one line fix which uses the already gathered output from prtdiag 
and fixes the output of both virtual and is_virtual when run.
<pre>
--- virtual.rb  Tue Sep 13 15:53:06 2011
+++ virtual_new.rb      Tue Sep 13 15:56:55 2011
@@ -61,6 +61,7 @@
                     if not output.nil?
                         output.each_line do |pd|
                             result = "vmware" if pd =~ /VMware|Parallels/
+                           result = "kvm" if pd =~ /KVM/
                         end
                     end
                 end
</pre>

--After patch applied--
<pre>
# facter virtual is_virtual
is_virtual => true
virtual => kvm
</pre>


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to