Repository navigation
feat(vmbully): add script, clone, template and passwd commands - #1022
Merged
Merged
Conversation
go vet rejects %#q with an int argument, and that failure stopped the commit hook for all other changes. Signed-off-by: Xe Iaso <me@xeiaso.net>
vmbully builds Proxmox VM templates from cloud images, clones them, and runs JavaScript against them. The script command uses a pool of VMs tagged vmbully. Each run taints one VM, runs the script over SSH, deletes that VM, and clones the next one. The script can call $ for commands in the VM, host$ for commands on this machine, and scp to copy files into the VM. Failed commands and script errors exit nonzero. The top-level yeetfile builds vmbully packages for all four architectures. Signed-off-by: Xe Iaso <me@xeiaso.net>
Contributor
|
The latest Buf updates on your PR. Results from workflow Go / build (pull_request).
|
Xe
enabled auto-merge (squash)
October 10, 2026 04:33
| if sshIP == "" { | ||
| return fmt.Errorf("VM %d has no usable IPv4 address", newID) | ||
| } | ||
| fmt.Printf("login: %s@%s password: %s\n", sshUser, sshIP, password) |
| return fmt.Errorf("set password for %s on VM %d: %w", user, vmid, err) | ||
| } | ||
|
|
||
| fmt.Printf("login: %s password: %s\n", user, password) |
| User: user, | ||
| Auth: []ssh.AuthMethod{ssh.Password(password)}, | ||
| // The VM is seconds old, so there is no known host key to check. Lab only. | ||
| HostKeyCallback: ssh.InsecureIgnoreHostKey(), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
vmbullyruns JavaScript files against Proxmox VMs that are used one time, then deleted.vmbully templatecreates a VM template from a cloud image.vmbully cloneclones a template into a new VM, with a tag and a password for each VM.vmbully passwdsets a new password in a VM through the QEMU guest agent.vmbully scriptruns a JavaScript file against a VM from a pool of tagged VMs.vmbully scriptselects a VM with the tagvmbullyand without the tagtainted. With no free VM, it clones one from the template. It adds the tagtainted, runs the script, deletes the VM, and clones the next VM.The script has these functions:
$`command`runs a command in the VM and returns stdout.host$`command`runs a command on the local machine.scp(source, dest)copies a local file to the VM.A failed command throws an exception. An exception that the script does not catch makes
vmbullyexit with status 1.cmd/vmbully/README.mdhas the full documentation.Other changes
yeetfile.jsbuildsvmbullypackages foramd64,arm64,ppc64le, andriscv64.internal/confygpasses aruneto the%#qverb.go vetrejected theintargument, and that stopped the commit hook.go.modaddsgithub.com/luthermonson/go-proxmoxandmodernc.org/quickjs. Thegodirective moves from1.25.7to1.26.0, and somegolang.org/xmodules move to newer versions.Test status
npm testpasses in the commit hook.cmd/vmbully/script_test.gocovers$,host$,scp, the quoting, and the exceptions with fake functions.CGO_ENABLED=0 go build ./cmd/vmbullypasses for all four architectures.scpcode paths are not yet proven against a real host.