[one-users] Help to implement GetConsoleOutput

Carlos Martín Sánchez cmartin at opennebula.org
Fri Apr 5 04:28:37 PDT 2013


Hi,

1st problem:
Extending $VMID is not supported as you said, but might be a good idea to
do it for some attributes. Please open a request at dev.opennebula.org so
we can consider it for future versions.

Meanwhile, I think you can safely edit the deployment file in the vmm
drivers, just before the deployment.

2nd problem:
The VM dir in the front-end is "/var/lib/one/vms/<vm-id>"

The remote vm dir is built with the data in the last history element. For
example, having this VM

<VM>
  <ID>0</ID>
 ...
   <HISTORY_RECORDS>
    <HISTORY>
 ...
      <DS_LOCATION>/var/lib/one//datastores</DS_LOCATION>
      <DS_ID>0</DS_ID>
...
    </HISTORY>
  </HISTORY_RECORDS>
</VM>

the remote vm dir is /var/lib/one//datastores/0/0

Regards


--
Carlos Martín, MSc
Project Engineer
OpenNebula - The Open-source Solution for Data Center Virtualization
www.OpenNebula.org | cmartin at opennebula.org |
@OpenNebula<http://twitter.com/opennebula><cmartin at opennebula.org>


On Tue, Apr 2, 2013 at 11:51 AM, Ricardo Duarte <rjtd21 at hotmail.com> wrote:

> Hi there,
>
> I'm trying to implement the GetConsoleOutput EC2 primitive. This is useful
> to get details about the booting processe of an instance.
> Also, unchanged ubuntu cloudimages require the user to see the console
> output to see the generated password.
> I need to create a serial port on each instance that points to a (ex.:)
> "console.log" file inside each VM directory.
> Neither KVM nor Libvirt creates the file automatically. It must be there
> before booting the instance.
>
> I  have three problems:
>
> 1st problem:
> I need to add the following line to KVM deployment, using RAW:
>  <devices><serial type="file"><target port="0"/><source
> path="/var/lib/one/datastores/0/$VMID/console.log"/></serial></devices>
> OpenNebula does not seem to expand the $VMID on the raw parameters. So,
> how can I inject the correct parameters on the deployment file?
>
> 2nd problem:
> I need to pre-create the console.log on the VM directory. I'm using a
> HOOK.
> Problem is that VM TEMPLATE does not have the "systemds" the VM is using,
> neither has the path for the VM.
> How can I get this?
>
> Thanks,
> Ricardo
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opennebula.org
> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20130405/d98617da/attachment-0002.htm>


More information about the Users mailing list