Comment 8 for bug 1552042

Revision history for this message
Garth Mollett (gmollett) wrote :

In virt/xenapi/vm_utils:

53 from nova.virt.disk import api as disk
54 from nova.virt.disk.vfs import localfs as vfsimpl
[..]
1711 def preconfigure_instance(session, instance, vdi_ref, network_info):
[..]
1721 mount_required = key or net or metadata
1722 if not mount_required:
1723 return
1724
1725 with vdi_attached_here(session, vdi_ref, read_only=False) as dev:
1726 _mounted_processing(dev, key, net, metadata)
[..]
2455 def _mounted_processing(device, key, net, metadata):
[..]
2461 err = _mount_filesystem(dev_path, tmpdir)
2462 if not err:
2463 try:
2464 # This try block ensures that the umount occurs
2465 if not agent.find_guest_agent(tmpdir):
2466 vfs = vfsimpl.VFSLocalFS(imgfile=None,
2467 imgfmt=None,
2468 imgdir=tmpdir)
2469 LOG.info(_LI('Manipulating interface files directly'))
2470 # for xenapi, we don't 'inject' admin_password here,
2471 # it's handled at instance startup time, nor do we
2472 # support injecting arbitrary files here.
2473 disk.inject_data_into_fs(vfs,
2474 key, net, metadata, None, None)

I'm not sure how reachable that is and I didn't look at agent.find_guest_agent() or just try and run it (no xen). But it certainly looks to be reachable from that.