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>
* update loopback detection to use SIOCGIFFLAGS and IFF_LOOPBACK; add unit tests
* adds a check for the wireserver ip, and if it does exist then skip the dhcp lookup and route manipulation; adds unit tests
* ensure the first selected interface is the primary, which is that with the default route; adds unit tests
* parse the wireserver from the dhcp leases file on disk; distro-specific, this is the ubuntu implementation; adds unit tests
* unit test fixes, python 3 changes
* code review feedback
- correct scvmm references
- add unit tests for scvmm detection
- ensure all matching devices are mounted and examined for scvmm configuration
- exit once vmm startup script is found and executed
- fixes#185
This will treat interface names such as 'lo:1' as loopback
as well. The ultimate solution is to use sysfs+procfs in this
method to check the flags and find the ipv4 addr. However sticking
to an extended check for now.
Fixes#188.