hyperkv
Get Hyper-V Key Value Pairs on Linux Guest
Simple parser of the files made by hv_kvp_daemon on a Linux guest. This allows a guest to determine its name, the host's name, etc. Learn more about Hyper-V Data Exchange here.
Install
pip install hyperkv
Usage
hyperkv
will write the contents as a JSON to standard out like this:
{
"HostName": "thehost.example.com",
"HostingSystemEditionId": "8",
"HostingSystemNestedLevel": "0",
"HostingSystemOsMajor": "10",
"HostingSystemOsMinor": "0",
"HostingSystemProcessorArchitecture": "9",
"HostingSystemProcessorIdleStateMax": "0",
"HostingSystemProcessorThrottleMax": "100",
"HostingSystemProcessorThrottleMin": "5",
"HostingSystemSpMajor": "0",
"HostingSystemSpMinor": "0",
"PhysicalHostName": "THEHOST",
"PhysicalHostNameFullyQualified": "thehost.example.com",
"VirtualMachineDynamicMemoryBalancingEnabled": "0",
"VirtualMachineId": "461B2364-3901-4349-B3C2-FA4821CBEEFE",
"VirtualMachineName": "my-guest-vm"
}
By default, this script reads from /var/lib/hyperv/.kvp_pool_3, but you can specify a different path with -f
hyperkv -f /var/lib/hyperv/.kvp_pool_2
Requirements
hv_kvp_daemon must be installed and working. If it is working, you will find files in /var/lib/hyperv.
Ubuntu
apt-get install linux-azure linux-azure-tools
grub-update
At boot time, you need to pick advanced startup and make sure it boots with the newly installed Azure kernel. To make that more permanent, you can open /etc/default/grub, add the line GRUB_SAVEDEFAULT=true, and change GRUB_DEFAULT=0 to GRUB_DEFAULT=saved. The next time you boot, choose the Azure kernel and that will become the default until you pick a different one at the GRUB menu.
Metadata
Release files for hyperkv 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| hyperkv-0.1.1.tar.gz | 3.8 kB | Without provenance | Details for hyperkv-0.1.1.tar.gz |
Release files / hyperkv-0.1.1.tar.gz
| Download URL | hyperkv-0.1.1.tar.gz |
|---|---|
| Size | 3.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1ccb88decae9cbc315423263da3654542ef4f6808a7c2a725caeaf53dd4d8914
|
|
BLAKE2b-256 checksum How to use checksums |
f98ace007e94c1acb629e58c36af7665a14e817d6c1e2ca8643b07f68f309cbb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.1
|
Security for hyperkv 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.