identify openstack vmware platform
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| OpenStack Compute (nova) |
Wishlist
|
Unassigned | ||
| cloud-init |
Medium
|
Unassigned |
Bug Description
We need a way to identify locally that we are running on openstack when inside a guest of VmWare.
Related bugs:
https:/
Related branches
- Server Team CI bot: Needs Fixing (continuous-integration) on 2019-06-04
- cloud-init Commiters: Pending requested 2019-06-04
-
Diff: 767 lines (+204/-315)18 files modifiedcloudinit/config/cc_growpart.py (+2/-1)
cloudinit/config/cc_resizefs.py (+3/-3)
cloudinit/config/cc_ubuntu_advantage.py (+1/-1)
cloudinit/net/network_state.py (+8/-0)
cloudinit/sources/DataSourceNoCloud.py (+23/-17)
cloudinit/util.py (+13/-9)
config/cloud.cfg.tmpl (+2/-2)
debian/changelog (+7/-0)
debian/patches/ubuntu-advantage-revert-tip.patch (+5/-255)
tests/unittests/test_datasource/test_azure.py (+0/-24)
tests/unittests/test_datasource/test_nocloud.py (+18/-0)
tests/unittests/test_distros/test_freebsd.py (+45/-0)
tests/unittests/test_ds_identify.py (+20/-0)
tests/unittests/test_handler/test_handler_resizefs.py (+1/-1)
tests/unittests/test_net.py (+46/-0)
tools/ds-identify (+8/-0)
tools/render-cloudcfg (+1/-1)
tools/run-container (+1/-1)
- Server Team CI bot: Approve (continuous-integration) on 2019-06-03
- Ryan Harper: Needs Fixing on 2019-05-08
-
Diff: 57 lines (+28/-0)2 files modifiedtests/unittests/test_ds_identify.py (+20/-0)
tools/ds-identify (+8/-0)
Scott Moser (smoser) wrote : | #1 |
Changed in nova: | |
importance: | Undecided → Wishlist |
Changed in nova: | |
status: | New → Confirmed |
description: | updated |
tags: | added: dsid-nova |
description: | updated |
Mark T. Voelker (mvoelker) wrote : | #2 |
I ran into this recently and had a quick sniff around for a solution. I noticed that in https:/
openstack flavor create --ram 2048 --disk=20 --vcpus=2 --public --property vmware:
When an instance is booted, this in turn will get passed into the VM's VMX file and then show up in dmidecode output on the guest:
<snip>
Chassis Information
Type: Other
Lock: Not Present
Version: N/A
Serial Number: None
Asset Tag: OpenStack Nova
</snip>
By way of a quick test, I used a Bionic cloud image (with cloud-init 18.5-21-
openstack flavor create --ram 2048 --disk=20 --vcpus=2 --public --property vmware:
After booting an instance with this flavor on a VMware-backed deployment, I see that cloud-init did fetch metadata properly.
If this seems ok, I'd be happy to look into a patch that allows cloud-init to recognize "OpenStack Nova" (or perhaps "OpenStack Compute"?) in the asset tag field, which seems generic enough that others could use it too if need be. We could also look into a Nova driver patch to ensure the assetTag gets set by default rather than making everyone manually set flavor properties.
Scott Moser (smoser) wrote : | #3 |
Mark,
That sounds like a good solution.
I think that 'OpenStack Nova' is the "right" value (per upstream source), but as found in bug 1675349 'OpenStack Compute' needs to also be accepted.
Thanks for the digging, and that 'openstack flavor create' option is *really* helpful. Thanks.
Mark T. Voelker (mvoelker) wrote : | #4 |
Sure thing. I'll have a look at a patch that includes both values soon; it looks pretty straightforward. We're also prototyping a driver patch that would introduce a new strOpt config option for Nova that would allow admins specify a string which would be set as the assetTag on all new instances (unless overridden by an extra spec).
By the way, for anyone else who stumbles upon this via search engines, there are two ways to mitigate this today on existing versions of cloud-init.
1.) The flavor extra spec method mentioned above.
2.) By setting a property on the image. This allows you to set the assetTag just on particular images which are known to carry an affected version of cloud-init (e.g. you can set the assetTag on your Bionic images but not your Xenial images, for example).
If you have instances using a version of cloud-init that predates the forthcoming patches I mention above, a workaround is to use either of these two methods to set "smbios.assetTag" to "OpenTelekomCloud".
This bug is fixed with commit deaeb714 to cloud-init on branch master.
To view that commit see the following URL:
https:/
Changed in cloud-init: | |
status: | Confirmed → Fix Committed |
This bug is believed to be fixed in cloud-init in version 19.2. If this is still a problem for you, please make a comment and set the state back to New
Thank you.
Changed in cloud-init: | |
status: | Fix Committed → Fix Released |
Mark T. Voelker (mvoelker) wrote : | #7 |
Because we've had a some folks stumble across this bug and ask about it recently I thought I'd document this here for posterity:
For those using the VMware Integrated OpenStack distribution, we've added a minor tweak to the Nova driver to set the asset tag by default to a value specified in nova.conf. This means that users won't have to set the asset tag using extra specs/image attributes (though if they wish to do so, using vmware:
If you're using any of the following versions of VMware Integrated OpenStack you should have the patch:
* 4.1.2.2 or newer
* 5.1.0.2 or newer
* 6.0 or newer
If you'd like to modify the value set by the driver, look for "nova_set_
Changed in nova: | |
status: | Confirmed → Fix Released |
Some info: 09/21/2015 asset_tag: No Asset Tag dmi:bvnPhoenixT echnologiesLTD: bvr6.00: bd09/21/ 2015:svnVMware, Inc.:pnVMwareVi rtualPlatform: pvrNone: rvnIntelCorpora tion:rn440BXDes ktopReferencePl atform: rvrNone: cvnNoEnclosure: ct1:cvrN/ A: disabled enabled: disabled active_ kids:0 active_ time:0 nd_delay_ ms: Input/output error status: unsupported usage:0 suspended_ time:0 serial: VMware- 42 06 94 a2 6c e8 2b 6e-f0 c7 e7 5c cb c5 36 c9 uuid:420694A2- 6CE8-2B6E- F0C7-E75CCBC536 C9 version: None MODALIAS= dmi:bvnPhoenixT echnologiesLTD: bvr6.00: bd09/21/ 2015:svnVMware, Inc.:pnVMwareVi rtualPlatform: pvrNone: rvnIntelCorpora tion:rn440BXDes ktopReferencePl atform: rvrNone: cvnNoEnclosure: ct1:cvrN/ A:
$ ( cd /sys/class/dmi/id && sudo grep -r . * )
bios_date:
bios_vendor:Phoenix Technologies LTD
bios_version:6.00
board_name:440BX Desktop Reference Platform
board_serial:None
board_vendor:Intel Corporation
board_version:None
chassis_
chassis_serial:None
chassis_type:1
chassis_vendor:No Enclosure
chassis_version:N/A
modalias:
power/control:auto
power/async:
power/runtime_
power/runtime_
power/runtime_
grep: power/autosuspe
power/runtime_
power/runtime_
power/runtime_
product_name:VMware Virtual Platform
product_
product_
product_
sys_vendor:VMware, Inc.
uevent:
$ dmidecode paste.ubuntu. com/24103596/
http://