A new VM is added to the list, in state “off” (why not in state “to be provisioned”?)
When I click on “start” it displays “starting” for a few seconds, but the machine is not started. No indication is given as to why this fails.
How do I go about figuring out what the reason for this is? There are no log files under /var/log/
Syslog only shows “Mon Jul 18 09:19:18 2022 user.notice muvirt: rpc start request for Waldorf”
The home assistant OS image is around 6GB uncompressed, so you will need to set your disk size to something bigger (I would use 10G = 10240MB at a minimum)
Cloud-init needs to be turned off. There isn’t a checkbox for this in the LuCI interface, but I will put it on my TODO list for when I come back from vacation.
When creating in LuCI, the changes should come to this:
Save and apply these changes, but then log into the router and execute:
uci set virt.homeassistant.cloudinit=0
uci commit virt
Then you can start the new VM, and it will download and write. It will take a while as it’s an xz compressed image.
If the previous setup already created an LVM volume with the name you want, remove it first (lvremove /dev/mapper/vmdata-X) and/or use a different VM name.
Currently, everything is logged to the OpenWrt system log (logread) which isn’t written to disk.
But I am considering adding rsyslog or syslog-ng with setup to log to disk by default.
root@openwrt:~# sh -x /usr/sbin/muvirt-provision rockstor
root@openwrt:~# sh -x /usr/sbin/muvirt-provision rockstor
+ set -e
...
muvirt-provision: [rockstor] downloading https://rockstor.com/downloads/installer/leap/15.3/aarch64/Rockstor-Leap15.3-ARM64EFI.aarch64-4.1.0-0.qcow2 to /mnt/vm//rockstor/image.bin
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 652M 100 652M 0 0 2601k 0 0:04:17 0:04:17 --:--:-- 2996k
...
+ /usr/libexec/muvirt/storage/storage.sh new_volume rockstor 2048
+ VOLUME_PATH='ERROR: No storage device defined
ERROR: /usr/libexec/muvirt/storage/ not found'
+ critical_error 'Could not create a volume for rockstor'
+ vmname='Could not create a volume for rockstor'
+ error_message=
+ uci -q get 'virt.Could not create a volume for rockstor'
+ logger -t muvirt-provision -s '[Could not create a volume for rockstor] '
muvirt-provision: [Could not create a volume for rockstor]
+ exit 1
Do I miss anything in /usr/libexec/muvirt/storage?
root@openwrt:~# ls /usr/libexec/muvirt/storage/
lvm storage.sh