mirror of
https://github.com/Corsinvest/cv4pve-api-php.git
synced 2026-04-25 04:25:48 +03:00
[GH-ISSUE #10] use api how to write code running exec #12
Labels
No labels
enhancement
needs investigation
pull-request
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/cv4pve-api-php#12
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @haiwan-xm on GitHub (May 28, 2020).
Original GitHub issue: https://github.com/Corsinvest/cv4pve-api-php/issues/10
hi boss.
how to write php code running api qm guest exec ..?
@franklupo commented on GitHub (May 29, 2020):
Hi,
$client->getNodes()->get("pve1")->getQemu()->get(100)->getAgent()->getExec()->exec($command, $input_data)
Best regards
@haiwan-xm commented on GitHub (May 29, 2020):
tks, boss. so if we use agent config ip address
we in promox shell set is qm guest exec 122 ip addr add 192.168.0.2/24 brd 192.168.0.255 dev eth0
so how to write php code from api running this set ip address?
ths boss give me guide. and happy weekend
@haiwan-xm commented on GitHub (Jun 8, 2020):
hi, boss we write code php runing error.

you see
@franklupo commented on GitHub (Jun 8, 2020):
Hi,
the official documentation https://pve.proxmox.com/pve-docs/api-viewer/index.html#/nodes/{node}/qemu/{vmid}/agent/exec not use encode.
With pvesh this command work?
best regards
@haiwan-xm commented on GitHub (Jun 8, 2020):
qm guest exec --
we just don't know hot to use php running exec.
@haiwan-xm commented on GitHub (Jun 9, 2020):
hi, boss. we just try use agent config host ip address.
@franklupo commented on GitHub (Jun 19, 2020):
Does it work in the shell manually?
@franklupo commented on GitHub (Jul 7, 2020):
news?
@franklupo commented on GitHub (Sep 2, 2020):
Hi,
escape data using htmlspecialchars
@haiwan-xm commented on GitHub (Sep 2, 2020):
tks, boss., so have give me a demo code running php exec config ip addres ?
tks
@franklupo commented on GitHub (Sep 2, 2020):
@haiwan-xm commented on GitHub (Sep 2, 2020):
tks, boss, let me test
@haiwan-xm commented on GitHub (Sep 2, 2020):
and we have a new trouble. how to use qemu agent config vm ip address.
for example. centos. if we use exec command set ip address , later reboot config loss. we want let ip config write eth config.
tks , wish give me guide.
@franklupo commented on GitHub (Sep 2, 2020):
I have no idea.
I think the Proxmox VE forum can help you.
@haiwan-xm commented on GitHub (Sep 2, 2020):
him let me write all operating system config shell. later call shell running .
@franklupo commented on GitHub (Sep 2, 2020):
I do not understand
@haiwan-xm commented on GitHub (Sep 3, 2020):
this depends on the distribution/OS you're running in the VM, since they have different implementations (networkmanager, systemd-networkd. /etc/network/interfaces, and so on..)
cloud-init can be used to configure networking for VMs though, which would work simpler..
otherwise you can try writing scripts for each distro to configure network, and call that script with arguments via
qm guest exec@franklupo commented on GitHub (Sep 4, 2020):
You will have to make specific scripts for each OS.
@haiwan-xm commented on GitHub (Sep 23, 2020):
hi , boss
this exec($command, $input_data1) how to write.
have wish give me guide?
eg: set ip address or df or ifconfig
@franklupo commented on GitHub (Sep 23, 2020):
you have to look at the guide of Proxmox VE