LIFECYCLE MANAGEMENT OF IN-VEHICLE HOSTED MACHINES
Some embodiments provide a novel method for efficiently updating software of virtual machines (VMs) executing on devices in a vehicle such that updates to the software do not interrupt operations performed by the VMs. While the vehicle operates, the method collects configuration state information of a first VM executing on a device and performing a set of operations. The method uses the configuration state information to instantiate a second VM in an isolated network environment that is isolated from the first VM. The second VM is identical to the first VM at a particular time the configuration state information was collected. The method updates the second VM, and detects a compute downtime of the vehicle. During the compute downtime, the method uses the updated second VM on the device instead of the first VM such that the updated second VM performs the set of operations once the compute downtime ends.
1 . A method for efficiently updating software of virtual machines (VMs) executing on one or more devices in a vehicle such that updates to the software do not interrupt operations performed by the VMs, the method comprising:
while the vehicle operates:
collecting configuration state information of a first VM executing on a particular device, the first VM performing a particular set of operations;
using the configuration state information to instantiate a second VM in an isolated network environment that is isolated from the first VM, the second VM being identical to the first VM at a particular time the configuration state information was collected; and
updating the second VM;
detecting a compute downtime of the vehicle; and
during the compute downtime of the vehicle, using the updated second VM on the particular device instead of the first VM such that the updated second VM performs the particular set of operations once the compute downtime of the vehicle ends.
2 . The method of claim 1 , wherein the isolated network environment is an isolated network associated with a private virtual local area network (VLAN) such that the second VM does not interfere with the particular set of operations performed by the first VM when the second VM is instantiated in the isolated network and before the compute downtime of the vehicle.
3 . The method of claim 1 , wherein the collecting, using, updating, and detecting are performed by a management agent (MA) of the particular device after receiving direction to update the first VM from a management plane (MP) implemented by a set of one or more management servers that connect to the vehicle through a software-defined wide area network (SD-WAN).
4 . The method of claim 3 , wherein the set of management servers operates at a different location than the vehicle.
5 . The method of claim 3 , wherein the vehicle comprises an edge router that connects to the SD-WAN using a set of one or more wireless network connection links.
6 . The method of claim 5 , wherein the edge router is one of (i) an edge router appliance, (ii) an edge router that executes on a computer operating in the vehicle, or (iii) an edge router that executes on a machine that executes on the computer.
7 . The method of claim 5 , wherein updating the second VM comprises directing a hypervisor of the particular device to direct an update agent associated with the second VM to download, from the MP using one or more of the set of wireless network links, a set of one or more update files associated with a particular update for the first VM and update the second VM.
8 . The method of claim 3 , wherein:
the configuration state information comprises an operating system (OS) disk of the first VM that specifies one or more OS files and application software related to the first VM at the particular time the configuration state information was collected,
collecting the configuration state information comprises directing a hypervisor of the particular device to collect the OS disk at the particular time, and
using the configuration state information to instantiate the second VM comprises directing the hypervisor to use the OS disk to instantiate the second VM.
9 . The method of claim 8 , wherein using the updated second VM on the particular device instead of the first VM comprises directing the hypervisor to:
detach a set of one or more data disks comprising application data from the first VM; and
attach the set of data disks to the updated second VM such that the set of data disks needed to use the updated second VM instead of the first VM are transferred to the updated second VM.
10 . The method of claim 8 , wherein using the updated second VM on the particular device instead of the first VM further comprises directing the hypervisor to:
archive the first VM to a data store of the hypervisor; and
migrate the updated second VM from the isolated network environment to a production network environment that enables the updated second VM to perform the particular set of operations once the compute downtime of the vehicle ends.
11 . The method of claim 1 , wherein detecting the compute downtime comprises detecting a powering off of the vehicle.
12 . The method of claim 11 , wherein the updated second VM is used instead of the first VM within a particular time period after the compute downtime is detected.
13 . The method of claim 12 , wherein the compute downtime ends at a start of a next vehicle compute period.
14 . The method of claim 13 , wherein the start of the next vehicle compute period is a powering on of the vehicle.
15 . A non-transitory machine readable medium storing a program for execution by at least one processing unit for efficiently updating software of virtual machines (VMs) executing on one or more devices in a vehicle such that updates to the software does not interrupt operations performed by the VMs, the program comprising sets of instructions for:
while the vehicle operates:
collecting configuration state information of a first VM executing a particular device, the first VM performing a particular set of operations;
using the configuration state information to instantiate a second VM in an isolated network environment that is isolated from the first VM, the second VM being identical to the first VM at a particular time the configuration state information was collected; and
updating the second VM;
detecting a compute downtime of the vehicle; and
during the compute downtime of the vehicle, using the updated second VM on the particular device instead of the first VM such that the updated second VM performs the particular set of operations once the compute downtime of the vehicle ends.