Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Virtual Machines Automation from Hypervisors using Qemu-Agent on KVM #9857

Open
KuasarCloud opened this issue Oct 25, 2024 · 2 comments
Open

Comments

@KuasarCloud
Copy link

ISSUE TYPE
  • Feature Idea
COMPONENT NAME

Categorize the issue, API, KVM, HYP, UI

CLOUDSTACK VERSION

Coming versions

SUMMARY

Many of us are using Cloudstack to provide public and private cloud services for our internal teams and clients, so normally we don't handle passwords or ssh key password to access the vm's operating system to orchestrate applications lifecycle. So my proposal is that just like user-data works for the first boot we can register actions or commands that we can apply to client's vm using qemu-agent capabilities in KVM so we leverage services like:

  • DBaaS
  • Managed Applications
  • Improvements on CSK
STEPS TO REPRODUCE

Cloudstack access the hyp where the vm resides and applies commands like:

virsh qemu-agent-command "$VM_NAME" "$COMMAND_JSON"

@DaanHoogland
Copy link
Contributor

@KuasarCloud , this seems like a qemu/libvirt specific feature, any idea if this has similar implementation possibilities for xen/vmware?
At the moment such functionality would be implemented using terraform. Any reason why this would not be acceptable?

@KuasarCloud
Copy link
Author

In VMware, we can use VMware Tools or Open VM Tools (an open-source version) to execute commands within the VM. Commands can be sent through the VMware API, but this solution is more limited and depends on the specific version and capabilities of the VMware infrastructure. The functionality to execute specific commands, as qemu-agent would allow, is possible, but it’s not as robust or straightforward as in KVM. Nevertheless, VMware does allow certain administrative commands and interactions with VMs.

In Xen, the functionality is more limited, as there is no direct equivalent to qemu-agent. While we can use xe-guest-utilities to get basic system status information and limited interactions, it doesn’t provide the same flexibility to send specific commands as in KVM.

To achieve something similar in Xen, we would need to implement custom user scripts or use configuration tools like cloud-init to run commands at VM startup. However, this approach only works on the first boot, similar to using user-data.

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

No branches or pull requests

2 participants