Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix VMware spelling and document user data sources #1534

Merged
merged 3 commits into from
Apr 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions sources/api/early-boot-config/src/provider/vmware.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! The vmware module implements the `PlatformDataProvider` trait for gathering userdata on VMWare
//! The vmware module implements the `PlatformDataProvider` trait for gathering userdata on VMware
//! via mounted CDRom or the guestinfo interface

use super::{PlatformDataProvider, SettingsJson};
Expand Down Expand Up @@ -97,7 +97,7 @@ impl VmwareDataProvider {
}

/// Read and base64 decode user data contained in an OVF file
// In VMWare, user data is supplied to the host via an XML file. Within
// In VMware, user data is supplied to the host via an XML file. Within
// the XML file, there is a `PropertySection` that contains `Property` elements
// with attributes. User data is base64 encoded inside a `Property` element with
// the attribute "user-data".
Expand Down Expand Up @@ -143,7 +143,7 @@ impl VmwareDataProvider {
fn guestinfo_user_data() -> Result<Option<SettingsJson>> {
info!("Attempting to retrieve user data via guestinfo interface");

// It would be extremely odd to get here and not be on VMWare, but check anyway
// It would be extremely odd to get here and not be on VMware, but check anyway
ensure!(vmw_backdoor::is_vmware_cpu(), error::NotVmware);

// `guestinfo.userdata.encoding` informs us how to handle the data in the
Expand Down Expand Up @@ -209,7 +209,7 @@ impl VmwareDataProvider {

/// Request a key's value from guestinfo
fn backdoor_get_bytes(key: &str) -> Result<Option<Vec<u8>>> {
// Probe and access the VMWare backdoor. `kernel lockdown(7)` may block "privileged"
// Probe and access the VMware backdoor. `kernel lockdown(7)` may block "privileged"
// mode because of its use of `iopl()`. According the the bug report below, in theory
// "privileged" mode is more reliable than "unprivileged" but both provide access to
// the same data so we fall back to "unprivileged" if the first call fails.
Expand Down Expand Up @@ -337,7 +337,7 @@ mod error {
},

#[snafu(display(
"Unable to read user data from guestinfo, this is not a VMWare virtual CPU"
"Unable to read user data from guestinfo, this is not a VMware virtual CPU"
))]
NotVmware,

Expand Down
2 changes: 1 addition & 1 deletion sources/models/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ The `#[model]` attribute on Settings and its sub-structs reduces duplication and
* [Model](src/aws-dev/mod.rs)
zmrow marked this conversation as resolved.
Show resolved Hide resolved
* [Default settings](src/aws-dev/defaults.d/)

### vmware-dev: VMWare development build
### vmware-dev: VMware development build

* [Model](src/vmware-dev/mod.rs)
* [Default settings](src/vmware-dev/defaults.d/)
Expand Down
2 changes: 1 addition & 1 deletion sources/models/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ The `#[model]` attribute on Settings and its sub-structs reduces duplication and
* [Model](src/aws-dev/mod.rs)
* [Default settings](src/aws-dev/defaults.d/)

## vmware-dev: VMWare development build
## vmware-dev: VMware development build

* [Model](src/vmware-dev/mod.rs)
* [Default settings](src/vmware-dev/defaults.d/)
Expand Down
7 changes: 4 additions & 3 deletions variants/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,12 @@ The [aws-dev](aws-dev/Cargo.toml) variant has useful packages for local developm
It includes tools for troubleshooting as well as Docker for running containers.
User data will be read from IMDS.

### vmware-dev: VMWare development build
### vmware-dev: VMware development build

The [vmware-dev](vmware-dev/Cargo.toml) variant has useful packages for local development of the OS, and is intended to run as a VMWare guest.
The [vmware-dev](vmware-dev/Cargo.toml) variant has useful packages for local development of the OS, and is intended to run as a VMware guest.
It includes tools for troubleshooting as well as Docker for running containers.
User data will be read from a mounted CD-ROM, either from a file named "user-data" or from an OVF file.
User data will be read from a mounted CD-ROM (from a file named "user-data" or from an OVF file), and from VMware's guestinfo interface.
zmrow marked this conversation as resolved.
Show resolved Hide resolved
If user data exists at both places, settings read from guestinfo will override identical settings from CD-ROM.

### Deprecated variants

Expand Down