Detect when Chrome OS is running in a VM |
||||
Issue descriptionSome features (e.g. HWID) aren't available in VMs and Chrome OS components (crossystem, Chrome) handle that -or don't!- in a ad hoc manner that may or may not work on various architectures, VM environments, etc. For example see crbug.com/585514 , crbug.com/585515 /, b/30155895. We should make all this more consistent and robust.
,
Aug 10 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/969ce32e407f32671ab79444238b9ddf98c7d960 commit 969ce32e407f32671ab79444238b9ddf98c7d960 Author: Nicolas Norvez <norvez@chromium.org> Date: Tue Aug 09 10:42:08 2016 Detect and report VM environment in crossystem Add "inside_vm" command to crossystem. x86: If there is no HWID and mainfw_type is "nonchrome", report that the host is a VM. If HWID is present, it's not a VM. ARM: Detection not implemented and so far no ARM VMs exist, always report that the system is not a VM BUG= chromium:632303 TEST=emerge-cyan vboot_reference and test binary on cyan QEMU and HW BRANCH=none Change-Id: I18f5cb24b68e51f3097d9aafd9f0db0e610d322a Reviewed-on: https://chromium-review.googlesource.com/367240 Commit-Ready: Nicolas Norvez <norvez@chromium.org> Tested-by: Nicolas Norvez <norvez@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org> [modify] https://crrev.com/969ce32e407f32671ab79444238b9ddf98c7d960/host/arch/arm/lib/crossystem_arch.c [modify] https://crrev.com/969ce32e407f32671ab79444238b9ddf98c7d960/host/arch/x86/lib/crossystem_arch.c [modify] https://crrev.com/969ce32e407f32671ab79444238b9ddf98c7d960/host/arch/mips/lib/crossystem_arch.c [modify] https://crrev.com/969ce32e407f32671ab79444238b9ddf98c7d960/utility/crossystem.c
,
Aug 15 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/8e917140b7ffafebb82d32998e9f56ad215a53c6 commit 8e917140b7ffafebb82d32998e9f56ad215a53c6 Author: Nicolas Norvez <norvez@chromium.org> Date: Fri Aug 12 11:32:42 2016 crossystem: refactor VM detection to share across architectures If there is no HWID and mainfw_type is "nonchrome", report that the host is a VM. If HWID is present, it's not a VM. Make the detection architecture-independent. BUG= chromium:632303 TEST=emerge-cyan vboot_reference and test binary on QEMU and HW TEST=emerge-veyron_minnie vboot_reference and test binary on HW BRANCH=none Change-Id: I076eb9838a3b724ded0cfded9fb8d8a5392631c8 Reviewed-on: https://chromium-review.googlesource.com/368650 Commit-Ready: Nicolas Norvez <norvez@chromium.org> Tested-by: Nicolas Norvez <norvez@chromium.org> Reviewed-by: Vincent Palatin <vpalatin@chromium.org> [modify] https://crrev.com/8e917140b7ffafebb82d32998e9f56ad215a53c6/host/arch/arm/lib/crossystem_arch.c [modify] https://crrev.com/8e917140b7ffafebb82d32998e9f56ad215a53c6/host/arch/x86/lib/crossystem_arch.c [modify] https://crrev.com/8e917140b7ffafebb82d32998e9f56ad215a53c6/host/lib/crossystem.c [modify] https://crrev.com/8e917140b7ffafebb82d32998e9f56ad215a53c6/host/arch/mips/lib/crossystem_arch.c
,
Aug 19 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/b923b70a31b4fb3eb286f6a5e4482b844afa4a40 commit b923b70a31b4fb3eb286f6a5e4482b844afa4a40 Author: norvez <norvez@chromium.org> Date: Fri Aug 19 10:07:28 2016 Gracefully handle cases where Chrome OS is running in a VM Read from crossystem whether Chrome OS is running inside a VM or not. Do not report an error if Chrome OS is in a VM, even if the HWID is invalid, it is expected. Add IsRunningOnVm() method similar to IsRunningOnChromeOS(). Cleanup: - more consistent naming - add unit tests to hwid_checker BUG= chromium:632303 BUG= chromium:585514 TEST=Ran by hand on cyan board and cyan image in QEMU Review-Url: https://codereview.chromium.org/2218703006 Cr-Commit-Position: refs/heads/master@{#413097} [modify] https://crrev.com/b923b70a31b4fb3eb286f6a5e4482b844afa4a40/chrome/browser/chromeos/login/hwid_checker.cc [modify] https://crrev.com/b923b70a31b4fb3eb286f6a5e4482b844afa4a40/chrome/browser/chromeos/login/hwid_checker_unittest.cc [modify] https://crrev.com/b923b70a31b4fb3eb286f6a5e4482b844afa4a40/chromeos/system/fake_statistics_provider.cc [modify] https://crrev.com/b923b70a31b4fb3eb286f6a5e4482b844afa4a40/chromeos/system/fake_statistics_provider.h [modify] https://crrev.com/b923b70a31b4fb3eb286f6a5e4482b844afa4a40/chromeos/system/statistics_provider.cc [modify] https://crrev.com/b923b70a31b4fb3eb286f6a5e4482b844afa4a40/chromeos/system/statistics_provider.h
,
Aug 19 2016
,
Aug 29 2016
,
Sep 2 2016
|
||||
►
Sign in to add a comment |
||||
Comment 1 by norvez@chromium.org
, Aug 10 2016