Spin off get_base_disk_name from get_base_disk_path so we can get the
disk name without the directory.
Change-Id: Id813fd9bbf8a859b639f92a380c067dfc67a95c7
Fix the code responsible for reattaching shared directories after VMs
have been exported.
For OVA export:
- use saved share names instead of default name (for the sake of
correctness; it is unlikely that a user will change the name)
For dir export:
- save and reattach shared directories after export
Change-Id: I79162c1ec788aa1d89104aa92aebeae2bb05adf5
Make osbashout abort if a client-side scripts returns an error; use a
file named error in the status directory to signal the problem and to
store the name of the offending script for use by Windows batch scripts.
Have osbash.sh and the Windows batch scripts exit when an error file
appears.
Change-Id: I6722e75c9c23b99e5ed25b00429026c2e0ff6a12
With this changeset, osbash host scripts abort installation over ssh if
script execution in the VM returns an error. The patch has no effect on
installations using VirtualBox guest-addons.
Change-Id: Ibc0b297f44289cfe37e07fad1c0fcef1a30abfb2
Move the processing of *.begin status files into a separate function.
Call that function only if the host's status directory is shared with
the client scripts (through VirtualBox guest-additions).
Change-Id: I7716528c02aa4f8b5fc0901ff91ba5d37b5a0d9f
When using the VirtualBox additions, there is a chance that after the
vboxadd service has started, the shared directory is not yet fully
available. In that case, activate_autostart.sh is never run (although
it may appear in time to be deleted).
This patch makes the script from preseed wait for activate_autostart.sh
to become available before it tries to execute it.
Change-Id: I1c2f3ef2f4301f36efec8a70b811ffe97dbaa779
This patch enables host I/O cache for the VMs created by the labs
scripts.
Without host I/O cache, occasional VM filesystem corruption occured on
two out of three host systems when we started taking snapshots after
every service install on the controller VM. Typically, the affected
script would just hang. The issue is somewhat elusive: it occured only
on two out of three test hosts, and the longest observed streak of
correct controller VM builds in a row was 16 (number 17 ended with
filesystem corruption).
With host I/O cache enabled, 125 builds were successful and none failed.
Change-Id: Ib36f44fdbf9366ef781df82f225e5ac8c5bb678f
_vbox_configure_ifs should no longer use the environment variable
NODE_NAME as the name of the node VM. It gets replaced by the correct
value passed as an argument.
Change-Id: I9d36420bcf56bbabe2f47cee2d7eb2ad824bf5d1
If a user changes the permissions of the Vagrant insecure ssh key,
ssh authentication doesn't work anymore and they are prompted for
a password. To prevent that, check (and adjust, if necessary) file
permissions before using ssh.
Change-Id: I90589553de30ef606c4083a1b9980c2cc80a3b3b
Distinguish between the name of a node VM (vm_name) and the hostname
used for the node VM. They just happened to have the same values until
now.
Change-Id: Idc457922fee886ebe504d5f56bbc86d0e5fbbd54
There is no need for users to customize the name of the temporary VM
used for building the base disk. This patch removes that option.
Change-Id: I1e3eebf0c9f1098623d8f4ab50d938211cc78b6f
Don't pass VM_NAME via environment variable to vbox_kbd_escape_key and
vbox_kbd_enter_key. Use an argument instead.
Change-Id: I7714f52ab4f80a83595e052974258e9f2e597435
Fix one instance where the variable name that was declared local
differed from the variable name actually used in the code.
Change-Id: Iee56ab527291a1c70455f7cc8fbd7316e29b1611
Local variable LINE was not initialized (but still used in a log call)
if disk_registered returned false. Fixed.
Change-Id: Icd679b2e50fd0d11fb5689d5806a016ac8043f7f
Add a -b option for building node VMs. This should make it harder for
users to accidentally overwrite their existing VMs.
It also allows us to drop the rather confusing "-f" option; "-w" without
"-b" is fast now, because no local building is ordered. To build node
VMs locally and Windows batch files at the same time, "-b -w" (or "-bw")
can be used.
Change-Id: I17ec78c0625f3657adaf670b7d58f2e4fde2248b
This changeset adds the new command, snapshot_cycle. It can be used to
replace four lines that often go together. The command handles a full
cycle needed for a snapshot: queueing shutdown.sh, booting the VM,
waiting for it to shutdown, and taking a snapshot.
Change-Id: I13276088bd44326f475bf7477ad2ed27db2dbbe9
This changeset adds an environment variable and an option that can be
used to change the type of VirtualBox VM GUI used while building the
nodes.
Valid values are gui (default), sdl (minimal gui), and headless.
The resulting node VMs can then be started with or without GUI as
before.
Change-Id: If12f4ba6dc455972b6332318ed1261e2c9de8c3f
This changeset introduces a new export method: exporting the named node
VMs as clones to the img directory.
The -e option takes now an argument (ova or dir) to distinguish between
exporting to an OVA package file and exporting to the img directory.
Unlike the OVA package files, this method preserves snapshots.
The resulting vbox files can be imported as VMs via VirtualBox GUI
(Machine->Add).
Change-Id: I7a8801de4b69796f3291a9e3a5896a055859121f
Shared directories are removed when exporting VMs to an OVA file. This
patch reattaches the shared directories after the VMs haven been
exported.
Change-Id: I3527aac6958df906e2aac8d95744b2362e8660f9
The verbose flag for one rm use was once useful for debugging, but now
just screws up the osbash.sh output. This patch removes the flag.
Change-Id: I4f91bdb1d4406f3fb03b6de43bdfc91ce6405043
If the VirtualBox guest-additions have to be downloaded from the
Internet (usually they are provided by VirtualBox or already on the
disk), osbash fails to find the ISO image immediately -- it needs to
be restarted for that.
With this patch, osbash will correctly detect a freshly downloaded ISO
image.
Change-Id: Id767525cb25a2953e32ca5cba95fedddcdab6a5e
Implements: blueprint openstack-training-labs
When building an ssh basedisk, there is no need to find and attach the
VirtualBox guest-additions.
Change-Id: I7da729596e3aa6a3000fd10046ee986929b03084
Implements: blueprint openstack-training-labs
This patch adds a few comments to help the reader understand how host
(osbash, wbatch) scripts and VM scripts interact.
Change-Id: I1dd07d131877200d65664ab98c39d621df3e3604
Implements: blueprint openstack-training-labs
Update the ISO_URL for the new Ubuntu point release.
Change-Id: I81e70f929d0348f0f91b6381a70f6919b48983c5
Implements: blueprint openstack-training-labs
This changeset adds a new init_node command for config/scripts.* and
uses it to merge scripts.nodeinit_osbash and scripts.nodeinit_vagrant
into the node specific config/scripts.*.
This results in some redundancy, but it (hopefully) makes the script
configuration easier to follow. It also makes the initial creation and
configuration of the VM just another step that can be picked or omitted
from script configuration.
Implements: blueprint openstack-training-labs
Change-Id: Ieadfe2b9540710556100051723e3e6f08855efa3