R
R
Roman Kharchenko2017-07-03 08:31:23
PowerShell
Roman Kharchenko, 2017-07-03 08:31:23

How can a PowerShell script wait for the operating system to start in a virtual machine (guest)?

Good afternoon.
I keep asking questions without answers.
Everything described below should be done using PowerShell:
0) You need to start the VM on a remote hypervisor (this is no problem, I describe the item just so that the rest are not taken out of context).
1) Wait for the operating system to start. It is the launch of the OS. In this case, AUTOlogin is not recommended. The most important thing is not to confuse the OS startup (ready to work) with a timeout after the start. Since updates can be installed and, in fact, the OS is not yet ready to work with external services.
2) Having received information about the launch of the OS in the VM from clause 2, launch other VMs that depend on the VM from clause 2 (the launch is not a problem, the problem is to wait for confirmation about the OS launch in the VM from clause 2).
Thank you very much in advance.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
Roman Kharchenko, 2019-04-23
@Sarymian

To mark the issue as resolved:
A good idea comes late - you need to check some service on the required VM from item 1 in the While loop. There are system services with delayed launch. Or if, as in my case, to track the launch of one particular service.

S
Sergey Galaktionov, 2017-07-03
@Hagmos

www.tech-coffee.net/vm-start-order-windows-server-2016
Try it, maybe it will help you

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question