Why not just add two conditions for your VM steps in the task sequence? You
could spend a ton of effort worrying about why MDT is classifying this a
certain way, or you could take 5 mins and write both queries and be done
with it.

On Wed, Oct 12, 2016 at 9:57 AM, Mote, Todd <mo...@austin.utexas.edu> wrote:

> Except when you have a mix of vmware and hyper-v vm’s.  the keyword
> “virtual” in the model when using BIOS was convenient because both had
> “virtual” in what was reported.  Now vmware is different than hyper-v.  so
> edits like Mike’s are necessary to get it right.
>
>
>
>
>
>
>
> *From:* listsad...@lists.myitforum.com [mailto:listsadmin@lists.
> myitforum.com] *On Behalf Of *DinYero Johnson
> *Sent:* Wednesday, October 12, 2016 5:36 AM
> *To:* mdtosd@lists.myitforum.com
> *Subject:* Re: [MDT-OSD] RE: VMWare EFI VMs Not Seen as Virtual Machines
>
>
>
> Perhaps it may make more sense to tweak the code to look at the Make
> variable instead and match on "VMware, Inc." which should be the same
> regardless of what ends up being reported for the Model information based
> on BIOS/EFI choice.
>
>
>
> To me, that would still fall in line with the KISS principle.
>
> *DinYero Johnson*
> ------------------------------
>
> *From:* listsad...@lists.myitforum.com <listsad...@lists.myitforum.com>
> on behalf of Marable, Mike <mmara...@med.umich.edu>
> *Sent:* Saturday, October 8, 2016 5:08 AM
> *To:* mdtosd@lists.myitforum.com
> *Subject:* RE: [MDT-OSD] RE: VMWare EFI VMs Not Seen as Virtual Machines
>
>
>
> Sorry, I got sidetracked at work.
>
>
>
> I tested both a BIOs VM as well as an EFI VM in VMWare Workstation 12.  I
> ran “wmic computersystem get model” on each.
>
>
> BIOs
>
>
> EFI
>
>
>
>
>
> Looking at the ZTIGather script this block of code is what sets the “IsVM”
> variable for VMWare machines.
>
>
>
> *ElseIf oEnvironment.Item("Model") = "VMware Virtual Platform" then*
>
>
>
> *' VMware detected*
>
>
>
> *                sVMPlatform = "VMware"*
>
> *                bIsVM = true*
>
>
>
> So because the EFI machines reports back the model as “VMware7,1” it
> doesn’t meet any of the criteria for identifying VMs and is then considered
> a physical machine.  Like Michael said, “…. Knowing VMWare…..”.
>
>
>
> I believe that by adding the following to ZTIGather it will be able to
> catch these EFI VMs.
>
>
>
> *ElseIf oEnvironment.Item("Model") = "VMware7,1" then*
>
>
>
> *                ' VMware detected*
>
>
>
> *                sVMPlatform = "VMware"*
>
> *                bIsVM = true*
>
>
>
> Of course you could get fancy and have it look for “VMware” in the model,
> but 1) that’s not how Microsoft has written the other VM checks and 2)
> personally I like to keep to the K.I.S.S. principle.
>
>
>
> Thanks
>
> Mike
>
>
>
> *From:* listsad...@lists.myitforum.com [mailto:listsadmin@lists.
> myitforum.com <listsad...@lists.myitforum.com>] *On Behalf Of *Michael
> Niehaus
> *Sent:* Friday, October 07, 2016 2:13 PM
> *To:* mdtosd@lists.myitforum.com
> *Subject:* RE: [MDT-OSD] RE: VMWare EFI VMs Not Seen as Virtual Machines
>
>
>
> Are both of the VMs using UEFI?  We’ve seen different results from VMware
> BIOS vs. VMware UEFI.  And knowing VMware, it wouldn’t surprise me if there
> were even more ways to tweak it…
>
>
>
> Thanks,
>
> -Michael
>
>
>
> *From:* listsad...@lists.myitforum.com [mailto:listsadmin@lists.
> myitforum.com <listsad...@lists.myitforum.com>] *On Behalf Of *Mote, Todd
> *Sent:* Friday, October 7, 2016 11:05 AM
> *To:* mdtosd@lists.myitforum.com
> *Subject:* RE: [MDT-OSD] RE: VMWare EFI VMs Not Seen as Virtual Machines
>
>
>
> Something has changed, but I don’t think it’s the VM.  I copied an
> existing Task Sequence in SCCM to test UEFI and Server 2016 deployments.
> My original TS that’s been working for literally years has this WMI query
> when determining VM or physical:
>
> select * from Win32_ComputerSystem where Model like '%Virtual%'
>
>
>
> My copied TS didn’t work the first time through and I ran into the same
> thing, same ESX VM I’ve used for testing for years, now reports the model
> like yours Mike.  A quick look at WMI from winpe*10* using wmic:
>
> wmic computersystem get model
>
>
>
> Returns
>
>
>
> Model
>
> VMware7,1
>
>
>
> But if I run the same command on a 2012 R2 esx vm on the same cluster
> running the same hardware version it returns
>
>
>
> Model
>
>
>
> VMware Virtual Platform
>
>
>
> The reason I used %virtual% was because I could detect either an esx vm or
> a hyper-v vm with that, because hyper-v returns
>
>
>
> Model
>
> Virtual Machine
>
>
>
> I can’t use just the one WMI query anymore to determine virtual or not if
> I use a win 10 PE boot wim.
>
>
>
> So Windows is the difference here.  “8” code base vs “10” code base that
> returns different data for the same WMI entry on the same hardware.
>
>
>
> In my experience.
>
>
>
> Todd
>
>
>
> *From:* listsad...@lists.myitforum.com [mailto:listsadmin@lists.
> myitforum.com <listsad...@lists.myitforum.com>] *On Behalf Of *Keith
> Garner
> *Sent:* Friday, October 7, 2016 11:59 AM
> *To:* mdtosd@lists.myitforum.com
> *Subject:* RE: [MDT-OSD] RE: VMWare EFI VMs Not Seen as Virtual Machines
>
>
>
> MDT ZTIGather.wsf will try to determine isVM by reading the Make/Model in
> the firmware.
>
>
>
> Specifically what does: “Get-WMIObject Win32_ComputerSystem” return from
> Powershell ( or “wmic computersystem get Manufacturer,Model” ) from within
> the Virutal Machine?
>
>
>
> *From:* listsad...@lists.myitforum.com [mailto:listsadmin@lists.
> myitforum.com <listsad...@lists.myitforum.com>] *On Behalf Of *Marable,
> Mike
> *Sent:* Friday, October 7, 2016 7:16 AM
> *To:* mdtosd@lists.myitforum.com
> *Subject:* [MDT-OSD] RE: VMWare EFI VMs Not Seen as Virtual Machines
>
>
>
> Sorry.  Having a DUH! morning today.
>
>
>
> It’s VMWare Workstation 12.1.1.
>
>
>
> My bad.
>
>
>
>
>
> *From:* listsad...@lists.myitforum.com [mailto:listsadmin@lists.
> myitforum.com <listsad...@lists.myitforum.com>] *On Behalf Of *Daniel
> Ratliff
> *Sent:* Friday, October 07, 2016 9:55 AM
> *To:* mdtosd@lists.myitforum.com
> *Subject:* [MDT-OSD] RE: VMWare EFI VMs Not Seen as Virtual Machines
>
>
>
> What specific VMWare environment? We have tested on VMWare Workstation 10
> and 11 without issue. We have tested on eSX 5.0 and 5.5 without issue as
> well.
>
>
>
> *Daniel Ratliff*
>
>
>
> *From:* listsad...@lists.myitforum.com [mailto:listsadmin@lists.
> myitforum.com <listsad...@lists.myitforum.com>] *On Behalf Of *Marable,
> Mike
> *Sent:* Friday, October 07, 2016 9:32 AM
> *To:* mdtosd@lists.myitforum.com
> *Subject:* [MDT-OSD] VMWare EFI VMs Not Seen as Virtual Machines
>
>
>
> Just a heads up.  I ran into this problem this morning trying to build a
> VMWare VM as EFI.
>
>
>
> The task sequence variable “IsVM” is not set correctly.  IsVM is set to
> “false” so logic we have in our build to bypass things like TPM management
> on VMs does not work.
>
>
>
>
>
> If the VM is set to BIOs then the variable IsVM is set properly.
>
>
>
>
>
> *Mike Marable *
>
> Microsoft Systems Engineer Lead
>
> Enterprise Device Engineering and Management
>
> MCPS, MCITP, MCTS, MCSA, MCSE, MS  [ Profile
> <http://www.mycertprofile.com/Profile/5319166625> ] [ Blog
> <http://thesystemsmonkey.wordpress.com/> ]
>
> ----------------------------------------------------
>
> *"Knowing is not enough, we must apply. Willing is not enough, we must
> do." *
>
> -Bruce Lee
>
>
>
> *"A pessimist sees the difficulty in every opportunity; an optimist sees
> the opportunity in every difficulty." *
>
> -Winston S. Churchill
>
>
>
> *"We may encounter many defeats but we must not be defeated." *
>
> -Maya Angelou
>
>
>
>
>
> **********************************************************
> Electronic Mail is not secure, may not be read every day, and should not
> be used for urgent or sensitive issues
>
>
> The information transmitted is intended only for the person or entity to
> which it is addressed
> and may contain CONFIDENTIAL material. If you receive this
> material/information in error,
> please contact the sender and delete or destroy the material/information.
>
> **********************************************************
> Electronic Mail is not secure, may not be read every day, and should not
> be used for urgent or sensitive issues
>
> **********************************************************
> Electronic Mail is not secure, may not be read every day, and should not
> be used for urgent or sensitive issues
>

Reply via email to