# Instructions for creating projects using these templates
***Note: This assumes SSH access to KVM hosts and Pulumi is [installed](https://www.pulumi.com/docs/install/).***
## Login to the backend
Log in to your [pulumi backend](https://www.pulumi.com/docs/iac/concepts/state-and-backends/), in this example a file-based local backend will be used. This will create a state file in your home directory (~/ on Linux, for example)
`pulumi login --local`
## Copying and modifying the template
Create a new directory with the name of the project. Copy the templates from the `stack_templates` and `python_templates` directories for the specific node type.
Edit to fit the project. The `Pulumi_yaml_template` is already formatted with the runtime an virtual environment. The name and description should be edited to fit the name and description of the project. If using a different runtime and toolchain, edit accordingly. This assumes the runtime is `python` and the toolchain is `uv`
Pulumi no longer maintains a dedicated provider for libvirt. A local [terraform provider](https://www.pulumi.com/registry/packages/libvirt/) will need to be installed
This will add the source package to the `pyproject.toml` file created when `uv` initialized the project
# Add the hashed password
A password will need to be set in order to access the console. SSH access is public key/certificate based.
`pulumi config set --secret kvm:password_hash <value>`
Ensure the password is stored securely and can be retrieved readily in the event troubleshooting from the console is necessary.
Preview the stack before deploying
`pulumi preview`
And deploy the stack
`pulumi up`
The resources are destroyed by executing
`pulumi destroy`
# Limitations
- The major limitation is that Pulumi does not start the KVM guest. The guest will need to manually (or some how programmatically) started for the cloud-init workflow to begin. Once the cloud-init workflow completes, the guest will reboot and will be ready for use.
- The `os-variant` that is normally necessary by `virt-install` is not set. This can be set manually after Pulumi deploys the guest or anytime the guest is shutdown.