Skip to content

Integrate new API endpoints to copy data #9

@lnxbil

Description

@lnxbil

via the new API endpoints, we can now finally copy files and execute commands:

root@proxmox ~ > pvesh create /nodes/proxmox/qemu/109/agent/file-write -content "file" -file "/root/test"

root@proxmox ~ > pvesh create /nodes/proxmox/qemu/109/agent/exec -command id
┌─────┬───────┐
│ key │ value │
├─────┼───────┤
│ pid │ 1708  │
└─────┴───────┘

root@proxmox ~ > pvesh get /nodes/proxmox/qemu/109/agent/exec-status -pid 1708
┌──────────┬────────────────────────────────────────┐
│ key      │ value                                  │
├──────────┼────────────────────────────────────────┤
│ exitcode │ 0                                      │
├──────────┼────────────────────────────────────────┤
│ exited   │ 1                                      │
├──────────┼────────────────────────────────────────┤
│ out-data │ uid=0(root) gid=0(root) groups=0(root) │
└──────────┴────────────────────────────────────────┘

This should be very useful in copying the initial SSH key over to the guest.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions