Ops
Search…
ProxMox
OPS works perfectly fine with Proxmox.
You'll want to create an API token on the datacenter in the proxmox UI.
You'll also want to ensure you have the correct permissions for that user's token on both the datacenter and storage for the operations you'd like to perform.
1
package main
2
3
import (
4
"fmt"
5
"net/http"
6
)
7
8
func main() {
9
fmt.Println("hello world!")
10
11
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
12
fmt.Fprintf(w, "Welcome to my website!")
13
})
14
15
fs := http.FileServer(http.Dir("static/"))
16
http.Handle("/static/", http.StripPrefix("/static/", fs))
17
18
http.ListenAndServe("0.0.0.0:8080", nil)
19
}
Copied!

Image Operations

Create Image

1
export API_URL="https://172.16.41.133:8006"
2
export TOKEN_ID="[email protected]!tokenid"
3
export SECRET="some-uuid-goes-here"
4
ops image create g -t proxmox -c config.json
Copied!

List Images

1
export API_URL="https://172.16.41.133:8006"
2
export TOKEN_ID="[email protected]!tokenid"
3
export SECRET="some-uuid-goes-here"
4
5
ops image list -t proxmox
Copied!

Delete Image

Instance Operations

Create Instance

1
export API_URL="https://172.16.41.133:8006"
2
export TOKEN_ID="[email protected]!tokenid"
3
export SECRET="some-uuid-goes-here"
4
ops instance create g.img -t proxmox
Copied!

List Instances

1
export API_URL="https://172.16.41.133:8006"
2
export TOKEN_ID="[email protected]!tokenid"
3
export SECRET="some-uuid-goes-here"
4
ops instance list -t proxmox
Copied!

Start Instance

1
export API_URL="https://172.16.41.133:8006"
2
export TOKEN_ID="[email protected]!tokenid"
3
export SECRET="some-uuid-goes-here"
4
ops instance start 100 -t proxmox
Copied!

Stop Instance

1
export API_URL="https://172.16.41.133:8006"
2
export TOKEN_ID="[email protected]!tokenid"
3
export SECRET="some-uuid-goes-here"
4
ops instance stop 100 -t proxmox
Copied!

Get Logs for Instance

Delete Instance

Last modified 1mo ago