IP Library › Granted Patent US 12,236,257
Granted Patent B2
US 12,236,257 · App. 17/678,239 · Granted Feb 25, 2025

Automatic shutdown of idle virtual machines

Inventor: Jason Nelson (Redmond, WA)
Assignee: Microsoft Technology Licensing, LLC
G06F9/45558G06F2009/45562G06F2009/45575G06F2009/45591G06F9/485G06F9/5022
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,236,257
App. No.
17/678,239
Granted
Feb 25, 2025
Kind
B2
Abstract

Methods, systems, and computer programs are presented for automatically shutting down idle virtual machines (VMs). One method includes an operation for determining a number of active connections of a VM. The method further includes checking disconnect rules to determine automatic shutting down of the VM. The disconnect rules are based on the number of active connections of the VM, and the disconnect rules define criteria for determining when to shut down the VM automatically. The method further includes, based on determining to automatically shut down the VM, sending a message indicating the VM is inactive to a VM manager program executing at a cloud-service provider. The VM manager program is configured to shut down the VM in response to receiving the message indicating the VM is inactive.

Claims (55)

1. A computer-implemented method comprising:

determining, at a connect monitor in a virtual machine operated by one or more processors of a cloud-service server, a number of active connections of the virtual machine (VM), the VM being executed on the cloud-service server;

checking at the connect monitor in the VM, disconnect rules in the VM, the disconnect rules based on the number of active connections of the VM, the disconnect rules defining criteria for determining when to shut down the VM automatically;

determining, at the connect monitor in the VM, to automatically shut down the VM based on the disconnect rules in the VM;

based on determining to automatically shut down the VM, generating, at the connect monitor in the VM, a message indicating the VM is inactive and sending the message to a VM manager program executing outside of the VM at the cloud-service server, wherein the VM manager program process the message, identify separately predetermined disconnect parameters, in the VM manager program, at the cloud-service server, and selectively shut down the VM based on the disconnect rules and the disconnect parameters.

2. The method as recited in claim 1 , wherein each active connection is an ongoing interaction between the VM and another computing device to exchange data.

3. The method as recited in claim 2 , further comprising:

for each active connection, establishing a communication channel between the VM and the another computing device.

4. The method as recited in claim 1 , wherein checking the disconnect rules comprises:

checking a disconnect rule that defines to automatically shut down the VM when a number of terminal-services connections is equal to zero; and

determining to automatically shut down the VM when the number of terminal-services connections is equal to zero.

5. The method as recited in claim 1 , wherein checking the disconnect rules comprises:

checking respective rules for one or more types of active connections.

6. The method as recited in claim 1 , wherein checking the disconnect rules comprises:

checking a threshold inactivity period; and

determining to automatically shut down the VM after the VM has zero active connections for at least the threshold inactivity period.

7. The method as recited in claim 1 , wherein checking the disconnect rules comprises:

checking a number of terminal connections; and

determining to automatically shut down the VM when the number of terminal connections is below a predetermined threshold number of terminal connections.

8. The method as recited in claim 1 , wherein checking the disconnect rules comprises:

checking a threshold number of Simple Mail Transfer Protocol (SMTP) connections; and

determining to automatically shut down the VM when the number of SMTP connections is below the threshold number of SMTP connections.

9. The method as recited in claim 1 , wherein checking the disconnect rules comprises:

checking a number of web browser tabs open; and

determining to automatically shut down the VM when the number of web browser tabs open is below a predetermined threshold number of web browser tabs open.

10. The method as recited in claim 1 , wherein checking the disconnect rules comprises:

checking an amount of time the VM is inactive; and

determining to automatically shut down the VM after the VM is inactive for a minimum amount of time.

11. The method as recited in claim 1 , wherein checking the disconnect rules comprises:

detecting that another VM is configured to not shut down due to inactivity; and

avoid shutting down the other VM due to inactivity.

12. The method as recited in claim 1 , wherein the VM manager program determines a conflict between the disconnect rules and the disconnect parameters and shuts down the VM based on the disconnect parameters instead of the disconnect rules.

13. The method as recited in claim 12 , wherein the disconnect parameters include one or more of threshold number of terminal connections before shutting down VM, threshold number of SMTP connections before shutting down VM, threshold number of web browser tabs open before shutting down VM, minimum amount of time the VM is inactive before shutting down the VM, and VM to not be shut down due to inactivity.

14. A system comprising: a memory comprising instructions; and one or more computer processors, wherein the instructions, when executed by the one or more computer processors, cause the system to perform operations comprising:

determining, at a connect monitor in a virtual machine operated by one or more processors of a cloud-service server, a number of active connections of the virtual machine (VM), the VM being executed on the cloud-service server;

checking, at the connect monitor in the VM, disconnect rules in the VM, the disconnect rules based on the number of active connections of the VM, the disconnect rules defining criteria for determining when to shut down the VM automatically;

determining, at the connect monitor in the VM, to automatically shut down the VM based on the disconnect rules in the VM;

based on determining to automatically shut down the VM, generating, at the connect monitor in the VM, a message indicating the VM is inactive and sending the message to a VM manager program executing outside of the VM at the cloud-service server, wherein the VM manager program process the message, identify separately predetermined disconnect parameters, in the VM manager program, at the cloud-service server, and selectively shut down the VM based on the disconnect rules and the disconnect parameters.

15. A non-transitory machine-readable storage medium including instructions that, when executed by a machine, cause the machine to perform operations comprising:

determining, at a connect monitor in a virtual machine operated by one or more processors of a cloud-service server, a number of active connections of the virtual machine (VM), the VM being executed on the cloud-service server;

checking, at the connect monitor in the VM, disconnect rules in the VM, the disconnect rules based on the number of active connections of the VM, the disconnect rules defining criteria for determining when to shut down the VM automatically;

determining, at the connect monitor in the VM, to automatically shut down the VM based on the disconnect rules in the VM; and

based on determining to automatically shut down the VM, generating, at the connect monitor in the VM, a message indicating the VM is inactive and sending the message to a VM manager program executing outside of the VM at the cloud-service server, wherein the VM manager program is configured to process the message, identify separately predetermined disconnect parameters, in the VM manager program, at the cloud-service server, and selectively shut down the VM based on the disconnect rules and the disconnect parameters.

16. The tangible machine-readable storage medium as recited in claim 15 , wherein each active connection is an ongoing interaction between the VM and another computing device to exchange data.

17. The tangible machine-readable storage medium as recited in claim 15 , wherein checking the disconnect rules comprises:

checking a disconnect rule that defines to automatically shut down the VM when a number of terminal-services connections is equal to zero; and

determining to automatically shut down the VM when the number of terminal-services connections is equal to zero.

18. The tangible machine-readable storage medium as recited in claim 15 , wherein checking the disconnect rules comprises:

checking respective rules for one or more types of active connections.

19. The tangible machine-readable storage medium as recited in claim 15 , wherein checking the disconnect rules comprises:

checking a threshold inactivity period; and

determining to automatically shut down the VM after the VM has zero active connections for at least the threshold inactivity period.

20. The tangible machine-readable storage medium as recited in claim 15 , wherein checking the disconnect rules comprises:

checking a number of terminal connections; and

determining to automatically shut down the VM when the number of terminal connections is below a predetermined threshold number of terminal connections.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 16, 2022
From: NELSON, JASON
To: MICROSOFT TECHNOLOGY LICENSING, LLC
Reel/Frame 059915/0281 →
Continuity (1)
Related Publication 20230266987A1 · Aug 24, 2023
References Cited (4)
US 11188439B2 · Gopisetti et al. · 2021 [cited by applicant]
US 20210064388A1 · Gardner · 2021 [cited by examiner]
WO 2016176281A1 · 2016 [cited by applicant]
“International Search Report and Written Opinion Issued in PCT Application No. PCT/US22/050984”, Mailed Date: Apr. 24, 2023, 10 Pages. [cited by applicant]