kvm-vm-apt

command module
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 22, 2026 License: MIT Imports: 6 Imported by: 0

README

kvm-vm-apt

kvm-vm-apt is a command-line tool designed to simplify the process of installing packages on KVM (Kernel-based Virtual Machine) images. It allows users to install packages on either a specified VM or a direct image file.

Features

  • Install packages on a KVM VM by specifying the VM name
  • Install packages on a KVM image file directly
  • Verify that the specified image belongs to a known VM
  • Ensure the target VM is stopped before making changes

Notes

  • The tool requires sudo privileges to run virsh commands and virt-customize.
  • When not using the -image option, the tool will automatically use the first disk of the specified VM.
  • When using the -image option, the tool will verify that the image belongs to the specified VM before proceeding.
  • The tool will not make changes to running VMs. Ensure the target VM is stopped before using this tool.

Requirements

  • Sudo access
  • virsh installed on the system
  • virt-customize tool

Usage

Installing packages on a VM:
$ ./kvm-vm-apt -packages <package1,package2,...> <vm_name>

Example:

$ ./kvm-vm-apt -packages python3,golang,vim ubuntu20-04
Installing packages on a specific image:
$ ./kvm-vm-apt -image <path_to_image> -packages <package1,package2,...> <vm_name>

Example:

$ ./kvm-vm-apt -image /path/to/debian.qcow2 -packages python3-consul,nginx debian10

License

This project is licensed under the MIT License.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL