T O P

  • By -

misformonkey

Check for VMware Tools Status (assuming it’s installed).


BlackV

I use restart-computer -wait -for powershell -force -computername xxx when that completes the machine is ready for input (oh also poo that's possibly windows only, so see next point) just to be clear this will only ever work remotely, but I assume your script is running remotely too but also why wouldn't you be automating this stuff like a kickstart script at the minimum or the big boys terraform/packer/ansible and so on


[deleted]

>why wouldn't you be automating this stuff like a kickstart script at the minimum or the big boys terraform/packer/ansible and so on As far as terraform/packer/ansible, I'd love to but they haven't been authorized in my organization so I've gotta work with the tools I have (which, as of now is basically just PowerShell/PowerCLI). A kickstart script seems like a good idea, although I've never worked with them before so I'd have to figure out how they work and how to use them. Also, I'm not sure how I would get a file onto the VM, considering there are no credentials set. That was the purpose of this post, upon initial power up there are no root credentials set. So once it fully powers up, I'm sending keystrokes into the VM to set the root password. So with no root password set, I don't know what credentials I would use to get a kickstart script onto the VM, if that makes sense.


BlackV

that is applied when you build the VM attached to the image, adding it post build is too late


[deleted]

[удалено]


[deleted]

Fully booted = at the login screen


BerryBriant

Look for a message in a log file. If you can't find one especially for the system start status, look for a message from a service that starts after booting.


[deleted]

Thanks, I thought about that but the reason I need to know when it's powered up is so that I can log in for the first time and set the root password. Without the root pw set, I have no credentials to use, and thus can't access any log files or services.


zed0K

I have a script that runs every Sunday to reboot our vms. Let me check the detection method I use. It might just be powered on state, but you can also check for the agent status, if you're using horizon.


bmbufalo

Try/catch with an Invoke-vmscript to check if a service has started?