summaryrefslogtreecommitdiff
path: root/morphlib/exts/virtualbox-ssh.write
Commit message (Collapse)AuthorAgeFilesLines
* Use the modern way of the GPL copyright header: URL instead real addressJavier Jardón2015-03-161-2/+1
| | | | Change-Id: I992dc0c1d40f563ade56a833162d409b02be90a0
* Update copyright years so ./check passesSam Thursfield2015-02-031-1/+1
|
* Remove checks for NETWORK_CONFIG and eth0 and eth1 in itJim MacArthur2015-01-271-14/+0
| | | | | | | | 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.
* Refere to .write.help file for documentationPete Fotheringham2014-11-281-25/+6
|
* Fix shell quoting for ssh remote command linesLars Wirzenius2014-09-051-3/+6
| | | | Found by Richard Maw.
* Transfer sparse files faster for kvm, vbox deploymentLars Wirzenius2014-09-051-5/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Fix long lineDaniel Silverstone2014-05-161-1/+2
|
* VirtualBox Write Extension: Vagrant supportDaniel Silverstone2014-05-161-7/+15
| | | | | | | 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.
* fix the Virtualbox version checkingPaul Sherwood2014-04-201-2/+2
|
* Make parse_autostart() into more general get_environment_boolean()Sam Thursfield2014-03-041-1/+1
| | | | | Also, be more flexible when parsing environment booleans -- convert to lower case and match 0/1 and true/false as well as yes/no.
* Fix copyright year in previous commitRichard Maw2014-01-281-1/+1
|
* virtualbox-ssh: Work around change in VBox optionsRichard Maw2014-01-281-1/+19
| | | | | | | | | | | | 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.
* Deployment failures will now remove the disk imageDan Firth2013-10-141-1/+1
|
* Fix naming of SATA Controller in VirtualBox deploymentsLars Wirzenius2013-08-191-3/+3
| | | | Patch from Paul Sherwood.
* Allow to set the number of cpus for virtualbox and kvm deployments.Tiago Gomes2013-07-021-1/+4
|
* Improve network setup of the virtualbox write extension.Tiago Gomes2013-06-061-7/+65
| | | | | | | | | | | | | | | | | 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.
* Add AUTOSTART to kvm and libvirt write extensionsRichard Maw2013-05-081-2/+7
| | | | | | 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.
* Set RAM size in VirtualBox deploymentsLars Wirzenius2013-03-281-1/+3
|
* Implement ATTACH_DISKS in virtualbox-ssh.writeLars Wirzenius2013-03-201-1/+11
|
* Fix virtualbox deploymentRic Holland2013-03-051-3/+5
| | | | | | It was missing an import for sys. It did not have the size of the disk either, this has also been fixed
* Add missing argument to create_local_system methodLars Wirzenius2013-02-071-1/+1
| | | | Reported-By: Richard Maw
* Refactor: Add WriteExtension.create_local_system methodLars Wirzenius2013-02-071-24/+5
| | | | | | | | | | 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
* Remove debugging outputLars Wirzenius2013-02-071-10/+0
| | | | Suggested-By: Richard Maw
* Add a write extension for VirtualBoxLars Wirzenius2013-02-061-0/+158