Ask Your Question

Is it possible to execute commands through metadata in an already running VM?

asked 2015-02-27 12:17:48 -0500

jpmethot gravatar image

Our current issue is that we would like to be able to mount a drive automatically from outside a virtual machine. I do believe it is possible to do that on the first boot of a VM through cloud-init. What I'm asking is how to do it either while the VM is running, or through subsequent boot.

Is it possible to make modifications on a server through metadata after the first boot? If so, how?

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted

answered 2015-02-27 17:59:43 -0500

smaffulli gravatar image

I would use puppet or ansible or saltstack or simply batch commands via ssh: login into the VM and make things happen.

edit flag offensive delete link more


Right, that's probably the only way we could do this. It would require a backdoor in the vm (through a default ssh key may be the best way to do this) which I would prefer not to need, since those VMs will belong to customers. I guess simple is best here though. Thank you.

jpmethot gravatar imagejpmethot ( 2015-03-02 08:16:39 -0500 )edit

answered 2015-02-27 23:16:45 -0500

edit flag offensive delete link more


Thank you for the link, but that's not exactly what I'm looking for. This applies for the first boot of a vm, but can't be applied while it's already running or on subsequent boots.

jpmethot gravatar imagejpmethot ( 2015-03-02 08:12:05 -0500 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools



Asked: 2015-02-27 12:17:48 -0500

Seen: 268 times

Last updated: Feb 27 '15