* Make sure the initial device is a valid disc, and fallback if not
This is the same check the fallback code uses, and is necessary as on
later FreeBSD 11 versions the disc are retruned in reverse order. Thus
the original function returns 'pass1' instead of 'da1' which fails. This
fixes the issue and allows the resource disc to be mounted again, though
relying on the fallback is not the cleanest solution.
* Skip 'pass' devices when looking for the resource disk
This fixes the error introduced in FreeBSD 11 where the order of
outout from camcontrol changed from da1,pass1 to pass1,da1 and thus
waagent misidentified the disc as 'pass1'. Instead of taking the
first device, we now split the string at ',' and return the first
device which does not begin 'pass'.
* log the device list when finding dvd
* improve logging for get_dvd_device
* improve logging for mount_dvd
* more granular logging for copy_ovf_env
* provisioning logging and error cleanup
* ubuntu provisioning logging cleanup
* improve Ubuntu provisioning logging
* ubuntu provision cleanup
* debugging for cloud-init
* add validation method and logging for cloud-init
* error cleanup, fix mount
* minor cleanup
* add validate cloud-init logging
* unit test fixes
FreeBSD VM gets a UUID from host which informs where resource
disk locates. But that UUID string was not exposed from VM kernel,
as a result, the agent used a hard code "2:1:0" as the location of
resource disk. That should be updated after FreeBSD VM kernel
exposed UUID through "sysctl dev.storvsc" command.
But considering compatible with previous FreeBSD VM, the hard code
logic cannot be removed, and they are left there as a fallback.
The Agent will monitor for more recent versions and update itself
(without impacting the installed version). If the new Agent fails
(in a very bad way or consistently), the code rolls back to the prior
version.
Signed-off-by: Brendan Dixon <brendand@microsoft.com>