QEMU build error due to 'id' identifier
On the latest release v0.2.2, with QUEMU built on 2024-08-28 from here I run into:
PS C:\Users\Rohit Goswami\Downloads\Compressed> .\linsk_windows_amd64_v0.2.2.exe clean
Will permanently remove 'C:\Users\Rohit Goswami\Linsk'. Proceed? (y/n) > y
time=2024-09-01T18:27:57.753Z level=INFO msg="Deleted data directory" path="C:\\Users\\Rohit Goswami\\Linsk"
PS C:\Users\Rohit Goswami\Downloads\Compressed> .\linsk_windows_amd64_v0.2.2.exe build
time=2024-09-01T18:28:01.017Z level=INFO msg="Starting to download file" caller=storage from=https://dl-cdn.alpinelinux.org/alpine/v3.18/releases/x86_64/alpine-virt-3.18.3-x86_64.iso to="C:\\Users\\Rohit Goswami\\Linsk\\alpine-3.18.3-x86_64.img"
time=2024-09-01T18:28:09.034Z level=INFO msg="Successfully downloaded file" caller=storage from=https://dl-cdn.alpinelinux.org/alpine/v3.18/releases/x86_64/alpine-virt-3.18.3-x86_64.iso to="C:\\Users\\Rohit Goswami\\Linsk\\alpine-3.18.3-x86_64.img" out-size="58 MB"
time=2024-09-01T18:28:09.035Z level=INFO msg="Building VM image" caller=storage tags=3.18.3-x86_64 overwriting=false dst="C:\\Users\\Rohit Goswami\\Linsk\\3.18.3-x86_64-linsk1.qcow2"
time=2024-09-01T18:28:09.152Z level=WARN msg="Using unrestricted VM networking" caller=storage subcaller=imgbuilder subcaller=vm
time=2024-09-01T18:28:09.206Z level=INFO msg="Booting the VM" caller=storage subcaller=imgbuilder subcaller=vm
time=2024-09-01T18:28:09.386Z level=WARN msg="Canceling the VM context" caller=storage subcaller=imgbuilder subcaller=vm
time=2024-09-01T18:28:09.609Z level=ERROR msg="Failed to start the VM" error="cancel on exit: interrupt cmd: exit status 128 (qemu stderr log: '[4 chars trimmed]-system-x86_64.exe: -drive 'file=C:/Users/Rohit Goswami/Linsk/3.18.3-x86_64-linsk1.qcow2,format=qcow2,if=none,id=drive1725215289173844800': Parameter 'id' expects an identifier\\nIdentifiers consist of letters, digits, '-', '.', '_', starting with a letter.')"
Subsequent error messages also don't make much sense..
PS C:\Users\Rohit Goswami\Downloads\Compressed> .\linsk_windows_amd64_v0.2.2.exe shell
time=2024-09-01T18:32:56.377Z level=WARN msg="Using unrestricted VM networking" caller=vm
time=2024-09-01T18:32:57.046Z level=INFO msg="Booting the VM" caller=vm
time=2024-09-01T18:32:59.042Z level=WARN msg="Canceling the VM context" caller=vm
time=2024-09-01T18:32:59.257Z level=ERROR msg="Failed to start the VM" error="wait for cmd to finish execution: context canceled; cancel: interrupt cmd: exit status 128 (qemu stderr log: 'qemu-system-x86_64.exe: -drive 'file=C:/Users/Rohit Goswami/Linsk/3.18.3-x86_64-linsk1.qcow2,format=qcow2,if=none,id=drive1725215576392482000,snapshot=on': Parameter 'snapshot' expects 'on' or 'off'')"
Apologies for the delayed response.
The nature of this issue makes me believe that the problem lies in how QEMU was installed. Please ensure that you have the latest version properly installed.
,id=drive1725215576392482000,snapshot=on': Parameter 'snapshot' expects 'on' or 'off''
You can see that something is wrong here, Linsk specified the snapshot=on, yet it was not accepted by QEMU.
Thanks for the response, I'll report back over the weekend to see if alternate installs work.
@HaoZeke Were you able to get it to work? Safe to close this issue?
I'm sorry, I haven't been working on windows for while now; closing as cannot be reproduced for now, but will reopen if I run into it again!
I was having the same issue and I found a workaround that fixed it for me: use the -d/--data-dir global flag to set the data directory to a path without spaces in it, such as "C:\\Linsk" (for example: linsk -d "C:\\Linsk" build). My Windows username has a space in it just like yours. I guess Linsk isn't properly passing paths with spaces as args to QEMU. The one annoyance with this workaround is that you have to remember to type linsk -d "C:\\Linsk" instead of linsk every time you want to use Linsk.