VMware: support injecting ssh key

Registered by Eric Brown

The current VMware driver does not support injecting the SSH public key into the guest OS. This blueprint is to address that lack of support. It would also improve VMware minesweepers execution of the tempest test. Tempest has a test to boot from a volume, but Minesweeper doesn't run it because ssh key injection is not supported by the vmware driver.

The keys in question are SSH keys that are injected into the guest file system. Because the libvirt/xen drivers can make assumptions about the guest OS being linux they can frequently perform file system operations without having to switch behaviors for different guest operating systems.

see: keypair-add
http://docs.openstack.org/user-guide/content/novaclient_commands.html
https://docs.hpcloud.com/cli/nova/reference

In code:
https://github.com/openstack/nova/blob/master/nova/virt/libvirt/driver.py#L2605
https://github.com/openstack/nova/blob/master/nova/virt/baremetal/pxe.py#L308

Based on this we would have to lean on the VMware Guest Tools and AFAIK there's nothing in this incarnation of the driver to support working with keys in guests. We would have to inject the SSH key from our driver.

This would be a good feature add for Juno. I think this would be best done in the following pieces:

1. detect guest tools (to see if you can do guest operations)
2. guest OS tools object
3. ssh key injection tool

http://pubs.vmware.com/vsphere-55/index.jsp#com.vmware.wssdk.apiref.doc/vim.vm.guest.FileManager.html#initiateFileTransferToGuest
http://pubs.vmware.com/vsphere-55/index.jsp#com.vmware.wssdk.apiref.doc/vim.vm.guest.GuestOperationsManager.html#field_detail

Blueprint information

Status:
Complete
Approver:
None
Priority:
Undefined
Drafter:
Eric Brown
Direction:
Needs approval
Assignee:
Eric Brown
Definition:
Obsolete
Series goal:
None
Implementation:
Unknown
Milestone target:
None
Completed by
Eric Brown

Related branches

Sprints

Whiteboard

If we use the FileManager API, how do we get credentials for the guest OS? --rgerganov (25th April 2014)

If you are still working on this, please re-submit via nova-specs. If not, please mark as obsolete, and add a quick comment to describe why. --johnthetubaguy (20th April 2014)

SSH key injection via config drive is already supported by the VMware driver today. No additional work should be necessary. --ericwb (18th April 2014)

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.