Crates.io | izb |
lib.rs | izb |
version | |
source | src |
created_at | 2024-10-14 02:24:05.340751 |
updated_at | 2024-10-14 02:27:36.624923 |
description | A library of helper functions for provisioning ZFS-on-Root VMs with zfsbootmenu using Incus |
homepage | https://github.com/OtherJohnGray/izb |
repository | https://github.com/OtherJohnGray/izb |
max_upload_size | |
id | 1407847 |
Cargo.toml error: | TOML parse error at line 17, column 1 | 17 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
Incus ZFS Builder (izb) is a Rust library that provides helper functions for provisioning ZFS-on-Root VMs with zfsbootmenu using Incus.
Add this to your Cargo.toml
:
[dependencies]
izb = "0.1.0"
Then, you can use the library in your Rust code:
use izb::{incus, sanoid};
fn main() {
// Create a profile
incus::create_profile("my_profile");
// Create a bridge network
let bridge = incus::create_bridge_network("my_bridge", "192.168.1.1/24");
// Create a Debian VM
let vm = incus::create_debian_vm("my_vm", "my_profile");
// Attach the bridge to the VM
incus::attach_bridge(&bridge, &vm);
// Start the VM
incus::start_vm(&vm);
// Push a file to the VM
incus::push_file(&vm, "/path/to/file");
// Exclude VMs from Sanoid snapshots
sanoid::exclude_sanoid(&["my_vm".to_string()]);
}
This project is licensed under the Affero General Public License v3.0 (AGPL-3.0).
Contributions are welcome! Please feel free to submit a Pull Request.
If you have any questions or run into any problems, please open an issue in the GitHub repository.