Delay VM startup on a headless server?

Discussions related to using VirtualBox on Linux hosts.
Post Reply
AnrDaemon
Posts: 134
Joined: 7. Feb 2010, 23:41
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Ubuntu Linux, Windows

Delay VM startup on a headless server?

Post by AnrDaemon »

I'm setting up VM's on a headless Linux server, and I want to have a way to connect to booting VM (via RDP), when it already started but before control is passed to OS loader.
I see I can set it in machine config, but changing config back and forth is undesirable for obvious reasons. If the system configuration is fine, I don't want to change its configuration just to perform a routine inspection or confirm suspicions. Makes no sense at all. Even less than none, if you suspect the misconfiguration.
Can this delay be specified in command line, when starting the VM?
noteirak
Site Moderator
Posts: 5229
Joined: 13. Jan 2012, 11:14
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: Debian, Win 2k8, Win 7
Contact:

Re: Delay VM startup on a headless server?

Post by noteirak »

It's not possible to delay this as a one-time thing - you will need to configure the VM appropriately. It wouldn't be a crazy idea to create a wrapper script which change the delay, start the VM, lets you do the inspection, then switch back the setting to its original setting once the VM is powered off.
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
AnrDaemon
Posts: 134
Joined: 7. Feb 2010, 23:41
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Ubuntu Linux, Windows

Re: Delay VM startup on a headless server?

Post by AnrDaemon »

Yes, of course, I can do that.
However, it would be nice if there could be less intrusive way of performing maintenance tasks.
I'd probably resort to a permanent delay setting of some seconds then.
Thank you for the reply.
AnrDaemon
Posts: 134
Joined: 7. Feb 2010, 23:41
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Ubuntu Linux, Windows

Re: Delay VM startup on a headless server?

Post by AnrDaemon »

As an afterthought - is it possible to connect to a paused VM via VBox RDP?
In other words, would construction like

Code: Select all

vboxmanage startvm UUID && vboxmanage controlvm UUID pause
<connect to VM>
vboxmanage controlvm UUID resume
be reliable?
noteirak
Site Moderator
Posts: 5229
Joined: 13. Jan 2012, 11:14
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: Debian, Win 2k8, Win 7
Contact:

Re: Delay VM startup on a headless server?

Post by noteirak »

Last time I tried, yes you could connect to a paused VM.
What you describe will achieve what you want yes, if the whole set of command is fast enough.
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
AnrDaemon
Posts: 134
Joined: 7. Feb 2010, 23:41
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Ubuntu Linux, Windows

Re: Delay VM startup on a headless server?

Post by AnrDaemon »

Well, as fast as control signals are passed within the system.
Thank you for your input.
Post Reply