GithubHelp home page GithubHelp logo

azure / walinuxagent Goto Github PK

View Code? Open in Web Editor NEW
523.0 523.0 364.0 39.75 MB

Microsoft Azure Linux Guest Agent

Home Page: http://azure.microsoft.com/

License: Apache License 2.0

Shell 1.59% Python 98.17% Dockerfile 0.24% Makefile 0.01%

walinuxagent's People

Contributors

adepue avatar ahmetb avatar boumenot avatar brendandixon avatar caphrim007 avatar cvpcs avatar dhivyaganesan avatar eridai avatar hglkrijger avatar jasonzio avatar jinhyunr avatar karataliu avatar kevinclark19a avatar larohra avatar lizzha avatar longlimsft avatar maddieford avatar nagworld9 avatar narrieta avatar nathanleclaire avatar nbirnel avatar pgombar avatar rjschwei avatar srikkanth avatar taoyama avatar trstringer avatar uiri avatar vittyvk avatar vrdmr avatar yuezh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

walinuxagent's Issues

waagent dies when rate limited

The waagent process dies when storing the status to the blob storage fails due to rate limit:

2015/07/17 18:36:54 ERROR:Retry=0
2015/07/17 18:36:54 ERROR:HTTP Req: HEAD https://xxxxxx.blob.core.windows.net/vhds/xxxxxx
2015/07/17 18:36:54 ERROR:HTTP Req: Data=None
2015/07/17 18:36:54 ERROR:HTTP Req: Header={'x-ms-version': '2014-02-14', 'x-ms-date': '2015-07-17T18:36:54Z'}
2015/07/17 18:36:54 ERROR:HTTP Err: Status=503
2015/07/17 18:36:54 ERROR:HTTP Err: Reason=The server is busy.
2015/07/17 18:36:54 ERROR:HTTP Err: Header=[('transfer-encoding', 'chunked'), ('date', 'Fri, 17 Jul 2015 18:36:53 GMT'), ('x-ms-request-id', 'd263f174-0001-0070-77bf-c0b52e000000'), ('x-ms-version', '2012-02-12'), ('server', 'Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0')]
2015/07/17 18:36:54 ERROR:HTTP Err: Body=
2015/07/17 18:37:04 ERROR:Traceback (most recent call last):
2015/07/17 18:37:04 ERROR:  File "/usr/sbin/waagent", line 5938, in main
2015/07/17 18:37:04 ERROR:    WaAgent.Run()
2015/07/17 18:37:04 ERROR:  File "/usr/sbin/waagent", line 5540, in Run
2015/07/17 18:37:04 ERROR:    goalState.ExtensionsConfig.ReportHandlerStatus()
2015/07/17 18:37:04 ERROR:  File "/usr/sbin/waagent", line 3831, in ReportHandlerStatus
2015/07/17 18:37:04 ERROR:    UploadStatusBlob(uri, status.encode("utf-8"))
2015/07/17 18:37:04 ERROR:  File "/usr/sbin/waagent", line 2890, in UploadStatusBlob
2015/07/17 18:37:04 ERROR:    blobType = GetBlobType(url)
2015/07/17 18:37:04 ERROR:  File "/usr/sbin/waagent", line 2819, in GetBlobType

imho the waagent should back-off or retry instead of crash :)

ResourceDisk.EnableSwap to y and rebooting does not add swap

I am using an official Ubuntu Server 14.04 LTS image. After booting I noticed that there is no swap. So I went and edited the /etc/waagent.conf, configured:

ResourceDisk.EnableSwap=y
ResourceDisk.SwapSizeMB=10240

Rebooted, but there is still not swap.

Waagent crash

I've recently updated my Azure Linux VM from Ubuntu 14.04 to Ubuntu 15.10, waagent was also updated with the packages to the latest versions. Now waagent is crashing along the starting process, here's the error log:

2015/11/16 13:48:43.757780 INFO Azure Linux Agent Version:2.1.1
2015/11/16 13:48:43.760802 INFO OS: ubuntu 15.10
2015/11/16 13:48:43.762852 INFO Python: 3.4.3
2015/11/16 13:48:43.771321 INFO Send dhcp request
2015/11/16 13:48:43.902194 INFO Wire server endpoint:100.76.170.110
2015/11/16 13:48:43.904818 INFO Gateway:100.76.170.1
2015/11/16 13:48:43.907044 INFO Routes:None
2015/11/16 13:48:43.928629 INFO Configure routes
2015/11/16 13:48:43.950326 INFO Detect default protocol.
2015/11/16 13:48:44.851669 INFO Fabric preferred wire protocol version:2015-04-05
2015/11/16 13:48:44.861121 INFO Wire protocol version:2012-11-30
2015/11/16 13:48:44.863388 WARNING Server prefered version:2015-04-05
2015/11/16 13:48:44.937908 INFO Protocol V1 found.
2015/11/16 13:48:44.942308 INFO Protocol V2 found.
2015/11/16 13:48:44.946275 INFO run provision handler.
2015/11/16 13:48:44.998557 INFO Copy ovf-env.xml.
2015/11/16 13:48:45.002047 ERROR Provision failed: (000004)Failed to copy ovf-env.xml: Failed to get dvd device
2015/11/16 13:48:45.041766 INFO Activate resource disk
2015/11/16 13:48:45.041959 INFO Start env monitor service.
2015/11/16 13:48:45.113679 INFO Resource disk /dev/sdb1 is already mounted
2015/11/16 13:48:45.128551 INFO Enable swap
2015/11/16 13:48:45.150086 INFO Swap already enabled
2015/11/16 13:48:45.171321 INFO Report vm status
2015/11/16 13:48:45.173837 INFO Upload status blob
2015/11/16 13:48:45.323291 ERROR Traceback (most recent call last):
File "/usr/sbin/waagent", line 35, in
agent.main()
File "/usr/lib/python3.4/dist-packages/azurelinuxagent/agent.py", line 141, in main
run()
File "/usr/lib/python3.4/dist-packages/azurelinuxagent/agent.py", line 46, in run
HANDLERS.main_handler.run()
File "/usr/lib/python3.4/dist-packages/azurelinuxagent/distro/default/run.py", line 81, in run
protocol.report_status(vm_status)
File "/usr/lib/python3.4/dist-packages/azurelinuxagent/protocol/v1.py", line 104, in report_status
self.client.upload_status_blob(vmStatus)
File "/usr/lib/python3.4/dist-packages/azurelinuxagent/protocol/v1.py", line 551, in upload_status_blob
status_blob.upload(ext_conf.status_upload_blob)
File "/usr/lib/python3.4/dist-packages/azurelinuxagent/protocol/v1.py", line 292, in upload
blob_type = self.get_blob_type(url)
File "/usr/lib/python3.4/dist-packages/azurelinuxagent/protocol/v1.py", line 308, in get_blob_type
'x-ms-version' : self.class.storage_version
File "/usr/lib/python3.4/dist-packages/azurelinuxagent/utils/restutil.py", line 140, in http_head
max_retry=max_retry, chk_proxy=chk_proxy)
File "/usr/lib/python3.4/dist-packages/azurelinuxagent/utils/restutil.py", line 119, in http_request
proxy_host=proxy_host, proxy_port=proxy_port)
File "/usr/lib/python3.4/dist-packages/azurelinuxagent/utils/restutil.py", line 83, in _http_request
conn.request(method, url, data, headers)
File "/usr/lib/python3.4/http/client.py", line 1137, in request
self._send_request(method, url, body, headers)
File "/usr/lib/python3.4/http/client.py", line 1172, in _send_request
self.putrequest(method, url, **skips)
File "/usr/lib/python3.4/http/client.py", line 1053, in putrequest
host_enc = host.encode("ascii")
AttributeError: 'NoneType' object has no attribute 'encode'

waagent hook on hostname change

when the hostname changes I would like to be able to run a script that updates some configuration files (with the new hostname) and restarts processes

waagent breaks sshd_config while disabling passwords

If a VM is created from an image without enabling a password for the login user (using ssh key only), waagent modifies sshd_config by adding these two lines at the end of the file:

PasswordAuthentication no
ChallengeResponseAuthentication no

But if sshd_config ends with a Match block, the above modification breaks it:

[azureuser@oleg-test7 ~]$ sudo service sshd restart
Stopping sshd: [ OK ]
Starting sshd: /etc/ssh/sshd_config line 146: Directive 'ChallengeResponseAuthentication' is not allowed within a Match block [FAILED]

As a Match block cannot be closed, there's no good work-around that I can think of. The initial VM start-up works (because the agent does "sshd condrestart" and it fails sanity checks), but after a reboot the VM becomes unreachable.

waagent probably needs to get smarter about modifying sshd_config (e.g. by inserting those lines before the first Match block).

This is in CentOS 6 based VM.

Waagent stop responding to Azure - CentOS 7.1

Via PowerShell command:
$vm = get-azurevm -ServiceName xxxx -Name xxxx
$vm.GuestAgentStatus | Format-List GuestAgentVersion,Status

VM Guest Agent Status: NotReady

Therefore, it does not function a backup of Azure VM to Azure Backup Vault. Snapshot has not been created. Only restart waagent daemon will solve the issue..


2015/09/13 14:44:03 Windows Azure Linux Agent Version: WALinuxAgent-2.0.13
2015/09/13 14:44:03 Linux Distribution Detected : centos
2015/09/13 14:44:03 Module /lib/modules/3.10.0-229.7.2.el7.x86_64/kernel/drivers/ata/ata_piix.ko driver for ATAPI CD-ROM is already present.
2015/09/13 14:44:03 VMM Init script not found. Provisioning for Azure
2015/09/13 14:44:03 IPv4 address: 172.16.xxx.xxx
2015/09/13 14:44:03 MAC address: 00:0D:3A:22:03:D0
2015/09/13 14:44:03 Probing for Windows Azure environment.
2015/09/13 14:44:03 DoDhcpWork: Setting socket.timeout=10, entering recv
2015/09/13 14:44:03 Discovered Windows Azure endpoint: 168.63.129.16
2015/09/13 14:44:03 Fabric preferred wire protocol version: 2015-04-05
2015/09/13 14:44:03 Negotiated wire protocol version: 2012-11-30
2015/09/13 14:44:03 Retrieved GoalState from Windows Azure Fabric.
2015/09/13 14:44:03 ExpectedState: Started
2015/09/13 14:44:03 ContainerId: 736fca64-c729-4a8a-8c8b-2552a9ed696f
2015/09/13 14:44:03 RoleInstanceId: 65606d3c51184cb19a45257c07d3ddad.xxx-xxxx
2015/09/13 14:44:03 ActivateResourceDisk: /dev/sdb1 is already mounted.
2015/09/13 14:44:03 Posted Role Properties. CertificateThumbprint=601402884eb2ec8337c1f4b4f1f3402d
2015/09/13 14:44:06 Finished processing ExtensionsConfig.xml
2015/09/15 06:07:38 ERROR:Retry=0
2015/09/15 06:07:38 ERROR:HTTP Req: POST /machine?comp=health
2015/09/15 06:07:38 ERROR:HTTP Req: Data=1736fca64-c729-4a8a-8c8b-2552a9ed696f65606d3c51184cb19a45257c07d3ddad.pczdds-portaldb2Ready
2015/09/15 06:07:38 ERROR:HTTP Req: Header={'Content-Type': 'text/xml; charset=utf-8', 'x-ms-version': '2012-11-30', 'x-ms-agent-name': 'WALinuxAgent'}
2015/09/15 06:07:38 ERROR:HTTP Err: Status=503
2015/09/15 06:07:38 ERROR:HTTP Err: Reason=Service Unavailable
2015/09/15 06:07:38 ERROR:HTTP Err: Header=[('date', 'Tue, 15 Sep 2015 06:07:37 GMT'), ('connection', 'close'), ('content-type', 'text/html; charset=us-ascii'), ('content-length', '326'), ('server', 'Microsoft-HTTPAPI/2.0')]
2015/09/15 06:07:38 ERROR:HTTP Err: Body=
2015/09/15 06:07:38 ERROR:<TITLE>Service Unavailable</TITLE>
2015/09/15 06:07:38 ERROR:
2015/09/15 06:07:38 ERROR:

Service Unavailable


2015/09/15 06:07:38 ERROR:

HTTP Error 503. The service is unavailable.


2015/09/15 06:07:38 ERROR:
2015/09/15 06:07:38 ERROR:
2015/09/15 06:07:48 ERROR:Socket IOError getaddrinfo() argument 2 must be integer or string, args:('getaddrinfo() argument 2 must be integer or string',)
2015/09/15 06:07:48 ERROR:Retry=1
2015/09/15 06:07:48 ERROR:HTTP Req: POST /machine?comp=health
2015/09/15 06:07:48 ERROR:HTTP Req: Data=1736fca64-c729-4a8a-8c8b-2552a9ed696f65606d3c51184cb19a45257c07d3ddad.pczdds-portaldb2Ready
2015/09/15 06:07:48 ERROR:HTTP Req: Header={'Content-Type': 'text/xml; charset=utf-8', 'x-ms-version': '2012-11-30', 'x-ms-agent-name': 'WALinuxAgent'}
2015/09/15 06:07:48 ERROR:HTTP Err: response is empty.
2015/09/15 06:07:58 ERROR:Socket IOError getaddrinfo() argument 2 must be integer or string, args:('getaddrinfo() argument 2 must be integer or string',)
2015/09/15 06:07:58 ERROR:Retry=2
2015/09/15 06:07:58 ERROR:HTTP Req: POST /machine?comp=health
2015/09/15 06:07:58 ERROR:HTTP Req: Data=1736fca64-c729-4a8a-8c8b-2552a9ed696f65606d3c51184cb19a45257c07d3ddad.pczdds-portaldb2Ready
2015/09/15 06:07:58 ERROR:HTTP Req: Header={'Content-Type': 'text/xml; charset=utf-8', 'x-ms-version': '2012-11-30', 'x-ms-agent-name': 'WALinuxAgent'}
2015/09/15 06:07:58 ERROR:HTTP Err: response is empty.
2015/09/15 06:08:08 ERROR:Socket IOError getaddrinfo() argument 2 must be integer or string, args:('getaddrinfo() argument 2 must be integer or string',)
2015/09/15 06:08:31 Retrieved GoalState from Windows Azure Fabric.
2015/09/15 06:08:31 ExpectedState: Started
2015/09/15 06:08:31 ContainerId: 736fca64-c729-4a8a-8c8b-2552a9ed696f
2015/09/15 06:08:31 RoleInstanceId: 65606d3c51184cb19a45257c07d3ddad.pczdds-portaldb2
2015/09/15 06:08:31 Posted Role Properties. CertificateThumbprint=601402884eb2ec8337c1f4b4f1f3402d
2015/09/15 06:08:34 Finished processing ExtensionsConfig.xml
2015/09/20 14:00:52 ERROR:Socket IOError [Errno 111] Connection refused, args:(111, 'Connection refused')
2015/09/20 14:00:52 ERROR:Retry=0
2015/09/20 14:00:52 ERROR:HTTP Req: PUT https://xxxxx.blob.core.windows.net/$system/xxxx-xx.xxxxxxb.xxx-xxx.status?sr=b&sp=rw&se=9999-01-01&sk=system-1&sv=2014-02-14&sig=YI5qUkXtCxy4OLu4B1pEhpf3%2Fy0Uteo143aqrg3SCns%3D
2015/09/20 14:00:52 ERROR:HTTP Req: Data=
2015/09/20 14:00:52 ERROR:HTTP Req: Header={'Content-Length': '0', 'x-ms-blob-content-length': '512', 'x-ms-version': '2014-02-14', 'x-ms-blob-type': 'PageBlob', 'x-ms-date': '2015-09-20T14:00:52Z'}
2015/09/20 14:00:52 ERROR:HTTP Err: response is empty.
2015/09/20 14:03:09 ERROR:Socket IOError [Errno 110] Connection timed out, args:(110, 'Connection timed out')
2015/09/20 14:03:09 ERROR:Retry=1
2015/09/20 14:03:09 ERROR:HTTP Req: PUT https://xxxxx.blob.core.windows.net/$system/xxxx-xxxx.xxx-xxxx.pxxx-xxxx.status?sr=b&sp=rw&se=9999-01-01&sk=system-1&sv=2014-02-14&sig=YI5qUkXtCxy4OLu4B1pEhpf3%2Fy0Uteo143aqrg3SCns%3D
2015/09/20 14:03:09 ERROR:HTTP Req: Data=
2015/09/20 14:03:09 ERROR:HTTP Req: Header={'Content-Length': '0', 'x-ms-blob-content-length': '512', 'x-ms-version': '2014-02-14', 'x-ms-blob-type': 'PageBlob', 'x-ms-date': '2015-09-20T14:00:52Z'}
2015/09/20 14:03:09 ERROR:HTTP Err: response is empty.
2015/09/20 14:05:27 ERROR:Socket IOError [Errno 110] Connection timed out, args:(110, 'Connection timed out')
2015/09/20 14:05:27 ERROR:Retry=2
2015/09/20 14:05:27 ERROR:HTTP Req: PUT https://xxxxx.blob.core.windows.net/$system/xxxxx-xxxx.xxxx-xxxxxx-xxxx.status?sr=b&sp=rw&se=9999-01-01&sk=system-1&sv=2014-02-14&sig=YI5qUkXtCxy4OLu4B1pEhpf3%2Fy0Uteo143aqrg3SCns%3D
2015/09/20 14:05:27 ERROR:HTTP Req: Data=
2015/09/20 14:05:27 ERROR:HTTP Req: Header={'Content-Length': '0', 'x-ms-blob-content-length': '512', 'x-ms-version': '2014-02-14', 'x-ms-blob-type': 'PageBlob', 'x-ms-date': '2015-09-20T14:00:52Z'}
2015/09/20 14:05:27 ERROR:HTTP Err: response is empty.
2015/09/20 14:07:44 ERROR:Socket IOError [Errno 110] Connection timed out, args:(110, 'Connection timed out')
2015/09/20 14:07:44 ERROR:Failed to clean up page blob for status
2015/09/21 16:07:19 ERROR:Socket IOError [Errno 111] Connection refused, args:(111, 'Connection refused')
2015/09/21 16:07:19 ERROR:Retry=0
2015/09/21 16:07:19 ERROR:HTTP Req: HEAD https://xxxx.blob.core.windows.net/$system/xxx-xxx.xxx-xxxxxx-xxx.status?sr=b&sp=rw&se=9999-01-01&sk=system-1&sv=2014-02-14&sig=YI5qUkXtCxy4OLu4B1pEhpf3%2Fy0Uteo143aqrg3SCns%3D
2015/09/21 16:07:19 ERROR:HTTP Req: Data=None
2015/09/21 16:07:19 ERROR:HTTP Req: Header={'x-ms-version': '2014-02-14', 'x-ms-date': '2015-09-21T16:07:19Z'}
2015/09/21 16:07:19 ERROR:HTTP Err: response is empty.
2015/09/21 16:07:29 ERROR:Traceback (most recent call last):
2015/09/21 16:07:29 ERROR: File "/usr/sbin/waagent", line 5939, in main
2015/09/21 16:07:29 ERROR: WaAgent.Run()
2015/09/21 16:07:29 ERROR: File "/usr/sbin/waagent", line 5541, in Run
2015/09/21 16:07:29 ERROR: goalState.ExtensionsConfig.ReportHandlerStatus()
2015/09/21 16:07:29 ERROR: File "/usr/sbin/waagent", line 3832, in ReportHandlerStatus
2015/09/21 16:07:29 ERROR: UploadStatusBlob(uri, status.encode("utf-8"))
2015/09/21 16:07:29 ERROR: File "/usr/sbin/waagent", line 2891, in UploadStatusBlob
2015/09/21 16:07:29 ERROR: blobType = GetBlobType(url)
2015/09/21 16:07:29 ERROR: File "/usr/sbin/waagent", line 2820, in GetBlobType
2015/09/21 16:07:29 ERROR: }, chkProxy=True);
2015/09/21 16:07:29 ERROR: File "/usr/sbin/waagent", line 2759, in HttpHead
2015/09/21 16:07:29 ERROR: return self.HttpRequest("HEAD", url, None, headers, maxRetry, chkProxy)
2015/09/21 16:07:29 ERROR: File "/usr/sbin/waagent", line 2751, in HttpRequest
2015/09/21 16:07:29 ERROR: headers, proxyHost, proxyPort)
2015/09/21 16:07:29 ERROR: File "/usr/sbin/waagent", line 2679, in _HttpRequest
2015/09/21 16:07:29 ERROR: conn.request(method, path, data)
2015/09/21 16:07:29 ERROR: File "/usr/lib64/python2.7/httplib.py", line 973, in request
2015/09/21 16:07:29 ERROR: self._send_request(method, url, body, headers)
2015/09/21 16:07:29 ERROR: File "/usr/lib64/python2.7/httplib.py", line 1007, in _send_request
2015/09/21 16:07:29 ERROR: self.endheaders(body)
2015/09/21 16:07:29 ERROR: File "/usr/lib64/python2.7/httplib.py", line 969, in endheaders
2015/09/21 16:07:29 ERROR: self._send_output(message_body)
2015/09/21 16:07:29 ERROR: File "/usr/lib64/python2.7/httplib.py", line 833, in _send_output
2015/09/21 16:07:29 ERROR: self.send(message_body)
2015/09/21 16:07:29 ERROR: File "/usr/lib64/python2.7/httplib.py", line 805, in send
2015/09/21 16:07:29 ERROR: self.sock.sendall(data)
2015/09/21 16:07:29 ERROR: File "/usr/lib64/python2.7/ssl.py", line 226, in sendall
2015/09/21 16:07:29 ERROR: amount = len(data)
2015/09/21 16:07:29 ERROR:TypeError: object of type 'bool' has no len()
2015/09/21 16:07:29 ERROR:
2015/09/21 16:07:29 ERROR:Exception: object of type 'bool' has no len()
2015/09/27 14:11:12 Windows Azure Linux Agent Version: WALinuxAgent-2.0.13
2015/09/27 14:11:12 Linux Distribution Detected : centos
2015/09/27 14:11:12 Module /lib/modules/3.10.0-229.7.2.el7.x86_64/kernel/drivers/ata/ata_piix.ko driver for ATAPI CD-ROM is already present.
2015/09/27 14:11:12 VMM Init script not found. Provisioning for Azure
2015/09/27 14:11:12 IPv4 address: 172.16.xxx.xxx
2015/09/27 14:11:12 MAC address: 00:0D:3A:22:03:D0
2015/09/27 14:11:12 Probing for Windows Azure environment.
2015/09/27 14:11:12 DoDhcpWork: Setting socket.timeout=10, entering recv
2015/09/27 14:11:12 Discovered Windows Azure endpoint: 168.63.129.16
2015/09/27 14:11:12 Fabric preferred wire protocol version: 2015-04-05
2015/09/27 14:11:12 Negotiated wire protocol version: 2012-11-30
2015/09/27 14:11:12 Retrieved GoalState from Windows Azure Fabric.
2015/09/27 14:11:12 ExpectedState: Started
2015/09/27 14:11:12 ContainerId: 736fca64-c729-4a8a-8c8b-2552a9ed696f
2015/09/27 14:11:12 RoleInstanceId: 65606d3c51184cb19a45257c07d3ddad.pczdds-portaldb2
2015/09/27 14:11:12 ActivateResourceDisk: /dev/sdb1 is already mounted.
2015/09/27 14:11:12 Posted Role Properties. CertificateThumbprint=601402884eb2ec8337c1f4b4f1f3402d
2015/09/27 14:11:15 Finished processing ExtensionsConfig.xml
2015/09/28 02:17:19 Windows Azure Linux Agent Version: WALinuxAgent-2.0.13
2015/09/28 02:17:19 Linux Distribution Detected : centos
2015/09/28 02:17:19 Module /lib/modules/3.10.0-229.7.2.el7.x86_64/kernel/drivers/ata/ata_piix.ko driver for ATAPI CD-ROM is already present.
2015/09/28 02:17:19 VMM Init script not found. Provisioning for Azure
2015/09/28 02:17:19 IPv4 address: 172.16.248.11
2015/09/28 02:17:19 MAC address: 00:0D:3A:22:03:D0
2015/09/28 02:17:19 Probing for Windows Azure environment.
2015/09/28 02:17:19 DoDhcpWork: Setting socket.timeout=10, entering recv
2015/09/28 02:17:19 Discovered Windows Azure endpoint: 168.63.129.16
2015/09/28 02:17:19 Fabric preferred wire protocol version: 2015-04-05
2015/09/28 02:17:19 Negotiated wire protocol version: 2012-11-30
2015/09/28 02:17:19 Retrieved GoalState from Windows Azure Fabric.
2015/09/28 02:17:19 ExpectedState: Started
2015/09/28 02:17:19 ContainerId: 736fca64-c729-4a8a-8c8b-2552a9ed696f
2015/09/28 02:17:19 RoleInstanceId: 65606d3c51184cb19a45257c07d3ddad.xxx-xxx
2015/09/28 02:17:19 ActivateResourceDisk: /dev/sdb1 is already mounted.
2015/09/28 02:17:19 Posted Role Properties. CertificateThumbprint=601402884eb2ec8337c1f4b4f1f3402d
2015/09/28 02:17:23 Finished processing ExtensionsConfig.xml
2015/09/29 18:40:59 ERROR:Socket IOError [Errno 104] Connection reset by peer, args:(104, 'Connection reset by peer')
2015/09/29 18:40:59 ERROR:Retry=0
2015/09/29 18:41:00 ERROR:HTTP Req: HEAD https://xxx.blob.core.windows.net/$system/xxx-xxxx.xxx-xxx.xxx-xxx.status?sr=b&sp=rw&se=9999-01-01&sk=system-1&sv=2014-02-14&sig=YI5qUkXtCxy4OLu4B1pEhpf3%2Fy0Uteo143aqrg3SCns%3D
2015/09/29 18:41:00 ERROR:HTTP Req: Data=None
2015/09/29 18:41:00 ERROR:HTTP Req: Header={'x-ms-version': '2014-02-14', 'x-ms-date': '2015-09-29T18:40:29Z'}
2015/09/29 18:41:00 ERROR:HTTP Err: response is empty.
2015/09/29 18:41:10 ERROR:Traceback (most recent call last):
2015/09/29 18:41:10 ERROR: File "/usr/sbin/waagent", line 5939, in main
2015/09/29 18:41:10 ERROR: WaAgent.Run()
2015/09/29 18:41:10 ERROR: File "/usr/sbin/waagent", line 5541, in Run
2015/09/29 18:41:10 ERROR: goalState.ExtensionsConfig.ReportHandlerStatus()
2015/09/29 18:41:10 ERROR: File "/usr/sbin/waagent", line 3832, in ReportHandlerStatus
2015/09/29 18:41:10 ERROR: UploadStatusBlob(uri, status.encode("utf-8"))
2015/09/29 18:41:10 ERROR: File "/usr/sbin/waagent", line 2891, in UploadStatusBlob
2015/09/29 18:41:10 ERROR: blobType = GetBlobType(url)
2015/09/29 18:41:10 ERROR: File "/usr/sbin/waagent", line 2820, in GetBlobType
2015/09/29 18:41:10 ERROR: }, chkProxy=True);
2015/09/29 18:41:10 ERROR: File "/usr/sbin/waagent", line 2759, in HttpHead
2015/09/29 18:41:10 ERROR: return self.HttpRequest("HEAD", url, None, headers, maxRetry, chkProxy)
2015/09/29 18:41:10 ERROR: File "/usr/sbin/waagent", line 2751, in HttpRequest
2015/09/29 18:41:10 ERROR: headers, proxyHost, proxyPort)
2015/09/29 18:41:10 ERROR: File "/usr/sbin/waagent", line 2679, in _HttpRequest
2015/09/29 18:41:10 ERROR: conn.request(method, path, data)
2015/09/29 18:41:10 ERROR: File "/usr/lib64/python2.7/httplib.py", line 973, in request
2015/09/29 18:41:10 ERROR: self._send_request(method, url, body, headers)
2015/09/29 18:41:10 ERROR: File "/usr/lib64/python2.7/httplib.py", line 1007, in _send_request
2015/09/29 18:41:10 ERROR: self.endheaders(body)
2015/09/29 18:41:10 ERROR: File "/usr/lib64/python2.7/httplib.py", line 969, in endheaders
2015/09/29 18:41:10 ERROR: self._send_output(message_body)
2015/09/29 18:41:10 ERROR: File "/usr/lib64/python2.7/httplib.py", line 833, in _send_output
2015/09/29 18:41:10 ERROR: self.send(message_body)
2015/09/29 18:41:10 ERROR: File "/usr/lib64/python2.7/httplib.py", line 805, in send
2015/09/29 18:41:10 ERROR: self.sock.sendall(data)
2015/09/29 18:41:10 ERROR: File "/usr/lib64/python2.7/ssl.py", line 226, in sendall
2015/09/29 18:41:10 ERROR: amount = len(data)
2015/09/29 18:41:10 ERROR:TypeError: object of type 'bool' has no len()
2015/09/29 18:41:10 ERROR:
2015/09/29 18:41:10 ERROR:Exception: object of type 'bool' has no len()
2015/09/29 19:17:30 Windows Azure Linux Agent Version: WALinuxAgent-2.0.13
2015/09/29 19:17:30 Linux Distribution Detected : centos
2015/09/29 19:17:30 Module /lib/modules/3.10.0-229.7.2.el7.x86_64/kernel/drivers/ata/ata_piix.ko driver for ATAPI CD-ROM is already present.
2015/09/29 19:17:30 VMM Init script not found. Provisioning for Azure
2015/09/29 19:17:30 IPv4 address: 172.16.xxx.xxx
2015/09/29 19:17:30 MAC address: 00:0D:3A:22:03:D0
2015/09/29 19:17:30 Probing for Windows Azure environment.
2015/09/29 19:17:30 DoDhcpWork: Setting socket.timeout=10, entering recv
2015/09/29 19:17:30 Discovered Windows Azure endpoint: 168.63.129.16
2015/09/29 19:17:30 Fabric preferred wire protocol version: 2015-04-05
2015/09/29 19:17:30 Negotiated wire protocol version: 2012-11-30
2015/09/29 19:17:30 Retrieved GoalState from Windows Azure Fabric.
2015/09/29 19:17:30 ExpectedState: Started
2015/09/29 19:17:30 ContainerId: 736fca64-c729-4a8a-8c8b-2552a9ed696f
2015/09/29 19:17:30 RoleInstanceId: 65606d3c51184cb19a45257c07d3ddad.pczdds-portaldb2
2015/09/29 19:17:30 ActivateResourceDisk: /dev/sdb1 is already mounted.
2015/09/29 19:17:30 Posted Role Properties. CertificateThumbprint=601402884eb2ec8337c1f4b4f1f3402d
2015/09/29 19:17:33 Finished processing ExtensionsConfig.xml
2015/09/29 20:31:31 ERROR:Socket IOError [Errno 111] Connection refused, args:(111, 'Connection refused')
2015/09/29 20:31:31 ERROR:Retry=0
2015/09/29 20:31:31 ERROR:HTTP Req: PUT https://xxx.blob.core.windows.net/$system/xxx-xxx.xxx-xxx.xxxx-xxx.status?sr=b&sp=rw&se=9999-01-01&sk=system-1&sv=2014-02-14&sig=YI5qUkXtCxy4OLu4B1pEhpf3%2Fy0Uteo143aqrg3SCns%3D
2015/09/29 20:31:31 ERROR:HTTP Req: Data=
2015/09/29 20:31:31 ERROR:HTTP Req: Header={'Content-Length': '0', 'x-ms-blob-content-length': '512', 'x-ms-version': '2014-02-14', 'x-ms-blob-type': 'PageBlob', 'x-ms-date': '2015-09-29T20:31:31Z'}
2015/09/29 20:31:31 ERROR:HTTP Err: response is empty.
2015/09/29 20:33:48 ERROR:Socket IOError [Errno 110] Connection timed out, args:(110, 'Connection timed out')
2015/09/29 20:33:48 ERROR:Retry=1
2015/09/29 20:33:48 ERROR:HTTP Req: PUT https://xxx.blob.core.windows.net/$system/xxx-xxx.xxxx-xxxx.xxxx-xxxxx.status?sr=b&sp=rw&se=9999-01-01&sk=system-1&sv=2014-02-14&sig=YI5qUkXtCxy4OLu4B1pEhpf3%2Fy0Uteo143aqrg3SCns%3D
2015/09/29 20:33:48 ERROR:HTTP Req: Data=
2015/09/29 20:33:48 ERROR:HTTP Req: Header={'Content-Length': '0', 'x-ms-blob-content-length': '512', 'x-ms-version': '2014-02-14', 'x-ms-blob-type': 'PageBlob', 'x-ms-date': '2015-09-29T20:31:31Z'}
2015/09/29 20:33:48 ERROR:HTTP Err: response is empty.
2015/09/29 20:36:05 ERROR:Socket IOError [Errno 110] Connection timed out, args:(110, 'Connection timed out')
2015/09/29 20:36:05 ERROR:Retry=2
2015/09/29 20:36:05 ERROR:HTTP Req: PUT https://xxxx.blob.core.windows.net/$system/xxx-xxxx.xxx-portaldb.xxx-xxxxx.status?sr=b&sp=rw&se=9999-01-01&sk=system-1&sv=2014-02-14&sig=YI5qUkXtCxy4OLu4B1pEhpf3%2Fy0Uteo143aqrg3SCns%3D
2015/09/29 20:36:05 ERROR:HTTP Req: Data=
2015/09/29 20:36:05 ERROR:HTTP Req: Header={'Content-Length': '0', 'x-ms-blob-content-length': '512', 'x-ms-version': '2014-02-14', 'x-ms-blob-type': 'PageBlob', 'x-ms-date': '2015-09-29T20:31:31Z'}
2015/09/29 20:36:05 ERROR:HTTP Err: response is empty.
2015/09/29 20:38:23 ERROR:Socket IOError [Errno 110] Connection timed out, args:(110, 'Connection timed out')
2015/09/29 20:38:23 ERROR:Failed to clean up page blob for status
2015/09/30 17:02:47 ERROR:Socket IOError [Errno 111] Connection refused, args:(111, 'Connection refused')
2015/09/30 17:02:47 ERROR:Retry=0
2015/09/30 17:02:47 ERROR:HTTP Req: HEAD https://xxx.blob.core.windows.net/$system/xxx-xxx.xxxx-xxxpczdds-xxxxx.status?sr=b&sp=rw&se=9999-01-01&sk=system-1&sv=2014-02-14&sig=YI5qUkXtCxy4OLu4B1pEhpf3%2Fy0Uteo143aqrg3SCns%3D
2015/09/30 17:02:47 ERROR:HTTP Req: Data=None
2015/09/30 17:02:47 ERROR:HTTP Req: Header={'x-ms-version': '2014-02-14', 'x-ms-date': '2015-09-30T17:02:47Z'}
2015/09/30 17:02:47 ERROR:HTTP Err: response is empty.
2015/09/30 17:02:57 ERROR:Traceback (most recent call last):
2015/09/30 17:02:57 ERROR: File "/usr/sbin/waagent", line 5939, in main
2015/09/30 17:02:57 ERROR: WaAgent.Run()
2015/09/30 17:02:57 ERROR: File "/usr/sbin/waagent", line 5541, in Run
2015/09/30 17:02:57 ERROR: goalState.ExtensionsConfig.ReportHandlerStatus()
2015/09/30 17:02:57 ERROR: File "/usr/sbin/waagent", line 3832, in ReportHandlerStatus
2015/09/30 17:02:57 ERROR: UploadStatusBlob(uri, status.encode("utf-8"))
2015/09/30 17:02:57 ERROR: File "/usr/sbin/waagent", line 2891, in UploadStatusBlob
2015/09/30 17:02:57 ERROR: blobType = GetBlobType(url)
2015/09/30 17:02:57 ERROR: File "/usr/sbin/waagent", line 2820, in GetBlobType
2015/09/30 17:02:57 ERROR: }, chkProxy=True);
2015/09/30 17:02:57 ERROR: File "/usr/sbin/waagent", line 2759, in HttpHead
2015/09/30 17:02:57 ERROR: return self.HttpRequest("HEAD", url, None, headers, maxRetry, chkProxy)
2015/09/30 17:02:57 ERROR: File "/usr/sbin/waagent", line 2751, in HttpRequest
2015/09/30 17:02:57 ERROR: headers, proxyHost, proxyPort)
2015/09/30 17:02:57 ERROR: File "/usr/sbin/waagent", line 2679, in _HttpRequest
2015/09/30 17:02:57 ERROR: conn.request(method, path, data)
2015/09/30 17:02:57 ERROR: File "/usr/lib64/python2.7/httplib.py", line 973, in request
2015/09/30 17:02:57 ERROR: self._send_request(method, url, body, headers)
2015/09/30 17:02:57 ERROR: File "/usr/lib64/python2.7/httplib.py", line 1007, in _send_request
2015/09/30 17:02:57 ERROR: self.endheaders(body)
2015/09/30 17:02:57 ERROR: File "/usr/lib64/python2.7/httplib.py", line 969, in endheaders
2015/09/30 17:02:57 ERROR: self._send_output(message_body)
2015/09/30 17:02:57 ERROR: File "/usr/lib64/python2.7/httplib.py", line 833, in _send_output
2015/09/30 17:02:57 ERROR: self.send(message_body)
2015/09/30 17:02:57 ERROR: File "/usr/lib64/python2.7/httplib.py", line 805, in send
2015/09/30 17:02:57 ERROR: self.sock.sendall(data)
2015/09/30 17:02:57 ERROR: File "/usr/lib64/python2.7/ssl.py", line 226, in sendall
2015/09/30 17:02:57 ERROR: amount = len(data)
2015/09/30 17:02:57 ERROR:TypeError: object of type 'bool' has no len()
2015/09/30 17:02:57 ERROR:
2015/09/30 17:02:57 ERROR:Exception: object of type 'bool' has no len()

Linux agent for OpenSuse 11

Hi,

We are trying to import a legacy application which has a dependency on PHP 5.2 to Azure. It is currently running on an OpenSuse 11 server. We are unable to figure out which version WALinux agent to be used in this operating system. Can anyone guide us on this please?

Regards,
Shiji

Microsoft.OSTCExtensions.LinuxDiagnostic extension failing: libicuuc.so.52: cannot open shared object file

On a relatively fresh deployment of a Ubuntu VM 15.10, I seem to notice the Microsoft.OSTCExtensions.LinuxDiagnostic extension failing in the Azure portal after running for a little while.

None of my resources graphs work on the VM, I assume this is because the Microsoft.OSTCExtensions.LinuxDiagnostic extension isn't collecting metrics?

The error says "Provisioning failed". libicu is already installed (as well as libicu-dev).

mdsd stopped:MDSD crash:/var/lib/waagent/Microsoft.OSTCExtensions.LinuxDiagnostic-2.0.92/mdsd/mdsd: error while loading shared libraries: libicuuc.so.52: cannot open shared object file: No such file or directory

Image of Error

I had one previously but that was resolved by installing libglibmm.

mdsd stopped:MDSD crash:/var/lib/waagent/Microsoft.OSTCExtensions.LinuxDiagnostic-2.0.92/mdsd/mdsd: error while loading shared libraries: libglibmm-2.4.so.1: cannot open shared object file: No such file or directory

Uninstalling it, disables "Diagnostics logging". Re-checkin those options re-installs, and it fails soon after.

I do end up with some json errors in the waagent log after reinstalling;

2016/01/20 18:40:51.406760 INFO Sleep 1 second to avoid throttling.
2016/01/20 18:41:43.485704 INFO Sleep 1 second to avoid throttling.
2016/01/20 18:41:52.486052 ERROR Failed to decode json event file: Expecting value: line 1 column 1 (char 0)
2016/01/20 18:42:59.796197 INFO Sleep 1 second to avoid throttling.
2016/01/20 18:43:52.584531 ERROR Failed to decode json event file: Expecting value: line 1 column 1 (char 0)
2016/01/20 18:44:16.071293 INFO Sleep 1 second to avoid throttling.
2016/01/20 18:44:52.618863 ERROR Failed to decode json event file: Expecting value: line 1 column 1 (char 0)
2016/01/20 18:45:33.609800 INFO Sleep 1 second to avoid throttling.11

Am I right in thinking waagent is responsible, or is this some other scripts Azure support will need to check?

retroactively enabling ProvisionGuestAgent on ubuntu 12.04 causes server hang

retroactively enabled older vm to talk with azure fabric via this powershell method as the ProvisionGuestAgent value was blank and caused the walinuxagent to be unable to communicate with Azure.

$vm = Get-AzureVM -ServiceName โ€˜MyServiceNameโ€™ -Name โ€˜MyVMNameโ€™
$vm.GetInstance().ProvisionGuestAgent = $true
$vm | Update-AzureVM

this allowed the agent successfully talk with azure and use services e.g. recovery services, backup. but there looks to be a side effect where the vm's freeze up and i get errors like

Bad stdio forwarding specification when ssh via bastion host.

This has so far occurred on three ubuntu 12.04 vm's.

The commit that pushed 2.0.11 to release has been orphaned

Somehow, commit b3f2619 (which updated the changelog for 2.0.11, updated the version string, and changed the source URL for the upgrader to point to a now-missing branch) has been orphaned. It looks like the commit was done in a branch, tagged, and pushed and the branch was subsequently deleted without being merged into 2.0. The commit should be cherry-picked back into the repo and then have the URL fixed. Cherry-picking the commit can be done with git cherry-pick b3f2619.

waagent not closing connection to terminal when daemonizing

When starting waagent from console, ssh or alike I noticed that it doesn't close the file descriptors for the console.

As a result, detaching from console (e.g. logging out from the ssh connection) doesn't work. Or when running from the yast2 runlevel editor, yast2 would just hang.

Inspecting the list of still open file descriptors after launch:

borg-3:~ # ps auxf | grep waagent
root 55911 0.0 0.0 5720 840 pts/1 S+ 12:26 0:00 _ grep waagent
root 55759 0.1 1.7 73528 15036 pts/0 S 12:24 0:00 /usr/bin/python /usr/sbin/waagent -daemon

borg-3:~ # find /proc/55759/fd*
/proc/55759/fd
/proc/55759/fd/0
/proc/55759/fd/1
/proc/55759/fd/2
/proc/55759/fdinfo
/proc/55759/fdinfo/0
/proc/55759/fdinfo/1
/proc/55759/fdinfo/2

This is a problem that had been seen and fixed in several other services when starting from sysv init. One fix is to close fd 0-2 when daemonizing.

SUSE bugzilla #919239 (https://bugzilla.suse.com/show_bug.cgi?id=919239)

Downloads and executes unauthenticated binaries

waagent can be instructed to download and execute arbitrary executables. It does not enforce any kind of authentication.

Excerpt from log:

> Found Plugin: Microsoft.OSTCExtensions.LinuxDiagnostic version: 2.0.92
> Downloading plugin manifest: Microsoft.OSTCExtensions.LinuxDiagnostic from http://rdfepirv2db3prdstr02.blob.core.windows.net/b01058962be54ceca550a390fa5ff064/Microsoft.OSTCExtensions_LinuxDiagnostic_europenorth_manifest.xml
> Plugin server is: rdfepirv2db3prdstr02.blob.core.windows.net
> Bundle URI = http://rdfepirv2db3prdstr02.blob.core.windows.net/b01058962be54ceca550a390fa5ff064/Microsoft.OSTCExtensions__LinuxDiagnostic__2.0.92
> Plugin bundlehttp://rdfepirv2db3prdstr02.blob.core.windows.net/b01058962be54ceca550a390fa5ff064/Microsoft.OSTCExtensions__LinuxDiagnostic__2.0.92downloaded successfully length = 111831319
> Extracted http://rdfepirv2db3prdstr02.blob.core.windows.net/b01058962be54ceca550a390fa5ff064/Microsoft.OSTCExtensions__LinuxDiagnostic__2.0.92 to /var/lib/waagent/Microsoft.OSTCExtensions.LinuxDiagnostic-2.0.92

CustomData not handled correctly when Provisioning.DecodeCustomData=n

When you set:
Provisioning.DecodeCustomData=n
The following code raises an exception:
SetFileContents(LibDir + '/CustomData', bytearray(MyDistro.translateCustomData(self.CustomData)))
The reason is that:
self.CustomData is a unicode string.
The value returned from MyDistro.translateCustomData is the same unicode string.
bytearray on a unicode string raises an exception.
As a result, no CustomData is written to the disk.

Creating a swap file takes too long

I have an OpenLogic 7.1 VM with a waagent.conf for a swap disk:
ResourceDisk.SwapSizeMB=16384

When the machine starts up I notice that it takes >30 minutes to create the file.
dd if=/dev/zero of=/mnt/resource/swapfile bs=1024 count=16777216

Why not use fallocate? It's nearly instantaneous.

[Errno 5] input/output error

I get a Errno 5 when running waagent on a CentOS 6.6 VM. I have no idea were this is coming from and if it's posing a problem. The idea is do deprovision the image using VirtualBox so I can use it for Azure. Since now I have no luck with that, running in to a Provisioning timeout with all created images.
Could this Errno5 be a problem?

Improve the Azure Linux Agentโ€™s logic for distro specific functions

As we planned, we will refactor current code of Azure Linux Agent with improving the logic for distro specific functions, submitt this bug to track the progress.

Suggestions from customer to refactor the code, put it here for reference.

a) split up the waagent python script, into

  • a core script (required for creation, deletion, start and shutdown of a VM)
  • multiple distro-orientated scripts (of which only one script will be installed, for the specific linux distro that is running on the VM)

Original comment link by trialotto: http://feedback.azure.com/forums/216843-virtual-machines/suggestions/6790345-options-to-set-waagent-conf-variables-linux

Two versions installed

Two versions are currently installed, waagent and waagent2.0. Please decide which version should survive.

Sometimes hostname not updated by waagent

In some cases waagent doesn't update the hostname and stay localhost.localdomain. I started two machines in the same time. Here some information where hostname update failed:

  • /var/lib/waagent/ovf-env.xml
<Environment xmlns="http://schemas.dmtf.org/ovf/environment/1" xmlns:oe="http://schemas.dmtf.org/ovf/environment/1" xmlns:wa="http://schemas.microsoft.com/windowsazure" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <wa:ProvisioningSection><wa:Version>1.0</wa:Version><LinuxProvisioningConfigurationSet xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><ConfigurationSetType>LinuxProvisioningConfiguration</ConfigurationSetType><HostName>vmmaster1</HostName><UserName>asd</UserName><DisableSshPasswordAuthentication>true</DisableSshPasswordAuthentication><SSH><PublicKeys><PublicKey><Fingerprint>750...</Fingerprint><Path>/home/asd/.ssh/authorized_keys</Path></PublicKey></PublicKeys></SSH><CustomData>IyEvYmluL.....</CustomData></LinuxProvisioningConfigurationSet></wa:ProvisioningSection>
  <wa:PlatformSettingsSection><wa:Version>1.0</wa:Version><PlatformSettings xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><KmsServerHostname>kms.core.windows.net</KmsServerHostname><ProvisionGuestAgent>true</ProvisionGuestAgent><GuestAgentPackageName>VMAgentPackage.zip</GuestAgentPackageName></PlatformSettings></wa:PlatformSettingsSection>
</Environment>
  • /var/log/waagent.log
2015/10/28 13:00:40 Windows Azure Linux Agent Version: WALinuxAgent-2.0.14
2015/10/28 13:00:41 Linux Distribution Detected      : centos
2015/10/28 13:00:41 Module /lib/modules/3.10.0-229.7.2.el7.x86_64/kernel/drivers/ata/ata_piix.ko driver for ATAPI CD-ROM is already present.
2015/10/28 13:00:41 mount: /dev/sr0 is write-protected, mounting read-only
2015/10/28 13:00:41 mount: /dev/sr0 mounted on /mnt/cdrom/secure.
2015/10/28 13:00:41 mount succeeded on attempt #1
2015/10/28 13:00:41 VMM Init script not found.  Provisioning for Azure
2015/10/28 13:00:41 Waiting for network.
2015/10/28 13:00:51 IPv4 address: 10.0.0.4
2015/10/28 13:00:51 MAC  address: 00:0D:3A:21:3D:EF
2015/10/28 13:00:51 Probing for Windows Azure environment.
2015/10/28 13:00:51 DoDhcpWork: Setting socket.timeout=10, entering recv
2015/10/28 13:00:52 Discovered Windows Azure endpoint: 168.63.129.16
2015/10/28 13:00:52 Fabric preferred wire protocol version: 2015-04-05
2015/10/28 13:00:52 Negotiated wire protocol version: 2012-11-30
2015/10/28 13:00:52 SetBlockDeviceTimeout: Update the device sda with timeout 300
2015/10/28 13:00:52 SetBlockDeviceTimeout: Update the device sdb with timeout 300
2015/10/28 13:00:52 SetBlockDeviceTimeout: Update the device sdc with timeout 300
2015/10/28 13:00:52 Retrieved GoalState from Windows Azure Fabric.
2015/10/28 13:00:52 ExpectedState: Started
2015/10/28 13:00:52 ContainerId: 97d26...
2015/10/28 13:00:52 RoleInstanceId: 0473...master1
2015/10/28 13:00:53 Public cert with thumbprint: 750A2... was retrieved.
2015/10/28 13:00:53 Provisioning image started.
2015/10/28 13:00:53 Detect GPT...
2015/10/28 13:00:53 mount: /dev/sr0 is write-protected, mounting read-only
2015/10/28 13:00:53 mount succeeded on attempt #1
2015/10/28 13:00:53 Provisioning image using OVF settings in the DVD.
2015/10/28 13:00:53 Wrote /var/lib/waagent/CustomData
2015/10/28 13:00:53 Disabled SSH password-based authentication methods.
2015/10/28 13:00:55 Created user account: asd
2015/10/28 13:00:55 Deploy public key:750A...
2015/10/28 13:00:55 Ovf XML process finished
2015/10/28 13:00:55 Posted Role Properties. CertificateThumbprint=70ee...
2015/10/28 13:00:55 Root password deleted.
2015/10/28 13:00:55 Provisioning image completed.
2015/10/28 13:00:55 Posted Role Properties. CertificateThumbprint=70ee...
2015/10/28 13:00:56 Resource disk (/dev/sdb1) is mounted at /mnt/resource with fstype ext4
2015/10/28 13:00:57 EnvMonitor: Detected dhcp client restart. Restoring routing table.
2015/10/28 13:01:00 Finished processing ExtensionsConfig.xml
2015/10/28 13:01:00 ERROR:Traceback (most recent call last):
2015/10/28 13:01:00 ERROR:  File "/usr/sbin/waagent", line 4806, in AddSystemInfo
2015/10/28 13:01:00 ERROR:    sharedConfig = xml.dom.minidom.parse("/var/lib/waagent/SharedConfig.xml").childNodes[0]
2015/10/28 13:01:00 ERROR:  File "/usr/lib64/python2.7/xml/dom/minidom.py", line 1921, in parse
2015/10/28 13:01:00 ERROR:    return expatbuilder.parse(file)
2015/10/28 13:01:00 ERROR:  File "/usr/lib64/python2.7/xml/dom/expatbuilder.py", line 922, in parse
2015/10/28 13:01:00 ERROR:    fp = open(file, 'rb')
2015/10/28 13:01:00 ERROR:IOError: [Errno 2] No such file or directory: '/var/lib/waagent/SharedConfig.xml'
2015/10/28 13:01:00 ERROR:
  • /var/log/messages | grep hostname
Oct 28 13:00:12 localhost systemd[1]: Set hostname to <localhost.localdomain>.
Oct 28 13:00:32 localhost systemd: Set hostname to <localhost.localdomain>.
Oct 28 13:00:53 localhost NetworkManager[608]: <info>  Setting system hostname to 'localhost.localdomain' (no default device)
Oct 28 13:00:53 localhost nm-dispatcher: Dispatching action 'hostname'

The other machine, where the hostname is configured as well

  • /var/lib/waagent/ovf-env.xml
<Environment xmlns="http://schemas.dmtf.org/ovf/environment/1" xmlns:oe="http://schemas.dmtf.org/ovf/environment/1" xmlns:wa="http://schemas.microsoft.com/windowsazure" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <wa:ProvisioningSection><wa:Version>1.0</wa:Version><LinuxProvisioningConfigurationSet xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><ConfigurationSetType>LinuxProvisioningConfiguration</ConfigurationSetType><HostName>vmslave12</HostName><UserName>asd</UserName><DisableSshPasswordAuthentication>true</DisableSshPasswordAuthentication><SSH><PublicKeys><PublicKey><Fingerprint>750A...</Fingerprint><Path>/home/asd/.ssh/authorized_keys</Path></PublicKey></PublicKeys></SSH><CustomData>IyEvYmluL2Jhc2gK...</CustomData></LinuxProvisioningConfigurationSet></wa:ProvisioningSection>
  <wa:PlatformSettingsSection><wa:Version>1.0</wa:Version><PlatformSettings xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><KmsServerHostname>kms.core.windows.net</KmsServerHostname><ProvisionGuestAgent>true</ProvisionGuestAgent><GuestAgentPackageName>VMAgentPackage.zip</GuestAgentPackageName></PlatformSettings></wa:PlatformSettingsSection>
</Environment>
  • /var/log/waagent.log
2015/10/28 13:01:13 Windows Azure Linux Agent Version: WALinuxAgent-2.0.14
  2015/10/28 13:01:13 Linux Distribution Detected      : centos
  2015/10/28 13:01:13 Module /lib/modules/3.10.0-229.7.2.el7.x86_64/kernel/drivers/ata/ata_piix.ko driver for ATAPI CD-ROM is already present.
  2015/10/28 13:01:14 mount: /dev/sr0 is write-protected, mounting read-only
  2015/10/28 13:01:14 mount: /dev/sr0 mounted on /mnt/cdrom/secure.
  2015/10/28 13:01:14 mount succeeded on attempt #1
  2015/10/28 13:01:14 VMM Init script not found.  Provisioning for Azure
  2015/10/28 13:01:14 IPv4 address: 10.0.0.5
  2015/10/28 13:01:14 MAC  address: 00:0D:3A:21:49:93
  2015/10/28 13:01:14 Probing for Windows Azure environment.
  2015/10/28 13:01:14 DoDhcpWork: Setting socket.timeout=10, entering recv
  2015/10/28 13:01:14 Discovered Windows Azure endpoint: 168.63.129.16
  2015/10/28 13:01:14 Fabric preferred wire protocol version: 2015-04-05
  2015/10/28 13:01:14 Negotiated wire protocol version: 2012-11-30
  2015/10/28 13:01:14 SetBlockDeviceTimeout: Update the device sda with timeout 300
  2015/10/28 13:01:14 SetBlockDeviceTimeout: Update the device sdb with timeout 300
  2015/10/28 13:01:14 SetBlockDeviceTimeout: Update the device sdc with timeout 300
  2015/10/28 13:01:15 Retrieved GoalState from Windows Azure Fabric.
  2015/10/28 13:01:15 ExpectedState: Started
  2015/10/28 13:01:15 ContainerId: 2867...
  2015/10/28 13:01:15 RoleInstanceId: 6da4...slave12
  2015/10/28 13:01:15 Public cert with thumbprint: 750A2E3DE4CA53757C1D7040C445E14951774241 was retrieved.
  2015/10/28 13:01:15 Provisioning image started.
  2015/10/28 13:01:15 Detect GPT...
  2015/10/28 13:01:16 mount: /dev/sr0 is write-protected, mounting read-only
  2015/10/28 13:01:16 mount succeeded on attempt #1
  2015/10/28 13:01:16 Provisioning image using OVF settings in the DVD.
  2015/10/28 13:01:16 Wrote /var/lib/waagent/CustomData
  2015/10/28 13:01:16 Disabled SSH password-based authentication methods.
  2015/10/28 13:01:18 Created user account: asd
  2015/10/28 13:01:18 Deploy public key:750A...
  2015/10/28 13:01:19 Resource disk (/dev/sdb1) is mounted at /mnt/resource with fstype ext4
  2015/10/28 13:01:20 EnvMonitor: Detected host name change: localhost.localdomain -> vmslave12
  2015/10/28 13:01:20 Setting host name: vmslave12
  2015/10/28 13:01:21 Ovf XML process finished
  2015/10/28 13:01:21 Posted Role Properties. CertificateThumbprint=2371...
  2015/10/28 13:01:21 Root password deleted.
  2015/10/28 13:01:21 Provisioning image completed.
  2015/10/28 13:01:21 Posted Role Properties. CertificateThumbprint=2371...
  2015/10/28 13:01:26 Finished processing ExtensionsConfig.xml
  2015/10/28 13:01:26 ERROR:Traceback (most recent call last):
  2015/10/28 13:01:26 ERROR:  File "/usr/sbin/waagent", line 4806, in AddSystemInfo
  2015/10/28 13:01:26 ERROR:    sharedConfig = xml.dom.minidom.parse("/var/lib/waagent/SharedConfig.xml").childNodes[0]
  2015/10/28 13:01:26 ERROR:  File "/usr/lib64/python2.7/xml/dom/minidom.py", line 1921, in parse
  2015/10/28 13:01:26 ERROR:    return expatbuilder.parse(file)
  2015/10/28 13:01:26 ERROR:  File "/usr/lib64/python2.7/xml/dom/expatbuilder.py", line 922, in parse
  2015/10/28 13:01:26 ERROR:    fp = open(file, 'rb')
  2015/10/28 13:01:26 ERROR:IOError: [Errno 2] No such file or directory: '/var/lib/waagent/SharedConfig.xml'
  2015/10/28 13:01:26 ERROR:
  • /var/log/messages | grep hostname
Oct 28 13:00:50 localhost systemd[1]: Set hostname to <localhost.localdomain>.
Oct 28 13:01:05 localhost systemd: Set hostname to <localhost.localdomain>.
Oct 28 13:01:20 localhost NetworkManager[613]: <info>  Setting system hostname to 'localhost.localdomain' (no default device)
Oct 28 13:01:20 localhost nm-dispatcher: Dispatching action 'hostname'
Oct 28 13:01:21 localhost NetworkManager[613]: <info>  Setting system hostname to 'vmslave12' (from system configuration)
Oct 28 13:01:21 localhost nm-dispatcher: Dispatching action 'hostname'

This thing not happens always, for example in the previous couple of days it appears two times, and we started 18 instances. If you need any further information please feel free to ask me.

Best Regards,
Richard

Stops reporting health after ~1 hour - causing Azure to reboot VM (FreeBSD 10.2 - waagent 2.0.15)

This happens over and over - ever since I setup a Azure VM with FreeBSD 10.2. The waagent version that came with the image was 2.0.12 - I upgraded it to 2.0.15. It happened on both versions. It just stops logging anything after an hour - and then about 15 mins after that Azure will reboot the VM because it thinks it is no longer healthy. Here the waagent.log when the VM starts:

2015/12/29 22:15:01 Azure Linux Agent Version: WALinuxAgent-2.0.15
2015/12/29 22:15:01 uname -r
2015/12/29 22:15:01 lsmod | grep ata_piix
2015/12/29 22:15:01 Module /lib/modules/10.2-RELEASE-p7/kernel/drivers/ata/ata_piix.ko driver for ATAPI CD-ROM does not exist.
2015/12/29 22:15:01 VMM Init script not found.  Provisioning for Azure
2015/12/29 22:15:01 ifconfig
2015/12/29 22:15:01 lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
2015/12/29 22:15:01     options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
2015/12/29 22:15:01     inet6 ::1 prefixlen 128
2015/12/29 22:15:01     inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
2015/12/29 22:15:01     inet 127.0.0.1 netmask 0xff000000
2015/12/29 22:15:01     nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
2015/12/29 22:15:01 hn0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
2015/12/29 22:15:01     options=31b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,TSO4,TSO6>
2015/12/29 22:15:01     ether 00:0d:3a:33:4c:3c
2015/12/29 22:15:01     inet 10.0.2.4 netmask 0xffffff00 broadcast 10.0.2.255
2015/12/29 22:15:01     nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
2015/12/29 22:15:01
2015/12/29 22:15:02 ifconfig | grep -A2 -B2 ether | grep -B3 inet | grep -A4 UP
2015/12/29 22:15:02 IPv4 address: 10.0.2.4
2015/12/29 22:15:02 ifconfig
2015/12/29 22:15:02 lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
2015/12/29 22:15:02     options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
2015/12/29 22:15:02     inet6 ::1 prefixlen 128
2015/12/29 22:15:02     inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
2015/12/29 22:15:02     inet 127.0.0.1 netmask 0xff000000
2015/12/29 22:15:02     nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
2015/12/29 22:15:02 hn0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
2015/12/29 22:15:02     options=31b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,TSO4,TSO6>
2015/12/29 22:15:02     ether 00:0d:3a:33:4c:3c
2015/12/29 22:15:02     inet 10.0.2.4 netmask 0xffffff00 broadcast 10.0.2.255
2015/12/29 22:15:02     nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
2015/12/29 22:15:02
2015/12/29 22:15:02 ifconfig | grep -A2 -B2 ether | grep -B3 inet | grep -A4 UP
2015/12/29 22:15:02 MAC  address: 00:0D:3A:33:4C:3C
2015/12/29 22:15:02 ERROR:Reading from file /sys/firmware/acpi/tables/OEM0 Exception is [Errno 2] No such file or directory: '/sys/firmware/acpi/tables/OEM0'
2015/12/29 22:15:02 Probing for Azure environment.
2015/12/29 22:15:02 iptables -D INPUT -p udp --dport 68 -j ACCEPT
2015/12/29 22:15:02 iptables -I INPUT -p udp --dport 68 -j ACCEPT
2015/12/29 22:15:02 DoDhcpWork: try=0
2015/12/29 22:15:02 ifconfig
2015/12/29 22:15:02 lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
2015/12/29 22:15:02     options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
2015/12/29 22:15:02     inet6 ::1 prefixlen 128
2015/12/29 22:15:02     inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
2015/12/29 22:15:02     inet 127.0.0.1 netmask 0xff000000
2015/12/29 22:15:02     nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
2015/12/29 22:15:02 hn0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
2015/12/29 22:15:02     options=31b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,TSO4,TSO6>
2015/12/29 22:15:02     ether 00:0d:3a:33:4c:3c
2015/12/29 22:15:02     inet 10.0.2.4 netmask 0xffffff00 broadcast 10.0.2.255
2015/12/29 22:15:02     nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
2015/12/29 22:15:02
2015/12/29 22:15:02 ifconfig | grep -A2 -B2 ether | grep -B3 inet | grep -A4 UP
2015/12/29 22:15:02 BuildDhcpRequest: transactionId:282EC0B2,282EC0B2
2015/12/29 22:15:02 DHCP request:000000: 01 01 06 00 28 2E C0 B2  00 00 00 00 00 00 00 00  ................
2015/12/29 22:15:02 DHCP request:000010: 00 00 00 00 00 00 00 00  00 00 00 00 00 0D 3A 33  ...............3
2015/12/29 22:15:02 DHCP request:000020: 4C 3C 00 00 00 00 00 00  00 00 00 00 00 00 00 00  L...............
2015/12/29 22:15:02 DHCP request:000030: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
2015/12/29 22:15:02 DHCP request:000040: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
2015/12/29 22:15:02 DHCP request:000050: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
2015/12/29 22:15:02 DHCP request:000060: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
2015/12/29 22:15:02 DHCP request:000070: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
2015/12/29 22:15:02 DHCP request:000080: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
2015/12/29 22:15:02 DHCP request:000090: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
2015/12/29 22:15:02 DHCP request:0000A0: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
2015/12/29 22:15:02 DHCP request:0000B0: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
2015/12/29 22:15:02 DHCP request:0000C0: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
2015/12/29 22:15:02 DHCP request:0000D0: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
2015/12/29 22:15:02 DHCP request:0000E0: 00 00 00 00 00 00 00 00  00 00 00 00 63 82 53 63  ............c.Sc
2015/12/29 22:15:02 DHCP request:0000F0: 35 01 01 FF                                       5...
2015/12/29 22:15:02 ifconfig
2015/12/29 22:15:02 lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
2015/12/29 22:15:02     options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
2015/12/29 22:15:02     inet6 ::1 prefixlen 128
2015/12/29 22:15:02     inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
2015/12/29 22:15:02     inet 127.0.0.1 netmask 0xff000000
2015/12/29 22:15:02     nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
2015/12/29 22:15:02 hn0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
2015/12/29 22:15:02     options=31b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,TSO4,TSO6>
2015/12/29 22:15:02     ether 00:0d:3a:33:4c:3c
2015/12/29 22:15:02     inet 10.0.2.4 netmask 0xffffff00 broadcast 10.0.2.255
2015/12/29 22:15:02     nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
2015/12/29 22:15:02
2015/12/29 22:15:02 ifconfig | grep -A2 -B2 ether | grep -B3 inet | grep -A4 UP
2015/12/29 22:15:02 DoDhcpWork: Missing default route - adding broadcast route for DHCP.
2015/12/29 22:15:02 route add -net 255.255.255.255 -iface hn0
2015/12/29 22:15:02 DoDhcpWork: Setting socket.timeout=10, entering recv
2015/12/29 22:15:02 HandleDhcpResponse
2015/12/29 22:15:02 BytesReceived: 0x15b
2015/12/29 22:15:02 DHCP response:000000: 02 01 06 00 28 2E C0 B2  00 00 80 00 00 00 00 00  ................
2015/12/29 22:15:02 DHCP response:000010: 0A 00 02 04 A8 3F 81 10  A8 3F 81 10 00 0D 3A 33  ...............3
2015/12/29 22:15:02 DHCP response:000020: 4C 3C 00 00 00 00 00 00  00 00 00 00 52 44 46 34  L...........RDF4
2015/12/29 22:15:02 DHCP response:000030: 35 32 31 34 34 39 37 45  33 30 00 00 00 00 00 00  5214497E30......
2015/12/29 22:15:02 DHCP response:000040: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
2015/12/29 22:15:02 DHCP response:000050: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
2015/12/29 22:15:02 DHCP response:000060: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
2015/12/29 22:15:02 DHCP response:000070: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
2015/12/29 22:15:02 DHCP response:000080: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
2015/12/29 22:15:02 DHCP response:000090: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
2015/12/29 22:15:02 DHCP response:0000A0: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
2015/12/29 22:15:02 DHCP response:0000B0: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
2015/12/29 22:15:02 DHCP response:0000C0: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
2015/12/29 22:15:02 DHCP response:0000D0: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
2015/12/29 22:15:02 DHCP response:0000E0: 00 00 00 00 00 00 00 00  00 00 00 00 63 82 53 63  ............c.Sc
2015/12/29 22:15:02 DHCP response:0000F0: 01 04 FF FF FF 00 03 04  0A 00 02 01 06 04 A8 3F  ................
2015/12/29 22:15:02 DHCP response:000100: 81 10 0F 25 74 61 6E 64  65 6D 77 75 73 63 73 32  ....tandemwuscs2
2015/12/29 22:15:02 DHCP response:000110: 2E 64 35 2E 69 6E 74 65  72 6E 61 6C 2E 63 6C 6F  .d5.internal.clo
2015/12/29 22:15:02 DHCP response:000120: 75 64 61 70 70 2E 6E 65  74 33 04 FF FF FF FF 35  udapp.net3.....5
2015/12/29 22:15:02 DHCP response:000130: 01 02 36 04 A8 3F 81 10  3A 04 FF FF FF FF 3B 04  ..6.............
2015/12/29 22:15:02 DHCP response:000140: FF FF FF FF F5 04 A8 3F  81 10 79 0E 00 0A 00 02  ..........y.....
2015/12/29 22:15:02 DHCP response:000150: 01 20 A8 3F 81 10 0A 00  02 01 FF                 ...........
2015/12/29 22:15:02 DHCP option 0x1 at offset:0xf0 with length:0x4
2015/12/29 22:15:02 Skipping DHCP option 0x1 at 0xf0 with length 0x4
2015/12/29 22:15:02 DHCP option 0x3 at offset:0xf6 with length:0x4
2015/12/29 22:15:02 Set default gateway: 10.0.2.1
2015/12/29 22:15:02 /sbin/route add default 10.0.2.1
2015/12/29 22:15:02 DefaultGateway: 10.0.2.1 at 0xf6
2015/12/29 22:15:02 DHCP option 0x6 at offset:0xfc with length:0x4
2015/12/29 22:15:02 Skipping DHCP option 0x6 at 0xfc with length 0x4
2015/12/29 22:15:02 DHCP option 0xf at offset:0x102 with length:0x25
2015/12/29 22:15:02 Skipping DHCP option 0xf at 0x102 with length 0x25
2015/12/29 22:15:02 DHCP option 0x33 at offset:0x129 with length:0x4
2015/12/29 22:15:02 Skipping DHCP option 0x33 at 0x129 with length 0x4
2015/12/29 22:15:02 DHCP option 0x35 at offset:0x12f with length:0x1
2015/12/29 22:15:02 Skipping DHCP option 0x35 at 0x12f with length 0x1
2015/12/29 22:15:02 DHCP option 0x36 at offset:0x132 with length:0x4
2015/12/29 22:15:02 Skipping DHCP option 0x36 at 0x132 with length 0x4
2015/12/29 22:15:02 DHCP option 0x3a at offset:0x138 with length:0x4
2015/12/29 22:15:02 Skipping DHCP option 0x3a at 0x138 with length 0x4
2015/12/29 22:15:02 DHCP option 0x3b at offset:0x13e with length:0x4
2015/12/29 22:15:02 Skipping DHCP option 0x3b at 0x13e with length 0x4
2015/12/29 22:15:02 DHCP option 0xf5 at offset:0x144 with length:0x4
2015/12/29 22:15:02 Azure wire protocol endpoint: 168.63.129.16 at 0x144
2015/12/29 22:15:02 DHCP option 0x79 at offset:0x14a with length:0xe
2015/12/29 22:15:02 Skipping DHCP option 0x79 at 0x14a with length 0xe
2015/12/29 22:15:02 DHCP option 0xff at offset:0x15a with length:0x0
2015/12/29 22:15:02 DHCP packet ended at offset 0x15a
2015/12/29 22:15:02 DoDhcpWork: Removing broadcast route for DHCP.
2015/12/29 22:15:02 route del -net 255.255.255.255 -iface hn0
2015/12/29 22:15:02 Discovered Azure endpoint: 168.63.129.16
2015/12/29 22:15:02 HTTP Req: GET /?comp=versions
2015/12/29 22:15:02 HTTP Req: Data=None
2015/12/29 22:15:02 HTTP Req: Header=None
2015/12/29 22:15:03 Fabric preferred wire protocol version: 2015-04-05
2015/12/29 22:15:03 Fabric supported wire protocol version: 2015-04-05
2015/12/29 22:15:03 Fabric supported wire protocol version: 2012-11-30
2015/12/29 22:15:03 Fabric supported wire protocol version: 2012-09-15
2015/12/29 22:15:03 Fabric supported wire protocol version: 2012-05-15
2015/12/29 22:15:03 Fabric supported wire protocol version: 2011-12-31
2015/12/29 22:15:03 Fabric supported wire protocol version: 2011-10-15
2015/12/29 22:15:03 Fabric supported wire protocol version: 2011-08-31
2015/12/29 22:15:03 Fabric supported wire protocol version: 2011-04-07
2015/12/29 22:15:03 Fabric supported wire protocol version: 2010-12-15
2015/12/29 22:15:03 Fabric supported wire protocol version: 2010-28-10
2015/12/29 22:15:03 Negotiated wire protocol version: 2012-11-30
2015/12/29 22:15:03 sysctl kern.cam.da.default_timeout=300
2015/12/29 22:15:03 pgrep -n dhclient
2015/12/29 22:15:03 openssl req -x509 -nodes -subj /CN=LinuxTransport -days 32768 -newkey rsa:2048 -keyout TransportPrivate.pem -out TransportCert.pem
2015/12/29 22:15:03 pgrep -n dhclient
2015/12/29 22:15:03 HTTP Req: GET /machine/?comp=goalstate
2015/12/29 22:15:03 HTTP Req: Data=None
2015/12/29 22:15:03 HTTP Req: Header={'x-ms-version': '2012-11-30', 'x-ms-agent-name': 'WALinuxAgent'}
2015/12/29 22:15:03 Retrieved GoalState from Azure Fabric.
2015/12/29 22:15:03 <?xml version="1.0" encoding="utf-8"?>
2015/12/29 22:15:03 <GoalState xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="goalstate10.xsd">
2015/12/29 22:15:03   <Version>2012-11-30</Version>
2015/12/29 22:15:03   <Incarnation>1</Incarnation>
2015/12/29 22:15:03   <Machine>
2015/12/29 22:15:03     <ExpectedState>Started</ExpectedState>
2015/12/29 22:15:03     <StopRolesDeadlineHint>300000</StopRolesDeadlineHint>
2015/12/29 22:15:03     <LBProbePorts>
2015/12/29 22:15:03       <Port>16001</Port>
2015/12/29 22:15:03     </LBProbePorts>
2015/12/29 22:15:03     <ExpectHealthReport>FALSE</ExpectHealthReport>
2015/12/29 22:15:03   </Machine>
2015/12/29 22:15:03   <Container>
2015/12/29 22:15:03     <ContainerId>f36d47f0-fd8f-4f4a-af8b-b3cf1b783915</ContainerId>
2015/12/29 22:15:03     <RoleInstanceList>
2015/12/29 22:15:03       <RoleInstance>
2015/12/29 22:15:03         <InstanceId>91ec1b92b962481b8d752dbd2f3dd7c8.tandemwusvm2</InstanceId>
2015/12/29 22:15:03         <State>Started</State>
2015/12/29 22:15:03         <Configuration>
2015/12/29 22:15:03           <HostingEnvironmentConfig>http://168.63.129.16:80/machine/f36d47f0-fd8f-4f4a-af8b-b3cf1b783915/91ec1b92b962481b8d752dbd2f3dd7c8.tandemwusvm2?comp=config&amp;type=hostingEnvironmentConfig&amp;incarnation=1</HostingEnvironmentConfig>
2015/12/29 22:15:03           <SharedConfig>http://168.63.129.16:80/machine/f36d47f0-fd8f-4f4a-af8b-b3cf1b783915/91ec1b92b962481b8d752dbd2f3dd7c8.tandemwusvm2?comp=config&amp;type=sharedConfig&amp;incarnation=1</SharedConfig>
2015/12/29 22:15:03           <ExtensionsConfig>http://168.63.129.16:80/machine/f36d47f0-fd8f-4f4a-af8b-b3cf1b783915/91ec1b92b962481b8d752dbd2f3dd7c8.tandemwusvm2?comp=config&amp;type=extensionsConfig&amp;incarnation=1</ExtensionsConfig>
2015/12/29 22:15:03           <FullConfig>http://168.63.129.16:80/machine/f36d47f0-fd8f-4f4a-af8b-b3cf1b783915/91ec1b92b962481b8d752dbd2f3dd7c8.tandemwusvm2?comp=config&amp;type=fullConfig&amp;incarnation=1</FullConfig>
2015/12/29 22:15:03           <ConfigName>91ec1b92b962481b8d752dbd2f3dd7c8.1.91ec1b92b962481b8d752dbd2f3dd7c8.14.tandemwusvm2.1.xml</ConfigName>
2015/12/29 22:15:03         </Configuration>
2015/12/29 22:15:03       </RoleInstance>
2015/12/29 22:15:03     </RoleInstanceList>
2015/12/29 22:15:03   </Container>
2015/12/29 22:15:03 </GoalState>
2015/12/29 22:15:04 ExpectedState: Started
2015/12/29 22:15:04 ContainerId: f36d47f0-fd8f-4f4a-af8b-b3cf1b783915
2015/12/29 22:15:04 RoleInstanceId: 91ec1b92b962481b8d752dbd2f3dd7c8.tandemwusvm2
2015/12/29 22:15:04 HostingEnvironmentConfig
2015/12/29 22:15:04 HostingEnvironmentConfigUrl:http://168.63.129.16:80/machine/f36d47f0-fd8f-4f4a-af8b-b3cf1b783915/91ec1b92b962481b8d752dbd2f3dd7c8.tandemwusvm2?comp=config&type=hostingEnvironmentConfig&incarnation=1
2015/12/29 22:15:04 HTTP Req: GET http://168.63.129.16:80/machine/f36d47f0-fd8f-4f4a-af8b-b3cf1b783915/91ec1b92b962481b8d752dbd2f3dd7c8.tandemwusvm2?comp=config&type=hostingEnvironmentConfig&incarnation=1
2015/12/29 22:15:04 HTTP Req: Data=None
2015/12/29 22:15:04 HTTP Req: Header={'x-ms-version': '2012-11-30', 'x-ms-agent-name': 'WALinuxAgent'}
2015/12/29 22:15:04 SharedConfig
2015/12/29 22:15:04 SharedConfigUrl:http://168.63.129.16:80/machine/f36d47f0-fd8f-4f4a-af8b-b3cf1b783915/91ec1b92b962481b8d752dbd2f3dd7c8.tandemwusvm2?comp=config&type=sharedConfig&incarnation=1
2015/12/29 22:15:04 HTTP Req: GET http://168.63.129.16:80/machine/f36d47f0-fd8f-4f4a-af8b-b3cf1b783915/91ec1b92b962481b8d752dbd2f3dd7c8.tandemwusvm2?comp=config&type=sharedConfig&incarnation=1
2015/12/29 22:15:04 HTTP Req: Data=None
2015/12/29 22:15:04 HTTP Req: Header={'x-ms-version': '2012-11-30', 'x-ms-agent-name': 'WALinuxAgent'}
2015/12/29 22:15:04 <?xml version="1.0" encoding="utf-8"?>
2015/12/29 22:15:04 <SharedConfig version="1.0.0.0" goalStateIncarnation="1">
2015/12/29 22:15:04   <Deployment name="91ec1b92b962481b8d752dbd2f3dd7c8" guid="{bafb861a-73a7-4622-a669-6811ae0799fe}" incarnation="1" isNonCancellableTopologyChangeEnabled="false">
2015/12/29 22:15:04     <Service name="tandemwuscs2" guid="{00000000-0000-0000-0000-000000000000}" />
2015/12/29 22:15:04     <ServiceInstance name="91ec1b92b962481b8d752dbd2f3dd7c8.14" guid="{14b23bd1-970f-4787-8a3f-2859c1a8556e}" />
2015/12/29 22:15:04   </Deployment>
2015/12/29 22:15:04   <Incarnation number="1" instance="tandemwusvm2" guid="{27fe03b8-4fa7-46fc-9dbf-09e6cd738b2a}" />
2015/12/29 22:15:04   <Role guid="{317ee04d-fbfa-c57c-cf94-37aefc281840}" name="tandemwusvm2" settleTimeSeconds="0" />
2015/12/29 22:15:04   <LoadBalancerSettings timeoutSeconds="0" waitLoadBalancerProbeCount="8">
2015/12/29 22:15:04     <Probes>
2015/12/29 22:15:04       <Probe name="D41D8CD98F00B204E9800998ECF8427E" />
2015/12/29 22:15:04       <Probe name="ED6498BDE2E5196B612EFF5328ED8F71" />
2015/12/29 22:15:04     </Probes>
2015/12/29 22:15:04   </LoadBalancerSettings>
2015/12/29 22:15:04   <OutputEndpoints />
2015/12/29 22:15:04   <Instances>
2015/12/29 22:15:04     <Instance id="tandemwusvm2" address="10.0.2.4">
2015/12/29 22:15:04       <FaultDomains randomId="0" updateId="0" updateCount="0" />
2015/12/29 22:15:04       <InputEndpoints>
2015/12/29 22:15:04         <Endpoint name="HTTP" address="10.0.2.4:80" protocol="tcp" hostName="tandemwuscs2ContractContract" isPublic="true" loadBalancedPublicAddress="104.42.227.47:80" enableDirectServerReturn="false" isDirectAddress="false" disableStealthMode="false">
2015/12/29 22:15:04           <LocalPorts>
2015/12/29 22:15:04             <LocalPortRange from="80" to="80" />
2015/12/29 22:15:04           </LocalPorts>
2015/12/29 22:15:04         </Endpoint>
2015/12/29 22:15:04         <Endpoint name="HTTPS" address="10.0.2.4:443" protocol="tcp" hostName="tandemwuscs2ContractContract" isPublic="true" loadBalancedPublicAddress="104.42.227.47:443" enableDirectServerReturn="false" isDirectAddress="false" disableStealthMode="false">
2015/12/29 22:15:04           <LocalPorts>
2015/12/29 22:15:04             <LocalPortRange from="443" to="443" />
2015/12/29 22:15:04           </LocalPorts>
2015/12/29 22:15:04         </Endpoint>
2015/12/29 22:15:04         <Endpoint name="SSH" address="10.0.2.4:22" protocol="tcp" hostName="tandemwuscs2ContractContract" isPublic="true" loadBalancedPublicAddress="104.42.227.47:22" enableDirectServerReturn="false" isDirectAddress="false" disableStealthMode="false">
2015/12/29 22:15:04           <LocalPorts>
2015/12/29 22:15:04             <LocalPortRange from="22" to="22" />
2015/12/29 22:15:04           </LocalPorts>
2015/12/29 22:15:04         </Endpoint>
2015/12/29 22:15:04       </InputEndpoints>
2015/12/29 22:15:04     </Instance>
2015/12/29 22:15:04   </Instances>
2015/12/29 22:15:04 </SharedConfig>
2015/12/29 22:15:04 Save SharedConfig.xml
2015/12/29 22:15:04 ExtensionsConfig
2015/12/29 22:15:04 ExtensionsConfigUrl:http://168.63.129.16:80/machine/f36d47f0-fd8f-4f4a-af8b-b3cf1b783915/91ec1b92b962481b8d752dbd2f3dd7c8.tandemwusvm2?comp=config&type=extensionsConfig&incarnation=1
2015/12/29 22:15:04 HTTP Req: GET http://168.63.129.16:80/machine/f36d47f0-fd8f-4f4a-af8b-b3cf1b783915/91ec1b92b962481b8d752dbd2f3dd7c8.tandemwusvm2?comp=config&type=extensionsConfig&incarnation=1
2015/12/29 22:15:04 HTTP Req: Data=None
2015/12/29 22:15:04 HTTP Req: Header={'x-ms-version': '2012-11-30', 'x-ms-agent-name': 'WALinuxAgent'}
2015/12/29 22:15:04 FullConfig
2015/12/29 22:15:04 ConfigName
2015/12/29 22:15:04 Process goalstate
2015/12/29 22:15:04 cp /usr/sbin/waagent /tmp/
2015/12/29 22:15:04 chmod +x /tmp/bsd_activate_resource_disk.py
2015/12/29 22:15:04 Spawning bsd_activate_resource_disk.py
2015/12/29 22:15:04 ifconfig
2015/12/29 22:15:04 lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
2015/12/29 22:15:04     options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
2015/12/29 22:15:04     inet6 ::1 prefixlen 128
2015/12/29 22:15:04     inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
2015/12/29 22:15:04     inet 127.0.0.1 netmask 0xff000000
2015/12/29 22:15:04     nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
2015/12/29 22:15:04 hn0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
2015/12/29 22:15:04     options=31b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,TSO4,TSO6>
2015/12/29 22:15:04     ether 00:0d:3a:33:4c:3c
2015/12/29 22:15:04     inet 10.0.2.4 netmask 0xffffff00 broadcast 10.0.2.255
2015/12/29 22:15:04     nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
2015/12/29 22:15:04
2015/12/29 22:15:04 ifconfig | grep -A2 -B2 ether | grep -B3 inet | grep -A4 UP
2015/12/29 22:15:04 ssh-keygen -lf /etc/ssh/ssh_host_rsa_key.pub
2015/12/29 22:15:05 HTTP Req: POST /machine?comp=roleProperties
2015/12/29 22:15:05 HTTP Req: Data=<?xml version="1.0" encoding="utf-8"?><RoleProperties><Container><ContainerId>f36d47f0-fd8f-4f4a-af8b-b3cf1b783915</ContainerId><RoleInstances><RoleInstance><Id>91ec1b92b962481b8d752dbd2f3dd7c8.tandemwusvm2</Id><Properties><Property name="CertificateThumbprint" value="7ca67ce486327ad853e932a4b0d3062d" /></Properties></RoleInstance></RoleInstances></Container></RoleProperties>
2015/12/29 22:15:05 HTTP Req: Header={'Content-Type': 'text/xml; charset=utf-8', 'x-ms-version': '2012-11-30', 'x-ms-agent-name': 'WALinuxAgent'}
2015/12/29 22:15:05 Posted Role Properties. CertificateThumbprint=7ca67ce486327ad853e932a4b0d3062d
2015/12/29 22:15:05 Resource disk (/dev/da1s1) is mounted at /mnt/resource with fstype ufs2
2015/12/29 22:15:08 HTTP Req: POST /machine?comp=health
2015/12/29 22:15:08 pgrep -n dhclient
2015/12/29 22:15:08 HTTP Req: Data=<?xml version="1.0" encoding="utf-8"?><Health xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><GoalStateIncarnation>1</GoalStateIncarnation><Container><ContainerId>f36d47f0-fd8f-4f4a-af8b-b3cf1b783915</ContainerId><RoleInstanceList><Role><InstanceId>91ec1b92b962481b8d752dbd2f3dd7c8.tandemwusvm2</InstanceId><Health><State>Ready</State></Health></Role></RoleInstanceList></Container></Health>
2015/12/29 22:15:08 HTTP Req: Header={'Content-Type': 'text/xml; charset=utf-8', 'x-ms-version': '2012-11-30', 'x-ms-agent-name': 'WALinuxAgent'}
2015/12/29 22:15:08 <?xml version="1.0" encoding="utf-8"?>
2015/12/29 22:15:08 <Extensions version="1.0.0.0" goalStateIncarnation="1"><GuestAgentExtension xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
2015/12/29 22:15:08   <GAFamilies>
2015/12/29 22:15:08     <GAFamily>
2015/12/29 22:15:08       <Name>Prod</Name>
2015/12/29 22:15:08       <Uris>
2015/12/29 22:15:08         <Uri>http://brdfepirv2by3prdstr04.blob.core.windows.net/7d89d439b79f4452950452399add2c90/Microsoft.OSTCLinuxAgent_Prod_uswest_manifest.xml</Uri>
2015/12/29 22:15:08         <Uri>http://rdfepirv2by1prdstr01.blob.core.windows.net/7d89d439b79f4452950452399add2c90/Microsoft.OSTCLinuxAgent_Prod_uswest_manifest.xml</Uri>
2015/12/29 22:15:08         <Uri>http://rdfepirv2by1prdstr02.blob.core.windows.net/7d89d439b79f4452950452399add2c90/Microsoft.OSTCLinuxAgent_Prod_uswest_manifest.xml</Uri>
2015/12/29 22:15:08         <Uri>http://rdfepirv2by2prdstr01.blob.core.windows.net/7d89d439b79f4452950452399add2c90/Microsoft.OSTCLinuxAgent_Prod_uswest_manifest.xml</Uri>
2015/12/29 22:15:08         <Uri>http://rdfepirv2by2prdstr02.blob.core.windows.net/7d89d439b79f4452950452399add2c90/Microsoft.OSTCLinuxAgent_Prod_uswest_manifest.xml</Uri>
2015/12/29 22:15:08         <Uri>http://rdfepirv2by3prdstr01.blob.core.windows.net/7d89d439b79f4452950452399add2c90/Microsoft.OSTCLinuxAgent_Prod_uswest_manifest.xml</Uri>
2015/12/29 22:15:08         <Uri>http://rdfepirv2by3prdstr02.blob.core.windows.net/7d89d439b79f4452950452399add2c90/Microsoft.OSTCLinuxAgent_Prod_uswest_manifest.xml</Uri>
2015/12/29 22:15:08         <Uri>http://rdfepirv2by3prdstr03.blob.core.windows.net/7d89d439b79f4452950452399add2c90/Microsoft.OSTCLinuxAgent_Prod_uswest_manifest.xml</Uri>
2015/12/29 22:15:08         <Uri>http://zrdfepirv2by4prdstr02.blob.core.windows.net/7d89d439b79f4452950452399add2c90/Microsoft.OSTCLinuxAgent_Prod_uswest_manifest.xml</Uri>
2015/12/29 22:15:08         <Uri>http://zrdfepirv2by4prdstr03.blob.core.windows.net/7d89d439b79f4452950452399add2c90/Microsoft.OSTCLinuxAgent_Prod_uswest_manifest.xml</Uri>
2015/12/29 22:15:08       </Uris>
2015/12/29 22:15:08     </GAFamily>
2015/12/29 22:15:08     <GAFamily>
2015/12/29 22:15:08       <Name>Test</Name>
2015/12/29 22:15:08       <Uris>
2015/12/29 22:15:08         <Uri>http://brdfepirv2by3prdstr04.blob.core.windows.net/7d89d439b79f4452950452399add2c90/Microsoft.OSTCLinuxAgent_Test_uswest_manifest.xml</Uri>
2015/12/29 22:15:08         <Uri>http://rdfepirv2by1prdstr01.blob.core.windows.net/7d89d439b79f4452950452399add2c90/Microsoft.OSTCLinuxAgent_Test_uswest_manifest.xml</Uri>
2015/12/29 22:15:08         <Uri>http://rdfepirv2by1prdstr02.blob.core.windows.net/7d89d439b79f4452950452399add2c90/Microsoft.OSTCLinuxAgent_Test_uswest_manifest.xml</Uri>
2015/12/29 22:15:08         <Uri>http://rdfepirv2by2prdstr01.blob.core.windows.net/7d89d439b79f4452950452399add2c90/Microsoft.OSTCLinuxAgent_Test_uswest_manifest.xml</Uri>
2015/12/29 22:15:08         <Uri>http://rdfepirv2by2prdstr02.blob.core.windows.net/7d89d439b79f4452950452399add2c90/Microsoft.OSTCLinuxAgent_Test_uswest_manifest.xml</Uri>
2015/12/29 22:15:08         <Uri>http://rdfepirv2by3prdstr01.blob.core.windows.net/7d89d439b79f4452950452399add2c90/Microsoft.OSTCLinuxAgent_Test_uswest_manifest.xml</Uri>
2015/12/29 22:15:08         <Uri>http://rdfepirv2by3prdstr02.blob.core.windows.net/7d89d439b79f4452950452399add2c90/Microsoft.OSTCLinuxAgent_Test_uswest_manifest.xml</Uri>
2015/12/29 22:15:08         <Uri>http://rdfepirv2by3prdstr03.blob.core.windows.net/7d89d439b79f4452950452399add2c90/Microsoft.OSTCLinuxAgent_Test_uswest_manifest.xml</Uri>
2015/12/29 22:15:08         <Uri>http://zrdfepirv2by4prdstr02.blob.core.windows.net/7d89d439b79f4452950452399add2c90/Microsoft.OSTCLinuxAgent_Test_uswest_manifest.xml</Uri>
2015/12/29 22:15:08         <Uri>http://zrdfepirv2by4prdstr03.blob.core.windows.net/7d89d439b79f4452950452399add2c90/Microsoft.OSTCLinuxAgent_Test_uswest_manifest.xml</Uri>
2015/12/29 22:15:08       </Uris>
2015/12/29 22:15:08     </GAFamily>
2015/12/29 22:15:08   </GAFamilies>
2015/12/29 22:15:08   <Location>westus</Location>
2015/12/29 22:15:08 </GuestAgentExtension>
2015/12/29 22:15:08 <StatusUploadBlob statusBlobType="BlockBlob">https://tandemwusss2.blob.core.windows.net/vmdepot-images/tandemwuscs2.tandemwuscs2.tandemwusvm2.status?sr=b&amp;sp=rw&amp;se=9999-01-01&amp;sk=key1&amp;sv=2014-02-14&amp;sig=LsPE7wrsqL3T7%2FkoyQHjv1QxJZ1HnqHlLYEoiIBFk3w%3D</StatusUploadBlob></Extensions>
2015/12/29 22:15:08 Finished processing ExtensionsConfig.xml
2015/12/29 22:15:08 Upload status blob
2015/12/29 22:15:08 Status={"version":"1.0","timestampUTC":"2015-12-29T22:15:08Z","aggregateStatus":{"guestAgentStatus":{"version":"WALinuxAgent-2.0.15","status":"Ready","formattedMessage":{"lang":"en-US","message":"GuestAgent is running and accepting new configurations."}},"handlerAggregateStatus":[]}}
2015/12/29 22:15:08 Check blob type.
2015/12/29 22:15:08 HTTP Req: HEAD https://tandemwusss2.blob.core.windows.net/vmdepot-images/tandemwuscs2.tandemwuscs2.tandemwusvm2.status?sr=b&sp=rw&se=9999-01-01&sk=key1&sv=2014-02-14&sig=LsPE7wrsqL3T7%2FkoyQHjv1QxJZ1HnqHlLYEoiIBFk3w%3D
2015/12/29 22:15:08 HTTP Req: Data=None
2015/12/29 22:15:08 HTTP Req: Header={'x-ms-version': '2014-02-14', 'x-ms-date': '2015-12-29T22:15:08Z'}
2015/12/29 22:15:10 Blob type=BlockBlob
2015/12/29 22:15:10 Upload block blob
2015/12/29 22:15:10 HTTP Req: PUT https://tandemwusss2.blob.core.windows.net/vmdepot-images/tandemwuscs2.tandemwuscs2.tandemwusvm2.status?sr=b&sp=rw&se=9999-01-01&sk=key1&sv=2014-02-14&sig=LsPE7wrsqL3T7%2FkoyQHjv1QxJZ1HnqHlLYEoiIBFk3w%3D
2015/12/29 22:15:10 HTTP Req: Data={"version":"1.0","timestampUTC":"2015-12-29T22:15:08Z","aggregateStatus":{"guestAgentStatus":{"version":"WALinuxAgent-2.0.15","status":"Ready","formattedMessage":{"lang":"en-US","message":"GuestAgent is running and accepting new configurations."}},"handlerAggregateStatus":[]}}
2015/12/29 22:15:10 HTTP Req: Header={'Content-Length': '277', 'x-ms-version': '2014-02-14', 'x-ms-blob-type': 'BlockBlob', 'x-ms-date': '2015-12-29T22:15:10Z'}
2015/12/29 22:15:10 Status report {"version":"1.0","timestampUTC":"2015-12-29T22:15:08Z","aggregateStatus":{"guestAgentStatus":{"version":"WALinuxAgent-2.0.15","status":"Ready","formattedMessage":{"lang":"en-US","message":"GuestAgent is running and accepting new configurations."}},"handlerAggregateStatus":[]}} sent to https://tandemwusss2.blob.core.windows.net/vmdepot-images/tandemwuscs2.tandemwuscs2.tandemwusvm2.status?sr=b&sp=rw&se=9999-01-01&sk=key1&sv=2014-02-14&sig=LsPE7wrsqL3T7%2FkoyQHjv1QxJZ1HnqHlLYEoiIBFk3w%3D
2015/12/29 22:15:10 sysctl hw.realmem | awk '{print $2}'
2015/12/29 22:15:10 sysctl hw.ncpu | awk '{print $2}'
2015/12/29 22:15:10 ls -t /var/lib/waagent/GoalState.*.xml
2015/12/29 22:15:10 HTTP Req: POST /machine/?comp=telemetrydata
2015/12/29 22:15:10 HTTP Req: Data=<?xml version="1.0"?><TelemetryData version="1.0"><Provider id="69B669B9-4AF8-4C50-BDC4-6006FA76E975"><Event id="1"><![CDATA[<Param Name="OperationSuccess" T="mt:bool" Value="True"/><Param Name="Processors" T="mt:uint64" Value="2"/><Param Name="OpcodeName" T="mt:wstr" Value=""/><Param Name="Version" T="mt:wstr" Value="1.0"/><Param Name="RoleName" T="mt:wstr" Value="tandemwusvm2"/><Param Name="IsInternal" T="mt:bool" Value="False"/><Param Name="RAM" T="mt:uint64" Value="7340032"/><Param Name="ExecutionMode" T="mt:wstr" Value="IAAS"/><Param Name="RoleInstanceName" T="mt:wstr" Value="tandemwusvm2"/><Param Name="Name" T="mt:wstr" Value="WALA"/><Param Name="Message" T="mt:wstr" Value=""/><Param Name="KeywordName" T="mt:wstr" Value=""/><Param Name="TaskName" T="mt:wstr" Value=""/><Param Name="OSVersion" T="mt:wstr" Value="FreeBSD:FreeBSD-10.2:10.2-RELEASE-p7"/><Param Name="Operation" T="mt:wstr" Value="HeartBeat"/><Param Name="ContainerId" T="mt:wstr" Value="f36d47f0-fd8f-4f4a-af8b-b3cf1b783915"/><Param Name="GAVersion" T="mt:wstr" Value="WALinuxAgent-2.0.15"/><Param Name="TenantName" T="mt:wstr" Value="91ec1b92b962481b8d752dbd2f3dd7c8"/><Param Name="Duration" T="mt:uint64" Value="0"/><Param Name="ExtensionType" T="mt:wstr" Value=""/>]]></Event></Provider></TelemetryData>
2015/12/29 22:15:10 HTTP Req: Header={'Content-Type': 'text/xml; charset=utf-8', 'x-ms-version': '2012-11-30', 'x-ms-agent-name': 'WALinuxAgent'}
2015/12/29 22:15:13 pgrep -n dhclient

It then does this on repeat for an hour until it just stops:

2015/12/30 18:45:25 HTTP Req: POST /machine?comp=health
2015/12/30 18:45:25 HTTP Req: Data=<?xml version="1.0" encoding="utf-8"?><Health xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><GoalStateIncarnation>1</GoalStateIncarnation><Container><ContainerId>176281c2-49bb-4d3b-a347-48fa6cf11a8c</ContainerId><RoleInstanceList><Role><InstanceId>91ec1b92b962481b8d752dbd2f3dd7c8.tandemwusvm2</InstanceId><Health><State>Ready</State></Health></Role></RoleInstanceList></Container></Health>
2015/12/30 18:45:25 HTTP Req: Header={'Content-Type': 'text/xml; charset=utf-8', 'x-ms-version': '2012-11-30', 'x-ms-agent-name': 'WALinuxAgent'}
2015/12/30 18:45:25 Upload status blob
2015/12/30 18:45:25 Status={"version":"1.0","timestampUTC":"2015-12-30T18:45:25Z","aggregateStatus":{"guestAgentStatus":{"version":"WALinuxAgent-2.0.15","status":"Ready","formattedMessage":{"lang":"en-US","message":"GuestAgent is running and accepting new configurations."}},"handlerAggregateStatus":[]}}
2015/12/30 18:45:25 Check blob type.
2015/12/30 18:45:25 HTTP Req: HEAD https://tandemwusss2.blob.core.windows.net/vmdepot-images/tandemwuscs2.tandemwuscs2.tandemwusvm2.status?sr=b&sp=rw&se=9999-01-01&sk=key1&sv=2014-02-14&sig=LsPE7wrsqL3T7%2FkoyQHjv1QxJZ1HnqHlLYEoiIBFk3w%3D
2015/12/30 18:45:25 HTTP Req: Data=None
2015/12/30 18:45:25 HTTP Req: Header={'x-ms-version': '2014-02-14', 'x-ms-date': '2015-12-30T18:45:25Z'}
2015/12/30 18:45:25 Blob type=BlockBlob
2015/12/30 18:45:25 Upload block blob
2015/12/30 18:45:25 HTTP Req: PUT https://tandemwusss2.blob.core.windows.net/vmdepot-images/tandemwuscs2.tandemwuscs2.tandemwusvm2.status?sr=b&sp=rw&se=9999-01-01&sk=key1&sv=2014-02-14&sig=LsPE7wrsqL3T7%2FkoyQHjv1QxJZ1HnqHlLYEoiIBFk3w%3D
2015/12/30 18:45:25 HTTP Req: Data={"version":"1.0","timestampUTC":"2015-12-30T18:45:25Z","aggregateStatus":{"guestAgentStatus":{"version":"WALinuxAgent-2.0.15","status":"Ready","formattedMessage":{"lang":"en-US","message":"GuestAgent is running and accepting new configurations."}},"handlerAggregateStatus":[]}}
2015/12/30 18:45:25 HTTP Req: Header={'Content-Length': '277', 'x-ms-version': '2014-02-14', 'x-ms-blob-type': 'BlockBlob', 'x-ms-date': '2015-12-30T18:45:25Z'}
2015/12/30 18:45:25 Status report {"version":"1.0","timestampUTC":"2015-12-30T18:45:25Z","aggregateStatus":{"guestAgentStatus":{"version":"WALinuxAgent-2.0.15","status":"Ready","formattedMessage":{"lang":"en-US","message":"GuestAgent is running and accepting new configurations."}},"handlerAggregateStatus":[]}} sent to https://tandemwusss2.blob.core.windows.net/vmdepot-images/tandemwuscs2.tandemwuscs2.tandemwusvm2.status?sr=b&sp=rw&se=9999-01-01&sk=key1&sv=2014-02-14&sig=LsPE7wrsqL3T7%2FkoyQHjv1QxJZ1HnqHlLYEoiIBFk3w%3D
2015/12/30 18:45:30 pgrep -n dhclient
2015/12/30 18:45:35 pgrep -n dhclient
2015/12/30 18:45:40 pgrep -n dhclient
2015/12/30 18:45:45 pgrep -n dhclient
2015/12/30 18:45:50 pgrep -n dhclient

I have tried restarting the service after it stops reporting the health - but that doesn't help. Might be related to the issue #141. For example:

2015/12/29 23:25:12 pgrep -n dhclient
2015/12/29 23:27:26 Azure Linux Agent Version: WALinuxAgent-2.0.15
2015/12/29 23:31:08 Azure Linux Agent Version: WALinuxAgent-2.0.15
2015/12/29 23:32:21 Azure Linux Agent Version: WALinuxAgent-2.0.15
2015/12/30 00:01:23 Azure Linux Agent Version: WALinuxAgent-2.0.15
2015/12/30 00:01:23 uname -r

Line 1 is the last log entry - it didn't report health after that for a 7 minutes so I restarted the service multiple times (line 2 - 4) - Azure finally reboots the VM and it comes back up on Line 5 - 6.

waagent hook on resource disk mount success/failure

i would like to have a hook for resource diskt mount events on startup
a script being started on resoucre disk mount indicating success / or failure
currently this is done by a StateConsumer but in branch future: the mounting is done separately in a background thread which might lead to race conditions for my current state consumer

Building Debian style package fails on 2.0 branch and 1.4.0 tag

Distribution is Ubuntu 12.04 and full output of the build failure is pasted below:

dpkg-buildpackage: export CFLAGS from dpkg-buildflags (origin: vendor): -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security
dpkg-buildpackage: export CPPFLAGS from dpkg-buildflags (origin: vendor): -D_FORTIFY_SOURCE=2
dpkg-buildpackage: export CXXFLAGS from dpkg-buildflags (origin: vendor): -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security
dpkg-buildpackage: export FFLAGS from dpkg-buildflags (origin: vendor): -g -O2
dpkg-buildpackage: export LDFLAGS from dpkg-buildflags (origin: vendor): -Wl,-Bsymbolic-functions -Wl,-z,relro
dpkg-buildpackage: source package walinuxagent
dpkg-buildpackage: source version 1.3-0ubuntu1
dpkg-buildpackage: source changed by Ben Howard <[email protected]>
dpkg-buildpackage: host architecture amd64
 dpkg-source --before-build WALinuxAgent
 debian/rules clean
dh clean --with python2
   dh_testdir
   dh_auto_clean
running clean
'build/lib.linux-x86_64-2.7' does not exist -- can't clean it
'build/bdist.linux-x86_64' does not exist -- can't clean it
'build/scripts-2.7' does not exist -- can't clean it
   dh_clean
 dpkg-source -b WALinuxAgent
dpkg-source: info: using source format `3.0 (native)'
dpkg-source: info: building walinuxagent in walinuxagent_1.3-0ubuntu1.tar.gz
dpkg-source: info: building walinuxagent in walinuxagent_1.3-0ubuntu1.dsc
 debian/rules build
dh build --with python2
   dh_testdir
   dh_auto_configure
   dh_auto_build
running build
   dh_auto_test
 debian/rules binary
dh binary --with python2
   dh_testroot
   dh_prep
   dh_installdirs
   dh_auto_install
running install
dh_auto_install: python setup.py install --force --root=/root/WALinuxAgent/debian/tmp --no-compile -O0 --install-layout=deb returned exit code 1
make: *** [binary] Error 1
dpkg-buildpackage: error: debian/rules binary gave error exit status 2

Funny thing is when I checkout the 1.3.x tag, the agent seems to build fine with dpkg-buildpackage and/or pbulider as described in the README file.

Agent hangs during provisioning processes

Agent hangs during provisioning, last message in /var/log/waagent.log is:

"Probing for Windows Azure environment."

The result is VM never fully provisions, gets stuck in "Provisioning" status.

waagnet python exception AttributeError: 'unicode' object has no attribute 'attrib'

Noticed swap failed to mount and found that waagent aborted and didn't start in the /var/log/waagent.log

Related to #76, except it's not ubuntu and does not use cloud_init. It's a custom Linux image:

$ /usr/sbin/waagent -version                  
AzureLinuxAgent-2.1.0 running on kali 2.0
$ python --version
Python 2.7.9

When the VM was originally provisioned, waagent created the swap file in /mnt/resources and swap was made available.

When rebooting the VM, the swap file was not created or enabled.

2015/12/23 12:51:27.108498 INFO Configure routes
2015/12/23 12:51:27.117699 INFO Detect default protocol.
2015/12/23 12:51:27.419800 INFO Fabric preferred wire protocol version:2015-04-05
2015/12/23 12:51:27.424300 INFO Wire protocol version:2012-11-30
2015/12/23 12:51:27.427163 WARNING Server prefered version:2015-04-05
2015/12/23 12:51:27.631573 ERROR Traceback (most recent call last):
  File "/usr/sbin/waagent", line 29, in <module>
    agent.Main()
  File "/usr/lib/python2.7/dist-packages/azurelinuxagent/agent.py", line 111, in Main
    Run()
  File "/usr/lib/python2.7/dist-packages/azurelinuxagent/agent.py", line 41, in Run
    Handlers.runHandler.run()
  File "/usr/lib/python2.7/dist-packages/azurelinuxagent/distro/default/run.py", line 50, in run
    prot.DetectDefaultProtocol()
  File "/usr/lib/python2.7/dist-packages/azurelinuxagent/protocol/protocolFactory.py", line 79, in DetectDefaultProtocol
    availableProtocols = DetectAvailableProtocols()
  File "/usr/lib/python2.7/dist-packages/azurelinuxagent/protocol/protocolFactory.py", line 71, in DetectAvailableProtocols
    protocol = probeFunc()
  File "/usr/lib/python2.7/dist-packages/azurelinuxagent/protocol/protocolFactory.py", line 50, in DetectV1
    protocol.initialize()
  File "/usr/lib/python2.7/dist-packages/azurelinuxagent/protocol/v1.py", line 68, in initialize
    self.client.updateGoalState(forced=True)
  File "/usr/lib/python2.7/dist-packages/azurelinuxagent/protocol/v1.py", line 481, in updateGoalState
    self.updateExtensionsConfig(goalState)
  File "/usr/lib/python2.7/dist-packages/azurelinuxagent/protocol/v1.py", line 446, in updateExtensionsConfig
    self.extensionsConfig = ExtensionsConfig(xmlText)
  File "/usr/lib/python2.7/dist-packages/azurelinuxagent/protocol/v1.py", line 902, in __init__
    self.parse(xmlText)
  File "/usr/lib/python2.7/dist-packages/azurelinuxagent/protocol/v1.py", line 938, in parse
    settings)
  File "/usr/lib/python2.7/dist-packages/azurelinuxagent/protocol/v1.py", line 936, in <lambda>
    pluginSettings = filter(lambda x: x.attrib["name"] == name
AttributeError: 'unicode' object has no attribute 'attrib'

waagent fails to deploy SSH key on CentOS 7

Relevant excerpt from waagent.log after provisioning is attempted:

2015/08/19 12:35:10 Created user account: azureuser
2015/08/19 12:35:10 Deploy public key:28EC0E2C8F27A2A0D081742A97D517CBD1FFFFFF
2015/08/19 12:35:10 ERROR:Failed: 28EC0E2C8F27A2A0D081742A97D517CBD1FFFFFF.pub.crt -> /home/azureuser/.ssh/authorized_keys
2015/08/19 12:35:10 ERROR:CalledProcessError.  Error Code is 1
2015/08/19 12:35:10 ERROR:CalledProcessError.  Command string was chcon unconfined_u:object_r:ssh_home_t:s0 /home/azureuser/.ssh/authorized_keys
2015/08/19 12:35:10 ERROR:CalledProcessError.  Command result was chcon: cannot access /home/azureuser/.ssh/authorized_keys: No such file or directory
2015/08/19 12:35:10 ERROR:Traceback (most recent call last):
2015/08/19 12:35:10 ERROR:  File "/usr/sbin/waagent", line 6048, in main
2015/08/19 12:35:10 ERROR:    WaAgent.Run()
2015/08/19 12:35:10 ERROR:  File "/usr/sbin/waagent", line 5571, in Run
2015/08/19 12:35:10 ERROR:    provisionError = self.Provision()
2015/08/19 12:35:10 ERROR:  File "/usr/sbin/waagent", line 5457, in Provision
2015/08/19 12:35:10 ERROR:    error = ovfobj.Process()
2015/08/19 12:35:10 ERROR:  File "/usr/sbin/waagent", line 4566, in Process
2015/08/19 12:35:10 ERROR:    ChangeOwner(path, self.UserName)
2015/08/19 12:35:10 ERROR:  File "/usr/sbin/waagent", line 2242, in ChangeOwner
2015/08/19 12:35:10 ERROR:    os.chown(filepath, p[2], p[3])
2015/08/19 12:35:10 ERROR:OSError: [Errno 2] No such file or directory: '/home/azureuser/.ssh/authorized_keys'
2015/08/19 12:35:10 ERROR:
2015/08/19 12:35:10 ERROR:Exception: [Errno 2] No such file or directory: '/home/azureuser/.ssh/authorized_keys'

At the very least, this should not cause a crash (which prevents provisioning from completing). We shouldn't try to chcon/chown/chmod the file if we failed to create it, and even if we did, the error should be graceful.

Machine configuration: http://rpm.cottsay.net/el7.1-azure-ks.cfg

Thanks,

--scott

EDIT: This is using WALinuxAgent-2.0.14-1.el7 from EPEL: https://apps.fedoraproject.org/packages/WALinuxAgent

Creating a swapfile using dd is extremely slow, please use fallocate on Linux

@butangmucat told me today that his Azure instance takes 10 mins to generate a swapfile on each boot. Most sane Linux admins, however, people prefer to use fallocate(1) to do the work of creating a non-sparse file, especially on IO-speed-challanged conditions like Azure. This also reduces disk wear (trivial to say, isn't it?).

The biggest difference of using dd and fallocate is that the former creates a file with some given contents, while the latter only allocates some space for a file. Since the space is allocated (therefore the file is not sparse), it's still effective for swaps.

https://github.com/Azure/WALinuxAgent/blob/2.0/waagent#L545 exhibits this behavior:

swap = Config.get("ResourceDisk.EnableSwap")
if swap == None or swap.lower().startswith("n"):
    return
sizeKB = int(Config.get("ResourceDisk.SwapSizeMB")) * 1024
if os.path.isfile(mountpoint + "/swapfile") and os.path.getsize(mountpoint + "/swapfile") != (sizeKB * 1024):
    os.remove(mountpoint + "/swapfile")
if not os.path.isfile(mountpoint + "/swapfile"):
    Run("dd if=/dev/zero of=" + mountpoint + "/swapfile bs=1024 count=" + str(sizeKB))
    Run("mkswap " + mountpoint + "/swapfile")
if not Run("swapon " + mountpoint + "/swapfile"):
    Log("Enabled " + str(sizeKB) + " KB of swap at " + mountpoint + "/swapfile")
else:
    Error("ActivateResourceDisk: Failed to activate swap at " + mountpoint + "/swapfile")

See also https://stackoverflow.com/questions/257844/quickly-create-a-large-file-on-a-linux-system.

Resolves #127.

ERROR:JSON error, unable to process manifestdata

I'm attempting to run a Docker container (which has run successfully on several other systems) on an Ubuntu 14.04 LTS Azure VM (created from the gallery) and it does not appear to finish starting up. I was only able to find this little bit of information in the waagent log file which might hold a clue. Here is the complete entry:

2015/06/22 17:50:15 Status report {"version":"1.0","timestampUTC":"2015-06-22T17:50:15Z","aggregateStatus":{"guestAgentStatus":{"version":"WALinuxAgent-2.0.5","status":"Ready","formattedMessage":{"lang":"en-US","message":"GuestAgent is running and accepting new configurations."}},"handlerAggregateStatus":[[{
2015/06/22 17:50:15 "version": 1.0,
2015/06/22 17:50:15 "timestampUTC": "2015-06-19T20:35:37Z",
2015/06/22 17:50:15 "status" : {
2015/06/22 17:50:15 "name": "Enable Docker",
2015/06/22 17:50:15 "operation": "Enabling Docker",
2015/06/22 17:50:15 "status": "success",
2015/06/22 17:50:15 "formattedMessage": {
2015/06/22 17:50:15 "lang": "en",
2015/06/22 17:50:15 "message": "Enabling Docker Completed."
2015/06/22 17:50:15 }
2015/06/22 17:50:15 }
2015/06/22 17:50:15 }]
2015/06/22 17:50:15 ]}} sent to blah-blah-blah
2015/06/22 17:50:15 ERROR:JSON error, unable to process manifestdata

Redhat6xOSUtil vs DefaultOSUtil duplication

class Redhat6xOSUtil(DefaultOSUtil):
    def __init__(self):
        super(Redhat6xOSUtil, self).__init__()
        self.sshd_conf_file_path = '/etc/ssh/sshd_config'
        self.openssl_cmd = '/usr/bin/openssl'
        self.conf_file_path = '/etc/waagent.conf'
        self.selinux=None
class DefaultOSUtil(object):

    def __init__(self):
        self.lib_dir = "/var/lib/waagent"
        self.ext_log_dir = "/var/log/azure"
        self.dvd_mount_point = "/mnt/cdrom/secure"
        self.ovf_env_file_path = "/mnt/cdrom/secure/ovf-env.xml"
        self.agent_pid_file_path = "/var/run/waagent.pid"
        self.passwd_file_path = "/etc/shadow"
        self.home = '/home'
        self.sshd_conf_file_path = '/etc/ssh/sshd_config'
        self.openssl_cmd = '/usr/bin/openssl'
        self.conf_file_path = '/etc/waagent.conf'
        self.selinux=None

everything defined under Redhat6xOSUtil's constructor are already set by DefaultOSUtil's constructor. I fail to see point of this duplication.

cc: @brendandixon

CentOS 7 support?

Hi,

Just a quick check, is CentOS 7 supported by this agent? I am asking because there is a lot changed under the hood in CentOS 7 since CentOS 6.x.

Regards,
Hugo

WALinuxAgent 2.0 under Freebsd

Here is the log from waagent.log file. It looks like I did something wrong and agent failed at launch. Maybe I just don't understand how to test if it work or not.
This is freebsd 10 release system.

2014/04/26 21:28:47 Windows Azure Linux Agent Version: WALinuxAgent-2.0.5-PRE
2014/04/26 21:28:47 Module /lib/modules/10.0-RELEASE/kernel/drivers/ata/ata_piix.ko driver for ATAPI CD-ROM does not exist.
2014/04/26 21:28:47 VMM Init script not found. Provisioning for Azure
2014/04/26 21:28:47 lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
2014/04/26 21:28:47 options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
2014/04/26 21:28:47 inet6 ::1 prefixlen 128
2014/04/26 21:28:47 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
2014/04/26 21:28:47 inet 127.0.0.1 netmask 0xff000000
2014/04/26 21:28:47 nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
2014/04/26 21:28:47 hn0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
2014/04/26 21:28:47 options=18<VLAN_MTU,VLAN_HWTAGGING>
2014/04/26 21:28:47 ether 00:15:5d:d0:1c:ce
2014/04/26 21:28:47 inet 100.70.32.79 netmask 0xfffffe00 broadcast 100.70.33.255
2014/04/26 21:28:47 nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
2014/04/26 21:28:47
2014/04/26 21:28:47 IPv4 address: 100.70.32.79
2014/04/26 21:28:47 lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
2014/04/26 21:28:47 options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
2014/04/26 21:28:47 inet6 ::1 prefixlen 128
2014/04/26 21:28:47 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
2014/04/26 21:28:47 inet 127.0.0.1 netmask 0xff000000
2014/04/26 21:28:47 nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
2014/04/26 21:28:47 hn0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
2014/04/26 21:28:47 options=18<VLAN_MTU,VLAN_HWTAGGING>
2014/04/26 21:28:47 ether 00:15:5d:d0:1c:ce
2014/04/26 21:28:47 inet 100.70.32.79 netmask 0xfffffe00 broadcast 100.70.33.255
2014/04/26 21:28:47 nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
2014/04/26 21:28:47
2014/04/26 21:28:47 MAC address: 00:15:5D:D0:1C:CE
2014/04/26 21:28:47 ERROR:Reading from file /sys/firmware/acpi/tables/OEM0 Exception is [Errno 2] No such file or directory: '/sys/firmware/acpi/tables/OEM0'
2014/04/26 21:28:47 Probing for Windows Azure environment.
2014/04/26 21:28:47 lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
2014/04/26 21:28:47 options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
2014/04/26 21:28:47 inet6 ::1 prefixlen 128
2014/04/26 21:28:47 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
2014/04/26 21:28:47 inet 127.0.0.1 netmask 0xff000000
2014/04/26 21:28:47 nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
2014/04/26 21:28:47 hn0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
2014/04/26 21:28:47 options=18<VLAN_MTU,VLAN_HWTAGGING>
2014/04/26 21:28:47 ether 00:15:5d:d0:1c:ce
2014/04/26 21:28:47 inet 100.70.32.79 netmask 0xfffffe00 broadcast 100.70.33.255
2014/04/26 21:28:47 nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
2014/04/26 21:28:47
2014/04/26 21:28:47 ERROR:CalledProcessError. Error Code is 64
2014/04/26 21:28:47 ERROR:CalledProcessError. Command string was route -n
2014/04/26 21:28:47 ERROR:CalledProcessError. Command result was route: usage: route [-dnqtv] command [[modifiers] args]
2014/04/26 21:28:47 lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
2014/04/26 21:28:47 options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
2014/04/26 21:28:47 inet6 ::1 prefixlen 128
2014/04/26 21:28:47 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
2014/04/26 21:28:47 inet 127.0.0.1 netmask 0xff000000
2014/04/26 21:28:47 nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
2014/04/26 21:28:47 hn0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
2014/04/26 21:28:47 options=18<VLAN_MTU,VLAN_HWTAGGING>
2014/04/26 21:28:47 ether 00:15:5d:d0:1c:ce
2014/04/26 21:28:47 inet 100.70.32.79 netmask 0xfffffe00 broadcast 100.70.33.255
2014/04/26 21:28:47 nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
2014/04/26 21:28:47
2014/04/26 21:28:47 DoDhcpWork: Missing default route - adding broadcast route for DHCP.
2014/04/26 21:28:47 DoDhcpWork: Setting socket.timeout=10, entering recv
2014/04/26 21:28:47 DoDhcpWork: Removing broadcast route for DHCP.
2014/04/26 21:28:47 Discovered Windows Azure endpoint: 100.70.32.160
2014/04/26 21:28:47 Fabric preferred wire protocol version: 2012-11-30
2014/04/26 21:28:47 Negotiated wire protocol version: 2012-11-30
2014/04/26 21:28:47 Retrieved GoalState from Windows Azure Fabric.
2014/04/26 21:28:47 ExpectedState: Started
2014/04/26 21:28:47 ContainerId: 24a4f28d-e92d-42b9-a415-ed6156b18a2c
2014/04/26 21:28:47 RoleInstanceId: 55cfc878d43f46d4b493969d17113db2.coroste
2014/04/26 21:28:48 Spawning bsd_activate_resource_disk.py
2014/04/26 21:28:48 Provisioning image started.
2014/04/26 21:28:48 ERROR:Traceback (most recent call last):
2014/04/26 21:28:48 ERROR: File "/usr/sbin/waagent", line 4713, in main
2014/04/26 21:28:48 ERROR: WaAgent.Run()
2014/04/26 21:28:48 ERROR: File "/usr/sbin/waagent", line 4309, in Run
2014/04/26 21:28:48 ERROR: provisionError = self.Provision()
2014/04/26 21:28:48 ERROR: File "/usr/sbin/waagent", line 4164, in Provision
2014/04/26 21:28:48 ERROR: if MyDistro.mediaHasFilesystem(dvd) is False :
2014/04/26 21:28:48 ERROR: File "/usr/sbin/waagent", line 1524, in mediaHasFilesystem
2014/04/26 21:28:48 ERROR: if Run('LC_ALL=C fdisk -p ' + dsk + ' | grep "invalid fdisk partition table found" ',False):
2014/04/26 21:28:48 ERROR:TypeError: cannot concatenate 'str' and 'NoneType' objects
2014/04/26 21:28:48 ERROR:
2014/04/26 21:28:48 ERROR:Exception: cannot concatenate 'str' and 'NoneType' objects
2014/04/26 21:28:49 Resource disk (/dev/da1s1) is mounted at /mnt/resource with fstype ufs2

Output from executing CustomData is lost

When enabling Provisioning.ExecuteCustomData all output (stdin and stderr) is lost. When executing the script fails it is difficult to figure out what happened unless you somehow log information to a custom location. It would be nice if this output automatically went to /var/log/waagent.log.

How to test WALinuxAgent

Hello,

I would like to port WALinuxAgent to a new Linux platform. However, I'm a bit unsure about how to get started -- the waagent script itself is pretty clear; but how can I test and troubleshoot the provisioning process if it fails?

I assume just uploading a VHD to Windows Azure and hoping for the best won't cut it, so are there any methods for either testing the script locally (perhaps by calling the individual endpoints) or connecting to the Azure VM should the provisioning fail halfway?

Thanks!

Not able to run Save-AzureVMImage after deprovision to capture in v2 VM

I've tested 2.0.12, 2.0.13 and 2.0.14 on an Ubuntu 14.04.02 LTS and run waagent -deprovision. After that I run Save-AzureVMImage on my VM when it's shut down and get the following error:

Save-AzureVMImage : OperationNotAllowed: Capture operation cannot be completed because the VM is not generalized.
At line:1 char:1

  • Save-AzureVMImage -DestinationContainerName "lempwp01" -VMName "redeploywebvml01 ...
  • - CategoryInfo          : CloseError: (:) [Save-AzureVMImage], CloudException
    - FullyQualifiedErrorId : Microsoft.Azure.Commands.Compute.SaveAzureVMImageCommand
    
    

Is it because it's a v2 VM?

BR /Risto Lavett

PID file not updating on service restart (FreeBSD 10.2 - waagent 2.0.15)

Note: this VM had 2.0.12 on it by default - just updated it to 2.0.15 by following the directions on this page: https://azure.microsoft.com/en-us/documentation/articles/virtual-machines-linux-update-agent/

Restarted the service:

sudo service waagent restart
/etc/rc.d/waagent: WARNING: $command_interpreter /usr/local/bin/python != python
/etc/rc.d/waagent: WARNING: $command_interpreter /usr/local/bin/python != python
Stopping waagent.
Waiting for PIDS: 636.
/etc/rc.d/waagent: WARNING: $command_interpreter /usr/local/bin/python != python
Starting waagent.

Note: the old PID was 636

Find the new PID:

ps -waux | grep waa
root      1937   0.0  0.2   96036  16620  1  I     1:18AM   0:00.15 python /usr/sbin/waagent daemon (python2.7)

Note: new PID is 1937

Check the PID file:

sudo cat /var/run/waagent.pid
636

Still using old PID. ๐Ÿ˜ฆ

Set Permissions of Resource Disk

This should probably be tagged as an enhancement request.

The Resource disk (/dev/sdb1) that the Windows Azure Linux agent mounts. It would be nice to be able to specify what permissions it has when its mounted. The nature of this resource disk would be perfect for /tmp. However, due to its dynamic allocation, permissions on /tmp do not persist across machine power cycles, and scripting an init task to set permissions on the mounted disk is not trivial as its hard to detect when the actual mount operation is completed.

Read VM location from WALinuxAgent

There should be the possibility to read location where VM is running. It can be WALinuxAgent command or node in XML configuration parsed on deployment or incarnation. In many cases the user service's configuration is based on VM location so if VM clould read it's own location it will be very usefull.

Azure vm with Ubuntu 15.10 error No module named azurelinuxagent.agent

Created fresh vm from azure gallery on prortal with Ubuntu 15.10. Checked "Install the VM Agent"
Result is:

hodza@cltemplate:~$ waagent -deprovision
Traceback (most recent call last):
File "/usr/sbin/waagent", line 31, in
import azurelinuxagent.agent as agent
ImportError: No module named azurelinuxagent.agent

Deprovision on Windows Azure VM causes hostname problem on VM created from image

I'm trying to create VM image from prepared, shutted down VM as described here: http://www.windowsazure.com/en-us/manage/linux/tutorials/intro-to-linux/#virtualmachine

I have created new, fresh VM from gallery (Ubuntu 12.04 or 13.10) and at once after first login do deprovision process with "waagent -force -deprovision+user", "export HISTSIZE=0" and "logout" then shut down machine from WA Portal. Then I have choose "capture" option and create new OS Image. Then I have created new VM from this image. Everything seems to be OK untill login and check hostname with commant "hostname -f". In Ubuntu 12.04 I have information "hostname: Temporary failure in name resolution". In Ubuntu 13.10 I have "hostname: Name or service not known".

Something is wrong with agent, or maybe I'm doing something wrong? There is proper hostname in /etc/hostname but this is not a FQ domain. But id should be OK, because Ubuntu should determine domain name and collate it with short hostname.

Can't login to ubuntu vm created from deprovisioned image.

Steps to reproduce:

  1. Create ubuntu 15.10 with password ssh auth vm in azure
  2. ssh to it and run sudo python3 /usr/sbin/waagent -deprovision
  3. delete vm
  4. create vm from image with password ssh auth
  5. try to login from putty
    Result:
    putty shows "Access denied" message
    and in putty logs last line is: password authentication failed

Workaround: reset password to a new one for user(azure portal or azure cli)

libglibmm-2.4-1c2a dependency

problems on ubuntu server on azure, 15.04 and 15.10...

It looks to me like this package is not available after 14.04 LTS, not present and not easy to provide in 15.04, 15.10 etc. I'd suspect the dependency should be less specific as to the version.

note: Azure Diags seem to 'just not work' if launching a 15.10 VM, works fine if you launch a 14.04 VM.

upgraded to 15.10 from 14.04 and sure enough complaints about this dependency started, as of 15.10, every ~30 seconds a lot of error messages get written in '/var/log/azure/Microsoft.OSTCExtensions.LinuxDiagnostic/2.0.92/extension.log'

Also, with Diags not working right, the Azure UI (preview portal is all I've tested) hangs and acts all sorts of weird ways.

in /var/log/waagent.log, you also start seeing errors like this:
2015/12/01 21:15:55.570721 INFO Report vm status
2015/12/01 21:15:55.574034 INFO Upload status blob
2015/12/01 21:15:55.635711 ERROR Failed to report vm status: Failed to clean up page blob: 400

and no new diag info shows up in the portal UI.

Seems like a major problem to me.

cdrom detection works only on EN locale

The cdrom detection is grepping fdisk output but the strings it's looking for are localized (for instance 'Disque' in FR) making it fail to detect the cdrom.
I've made a patch in my tree (apatard@ae14435) as a proposed fix. Not sure if it's the best one but at least it's working.

Document the configuration REST API

According the readme:

A TCP endpoint exposing a REST API used to obtain deployment and topology configuration.

Is this REST API documented anywhere?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.