New Question

James laming's profile - activity

2017-04-14 10:28:13 +0300 received badge  Notable Question (source)
2017-04-14 10:28:13 +0300 received badge  Famous Question (source)
2017-01-03 12:53:52 +0300 received badge  Popular Question (source)
2017-01-02 23:07:05 +0300 commented answer Calling Metadata in a customization script

many thanks, that looks to have worked as expected. is this the best way to call meta-data for the builds or do you guys suggest a different mechanism, also is there a way to post meta-data back out from the VM via the local 169 service or similar ? thanks again

2017-01-02 00:44:19 +0300 asked a question Calling Metadata in a customization script

Hi

i am currently trying to build a customization script that pulls variables from the meta data web service during initial boot and configuration but have run into an issue that causes the process to fail with an error 0 in the Cloudbase-init logs and i am wondering if i am doing something wrong or if there is a better way to do it.

basically the powershell customization script uses a invoke-webrequest to pull the meta object from the webservice then reads it a json and i extract the branches i want later in the script. code: $request = 'http://169.254.169.254/openstack/latest/meta_data.json' $meta = Invoke-WebRequest $request | ConvertFrom-Json | select -expand meta

from within a deployed VM this works as expected however during a instance build i have seen the following: Invoke-WebRequest : The response content cannot be parsed because the Internet \r\nExplorer engine is not available, or Internet Explorer's first-launch \r\nconfiguration is not complete. Specify the UseBasicParsing parameter and try \r\nagain. \r\nAt C:\Users\cloudbase-init\AppData\Local\Temp\d4a44534-80d5-485a-b451-95833cf4f\r\n9c4.ps1:8 char:9\r\n+

I am wondering if there is a better way to pull the meta data i have added to the VM for the customization (is there a way to call directly via a customization script?) or is there a known work around ?

for reference i am using the cloudbase 2012 R2 image on a KVM backed Ubuntu Openstack

many thanks

James