1. On Ubuntu 23.04 2. Install ansible with `apt install ansible` 3. Install gnome-boxes to manage VMs. 4. Create a Debian 12 VM via unattended install: ``` virt-install --connect qemu:///session --name edison --vcpus 2 --memory 2048 --disk size=20 --install debian12 --unattended profile=jeos,user-login=debian,admin-password-file=<(echo secret),user-password-file=<(echo secret) ``` (tried 10G, but that resulted in a too-small root partition) 5. Wait for VM install to complete. It should end powered off. 6. Start VM with: ``` virsh --connect qemu:///session start edison ``` 7. Clone playbook: ``` git clone git@github.com:plugorgau/plug-services.git git clone git@github.com:plugorgau/plug-services-secrets.git ``` 8. Create testing inventory file `libvirt.yaml`: ```yaml --- plugin: community.libvirt.libvirt uri: qemu:///session groups: bootstrap: "guest_info['hostname'] == 'edison'" web_servers: "guest_info['hostname'] == 'edison'" mail_servers: "guest_info['hostname'] == 'edison'" ``` 10. Run bootstrap playbook: ``` ansible-playbook bootstrap.yml -u debian -i libvirt.yaml ``` 13. Fails with: ``` TASK [Ansible - install key packages] ****************************************** [WARNING]: The "community.libvirt.libvirt_qemu" connection plugin has an improperly configured remote target value, forcing "inventory_hostname" templated value instead of the string fatal: [plug-debian12]: FAILED! => {"changed": false, "msg": "No package matching 'python-apt' is available"} ```` Should be python3-apt Cleanup: ``` virsh --connect qemu:///session undefine --nvram --remove-all-storage edison ```
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up