Open tanganellilore opened 3 months ago
@tanganellilore you can do it on kvm host by virsh command
Hi @weizhouapache ,
yes clear, this is what I'm doing now, call the CS Api, retrieve in wich host is allocated the vm, access to the host and send the virsh command. But have an "orchestrator" that can also send command, without access to the kvm host it will be a good enhancement to me.
I notice that this is already present for snapshot, so I thing can be implemented without big deal, at lease on api level.
@tanganellilore @DaanHoogland technically it is simple, (just API, no database/vo changes at all)
However, I wonder if it is necessary. It is easy to do on kvm host. Integration such features with ACS will make ACS unnecessarily bigger, IMHO.
Hi @weizhouapache ,
i understood that is simple to do it on KVM host, but only if you can access to KVM host, otherwhise no way to do it.
Let me do a simple use case. User that deploy the vm is not the admin of cloudstack/kvm infrastrutcture and can't access on it, so to run a command after provisioning, without usage of cloudstack or virsh command (he can't access to kvm host), he need to use something different like cloud-init. One more specific use-case is the configuration of vm network, when dhcp is not possibile and we use a L2 shared. It's will be very usefull have a kvm command that set network remotley without access to kvm hosts.
I' m using vmware,a nd with it is very simple send command thorugh vmware with guest agent installed, and I thing that it will be a very usefull features, cosidering that command is already implemented in backend. We need simply allow the usage of it via API and very basic command validation (or also without it).
Moreover, we need to considering also that normal user not see in which host the vm is allocated and also the instancename assigned on kvm side
thanks @tanganellilore this is a good improvement request @DaanHoogland has added it to 4.21.0.0 milestone, we will try to make it happen
ISSUE TYPE
COMPONENT NAME
CLOUDSTACK VERSION
CONFIGURATION
OS / ENVIRONMENT
SUMMARY
Hi team,
I notice that actally, for vm that have qemu agent installed, is not possible through cloudstack send command to the host, like vmware guest agent tool. This is possible with qemu agent and i notiche that
freeze
for example was implemented with this class: https://github.com/apache/cloudstack/blob/main/plugins/hypervisors/kvm/src/main/java/org/apache/cloudstack/utils/qemu/QemuCommand.javaBut is not implemented for all type of command and I don't see any API that cover it ( and also via UI I can't see any "form").
This is something that you are interested to implemet?
STEPS TO REPRODUCE
EXPECTED RESULTS
ACTUAL RESULTS