Sorry to be a bother, but I’m hitting a wall here, and my google-fu is not strong enough apparently. I’m trying to reinstall a Home Assistant VM on my server, (It’s been a while, and I have no idea how I did it originally). Running: virt-install --name haos --description "Home Assistant OS" --os-variant=generic --ram=16384 --vcpus=4 --disk /home/chris/haos_ova-12.4.qcow2,bus=scsi --controller type=scsi,model=virtio-scsi --import --graphics none --boot uefi

Returns:

`WARNING KVM acceleration not available, using ‘qemu’ WARNING Using --osinfo generic, VM performance may suffer. Specify an accurate OS for optimal results.

Starting install… ERROR internal error: Could not run ‘/usr/bin/swtpm_setup’. exitstatus: 1; Check error log ‘/home/chris/.cache/libvirt/qemu/log/haos-swtpm.log’ for details. Domain installation does not appear to have been successful. If it was, you can restart your domain by running: virsh --connect qemu:///session start haos otherwise, please restart your installation.`

Checking the ‘haos-swtpm.log’ shows repeated entries of:

Starting vTPM manufacturing as chris:chris @ Sun 21 Jul 2024 02:58:07 AM UTC Successfully created RSA 2048 EK with handle 0x81010001. Invoking /usr/lib/x86_64-linux-gnu/swtpm/swtpm-localca --type ek --ek af44f41c741b89d0a45748c4bb34d21457da950586715133274c649c7a84dd7dffcbd1b53f2f56f7b24a00529e92db82e30b60a759672531a3c5faea54a71fb8df433f9034bfad37d7561fd187c9562024322d6a7ab41e1af26b0cbe67a66869b9f779eef408f27e14f97d365be47921612e8d9ca010dfdd9ab08c3a321b795b3b2809f1bd132b57eb6408569c38f7558eda65e1787c4d4b077794b249c87fa5f275cf8bc8bbce41467448b4ee9648da06a84a0c03378416f1a5dec7c5317e5f0883ca515e207fce70495f144148d18ac34def0e2415d3e82fcfe9224848b7ccfe35143207b0f1fce4293cd9cd1c11daa3d45463b0c17ad7d988438c52aa631f --dir /home/chris/.config/libvirt/qemu/swtpm/d7406119-26ab-4e42-b98e-46065e1ea2eb/tpm2 --logfile /home/chris/.cache/libvirt/qemu/log/haos-swtpm.log --vmid haos:d7406119-26ab-4e42-b98e-46065e1ea2eb --tpm-spec-family 2.0 --tpm-spec-level 0 --tpm-spec-revision 164 --tpm-manufacturer id:00001014 --tpm-model swtpm --tpm-version id:20191023 --tpm2 --configfile /etc/swtpm-localca.conf --optsfile /etc/swtpm-localca.options Need read/write rights on statedir /var/lib/swtpm-localca for user chris. swtpm-localca exit with status 1: An error occurred. Authoring the TPM state failed. Ending vTPM manufacturing @ Sun 21 Jul 2024 02:58:07 AM UTC

I gather that it seems to be a issue with the vTPM, but I usually deal in containers, so this is all new on me.

Thanks in advance.

  • SteveTech@programming.dev
    link
    fedilink
    English
    arrow-up
    3
    ·
    2 months ago

    WARNING KVM acceleration not available, using 'qemu'

    That’s related to hardware virtualisation, like the other person said, check that it’s enabled.

    WARNING Using --osinfo generic, VM performance may suffer. Specify an accurate OS for optimal results.

    This is related to --os-variant=generic, I don’t remember what Home Assistant OS is based off, but find out and pick an option from virt-install --os-variant list, otherwise use linux2022.

    ERROR internal error: Could not run '/usr/bin/swtpm_setup'.

    I’m not sure why it’s attaching a TPM, but I believe --tpm clearxml=true should remove it.

  • isgleas@lemmy.ml
    link
    fedilink
    arrow-up
    2
    ·
    2 months ago

    What are you reinstalling? New haos on old kvm? Old haos on new kvm? New deployment?

    From the logs I read that your user chris has no rw perms within the haos.

  • Skull giver@popplesburger.hilciferous.nl
    link
    fedilink
    arrow-up
    1
    ·
    2 months ago

    Need read/write rights on statedir /var/lib/swtpm-localca for user chris.

    This indicates a permission issue. Sounds like your user account isn’t part of whatever group swtpm needs it to be. Check the permissions on that directory and maybe add your user account to that group.

    The other error messages are warning you that you don’t have kvm support, which will make your VM terribly slow. Could also be a permission issue, could be a UEFI setting. It’s probably worth fixing more than the TPM issue; you can probably just remove the TPM from the hardware config to get it to boot because I doubt you’ll strictly need a TPM to use HAOS.