Temporary Change of Boot Sequence of Guests

This is for discussing general topics about how to use VirtualBox.
Post Reply
Samveen
Posts: 1
Joined: 27. Oct 2015, 12:10

Temporary Change of Boot Sequence of Guests

Post by Samveen »

Code: Select all

[samveen@bmc ~]$ VBoxManage --version
5.0.8r103449
I need to do OS re-provisioning on a large number of guests in an automated manner via netboot (and do this repeatedly over time). My process:

Code: Select all

VBoxManage controlvm spare10 poweroff
VBoxManage modifyvm spare10 --boot1 net
VBoxManage startvm --type headless spare10
<--OS install via netboot/kickstart -->
<--Stuck in Netboot/OS install Loop -->
This is where my problems start. Once the kickstart process finishes, and the VM reboots, the whole netboot/kickstart cycle starts again.

So, I was wondering if there is any way to change the boot sequence of a VM TEMPORARILY, for JUST NEXT BOOT and reset back to old boot sequence automatically, 2nd power cycle onward.

Something like this:

Code: Select all

VBoxManage controlvm spare10 poweroff
VBoxManage modifyvm spare10 --boot1 disk
VBoxManage modifyvm spare10 --nextboot net
VBoxManage startvm --type headless spare10
<--OS install via netboot -->
# Nothing to do as we're done
Someone asked a similar question in /viewtopic.php?f=1&t=41833 . I dont want to control anything from inside the guest, as I'm running commands on the VirtualBox host. VBoxManage help[\i] was no help, and Google is giving me nothing useful.

Any help/pointers would be greatly appreciated.
Post Reply