run image script can't find newly built image
Opened this issue · 0 comments
vbatts commented
Description
building and running a flatcar image on local machine. From https://www.flatcar.org/docs/latest/reference/developer-guides/sdk-modifying-flatcar/#getting-started
Impact
base instructions and command output for running the new image did not work.
Environment and steps to reproduce
- Set-up:
- building from Ubuntu 22.04
- git clone'd flatcar/scripts commit flatcar/scripts@eee5473
- running sdk image
ghcr.io/flatcar/flatcar-sdk-all:4116.0.0 flatcar-sdk-all-4116.0.0_os-alpha-4116.0.0-nightly-20241016-2100
- Task: [ describe the task performing when encountering the bug ]
- Action(s):
a../build_packages
b../build_image
c../image_to_vm.sh --from=../build/images/amd64-usr/developer-4116.0.0+nightly-20241016-2100-a1 --board=amd64-usr
d. (then on the host, outside of SDK container)
e.cd ~/src/flatcar/scripts/__build__/images/images/amd64-usr/latest
f../flatcar_production_qemu_uefi_secure.sh -a ~/.ssh/authorized_keys -- -curses
- Error:
vbatts@possibly:~/src/flatcar/scripts/__build__/images/images/amd64-usr/latest$ ./flatcar_production_qemu_uefi_secure.sh -a ~/.ssh/authorized_keys -- -curses
qemu-system-x86_64: -curses: warning: -curses is deprecated, use -display curses instead.
qemu-system-x86_64: -drive if=virtio,file=./flatcar_production_qemu_uefi_secure_image.img: Could not open './flatcar_production_qemu_uefi_secure_image.img': No such file or directory
vbatts@possibly:~/src/flatcar/scripts/__build__/images/images/amd64-usr/latest$ ls -l ./flatcar_production_qemu_uefi_secure_image.img*
lrwxrwxrwx 1 vbatts vbatts 42 Oct 24 09:52 ./flatcar_production_qemu_uefi_secure_image.img.bz2 -> flatcar_production_qemu_uefi_image.img.bz2
whereas the output of the image_to_vm.sh showed:
INFO image_to_vm.sh: Removing /mnt/host/source/src/build/images/amd64-usr/developer-4116.0.0+nightly-20241016-2100-a1/flatcar_production_qemu_uefi_image.img [50/1971]
. o ..
o . o o.o
...oo_
_[__\___
__|_o_o_o_o\__
OK \' ' ' ' ' ' /
^^^^^^^^^^^^^^^^^^^^
INFO image_to_vm.sh: Elapsed time (image_to_vm.sh): 1m5s
INFO image_to_vm.sh: Files written to ../build/images/amd64-usr/developer-4116.0.0+nightly-20241016-2100-a1
INFO image_to_vm.sh: - flatcar_production_qemu_image.img
INFO image_to_vm.sh: - flatcar_production_qemu_uefi_secure_image.img
INFO image_to_vm.sh: - flatcar_production_qemu_uefi_image.img
INFO image_to_vm.sh: - flatcar_production_qemu_uefi.sh
INFO image_to_vm.sh: - flatcar_production_qemu_uefi.README
INFO image_to_vm.sh: - flatcar_production_qemu_uefi_efi_code.fd
INFO image_to_vm.sh: - flatcar_production_qemu_uefi_efi_vars.fd
INFO image_to_vm.sh: - flatcar_production_qemu.sh
INFO image_to_vm.sh: - flatcar_production_qemu_uefi.README
INFO image_to_vm.sh: - flatcar_production_qemu_uefi_secure.sh
INFO image_to_vm.sh: - flatcar_production_qemu_uefi.README
INFO image_to_vm.sh: - flatcar_production_qemu_uefi_secure_efi_code.fd
INFO image_to_vm.sh: - flatcar_production_qemu_uefi_secure_efi_vars.fd
If you have qemu installed (or in the SDK), you can start the image with:
cd path/to/image
./flatcar_production_qemu_uefi_secure.sh -curses
If you need to use a different ssh key or different ssh port:
./flatcar_production_qemu_uefi_secure.sh -a ~/.ssh/authorized_keys -p 2223 -- -curses
If you rather you can use the -nographic option instad of -curses. In this
mode you can switch from the vm to the qemu monitor console with: Ctrl-a c
See the qemu man page for more details on the monitor console.
SSH into that host with:
ssh 127.0.0.1 -p 2222
Expected behavior
newly built image to run in qemu
Additional information
Please add any information here that does not fit the above format.