Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

run image script can't find newly built image #1572

Open
vbatts opened this issue Oct 24, 2024 · 0 comments
Open

run image script can't find newly built image #1572

vbatts opened this issue Oct 24, 2024 · 0 comments
Labels
kind/bug Something isn't working

Comments

@vbatts
Copy link
Member

vbatts commented Oct 24, 2024

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

  1. 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
  1. Task: [ describe the task performing when encountering the bug ]
  2. 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
  3. 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
Status: 📝 Needs Triage
Development

No branches or pull requests

1 participant