Skip to content
This repository has been archived by the owner on Sep 26, 2021. It is now read-only.

[Enhancement] VMware Fusion driver #1479

Merged
merged 5 commits into from
Sep 11, 2015

Conversation

mschygulla
Copy link
Contributor

This PR enhances the Docker Machine driver for VMware Fusion (OSX). It add's an additional cdrom as configuration drive datasource for the Cloud-init package. An example config drive which was tested with CoreOS can be found here: https://github.com/mschygulla/configdrive

The driver accepts some new flags:

URL for cloud-init configdrive

  • EnvVar: "FUSION_CONFIGDRIVE_URL"
  • Name: "vmwarefusion-configdrive-url"

SSH user (default is B2DUser)

  • EnvVar: "FUSION_SSH_USER"
  • Name: "vmwarefusion-ssh-user"

SSH password (default is B2DPass)

  • EnvVar: "FUSION_SSH_PASSWORD"
  • Name: "vmwarefusion-ssh-password"

If the flag --vmwarefusion-configdrive-url is not used, the driver will behave as before.

If an URL is specified with the flag --vmwarefusion-configdrive-url, the driver will download the ISO and create an additional cdrom in the VMX file with the provided ISO. Since the VMware Tools are not always available, the generated public SSH key will be copied with SSH using the provided SSH User/Password.

This PR was tested with CoreOS and the CoreOS provisioner (#1463)

Example Usage:

$ docker-machine create -d vmwarefusion --vmwarefusion-boot2docker-url http://alpha.release.core-os.net/amd64-usr/723.0.0/coreos_production_iso_image.iso --vmwarefusion-configdrive-url https://github.com/mschygulla/configdrive/releases/download/v0.2/configdrive.iso --vmwarefusion-ssh-user core dev

or

$ export FUSION_BOOT2DOCKER_URL=http://alpha.release.core-os.net/amd64-usr/723.0.0/coreos_production_iso_image.iso
$ export FUSION_CONFIGDRIVE_URL=https://github.com/mschygulla/configdrive/releases/download/v0.2/configdrive.iso
$ export FUSION_SSH_USER=core

$ docker-machine create -d vmwarefusion dev1
$ docker-machine create -d vmwarefusion dev2

Feedback welcome :)

…loud-init.

The userdata is injected into the VM as an ISO via the cdrom.

Signed-off-by: Martin Schygulla <martin.schygulla@gmail.com>
Signed-off-by: Martin Schygulla <martin.schygulla@gmail.com>
@nathanleclaire
Copy link
Contributor

cc @frapposelli

@frapposelli
Copy link
Contributor

LGTM!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants