| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Change-Id: I992dc0c1d40f563ade56a833162d409b02be90a0
|
| |
|
|
|
|
|
|
|
|
| |
network_config isn't used anywhere in this function. The purpose
of this function (getting the name of an appropriate host-only
network interface) doesn't seem to depend on it either. eth0 and
eth1 won't always be present (several Baserock systems will have
enp0s3, etc). So I think these checks should be removed.
|
| |
|
|
|
|
| |
Found by Richard Maw.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The KVM and VirtualBox deployments use sparse files for raw disk
images. This means they can store a large disk (say, tens or hundreds
of gigabytes) without using more disk space than is required for the
actual content (e.g., a gigabyte or so for the files in the root
filesystem). The kernel and filesystem make the unwritten parts of the
disk image look as if they are filled with zero bytes. This is good.
However, during deployment those sparse files get transferred as if
there really are a lot of zeroes. Those zeroes take a lot of time to
transfer. rsync, for example, does not handle large holes efficiently.
This change introduces a couple of helper tools (morphlib/xfer-hole
and morphlib/recv-hole), which transfer the holes more efficiently.
The xfer-hole program reads a file and outputs records like these:
DATA
123
binary data (exaclyt 123 bytes and no newline at the end)
HOLE
3245
xfer-hole can do this efficiently, without having to read through all
the zeroes in the holes, using the SEEK_DATA and SEEK_HOLE arguments
to lseek.
Using this, the holes take only take a few bytes each, making it
possible to transfer a disk image faster. In my benchmarks,
transferring a 100G byte disk image took about 100 seconds for KVM,
and 220 seconds for VirtualBox (which needs to more work at the
receiver to convert the raw disk to a VDI). Both benchmarks were from
a VM on my laptop to the laptop itself.
The interesting bit here is that the receiver (recv-hole) is simple
enough that it can be implemented in a bit of shell script, and the
text of the shell script can be run on the remote end by giving it to
ssh as a command line argument. This means there is no need to install
any special tools on the receiver, which makes using this improvement
much simpler.
|
| |
|
|
|
|
|
|
|
| |
Add support to the VirtualBox write extension to notice if we are
doing a Vagrant Basebox installation and not do the clever network
setup we normally do to allow machines to talk to one another since
this confuses Vagrant quite a bit if it is left in.
|
| |
|
|
|
|
|
| |
Also, be more flexible when parsing environment booleans -- convert to
lower case and match 0/1 and true/false as well as yes/no.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
VirtualBox changed a command line option in 4.3 incompatibly, so we now
have to check the version number and change an option from --sataportcount
to --portcount if the version of VirtualBox running on the target is at
least 4.3
This turns the version into a tuple and compares it against another,
since it's more reliable than comparing strings, which will count '1.10'
as earlier than '1.2', and more convenient than comparing the digits
individually.
|
| |
|
|
|
|
| |
Patch from Paul Sherwood.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The VirtualBox deployment write extension will configure networking in
the following manner:
- One host-only network interface will be used to group the virtual
machines together (and to give access between the host and the virtual
machines). It will be bound to eth0 of the virtual machine.
- One NAT (or Bridge) network interface will be used to allow the
virtual machines access to the wider network. This will be bound to eth1
of the virtual machine.
Now deployment to virtual box will require that both HOST_IPADDR and NETMASK
environment variables be set, and also configuration for eth0 and eth1 is
expected in the NETWORK_CONFIG environment variable.
This commit also replaces some run_cmd with ssh_runcmd.
|
|
|
|
|
|
| |
If AUTOSTART is 'yes' then the VM will be started once it is
created. If it is 'no' or undefined, then it will need to be manually
started. If it is any other value, then an exception is raised.
|
| |
|
| |
|
|
|
|
|
|
| |
It was missing an import for sys.
It did not have the size of the disk either, this has also been fixed
|
|
|
|
| |
Reported-By: Richard Maw
|
|
|
|
|
|
|
|
|
|
| |
This allows code sharing amongst all the places that create a
system in a raw disk image. This also adds the creation of
a factory-run subvolume, and fixes error messages for errors
that happen during a disk image creation.
Suggested-By: Richard Maw
Suggested-By: Sam Thursfield
|
|
|
|
| |
Suggested-By: Richard Maw
|
|
|