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

VM does not exist error with ssh command on applehv podman machine #21183

Closed
tnk4on opened this issue Jan 6, 2024 · 2 comments · Fixed by #21207
Closed

VM does not exist error with ssh command on applehv podman machine #21183

tnk4on opened this issue Jan 6, 2024 · 2 comments · Fixed by #21207
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. macos MacOS (OSX) related remote Problem is in podman-remote

Comments

@tnk4on
Copy link
Contributor

tnk4on commented Jan 6, 2024

Issue Description

There is a bug in fix PR #21114 and running podman machine ssh <command> results in an error.

I commented on the related Issue #21090 .

Steps to reproduce the issue

Steps to reproduce the issue
(Podman machine is pre-created)

  1. git clone https://github.com/containers/podman.git
  2. make podman-remote
  3. Run podman machine ssh <command>
% bin/darwin/podman machine ssh date
Error: ls: VM does not exist
% bin/darwin/podman machine ssh podman-machine-default date
Sat Jan  6 22:47:47 JST 2024

Describe the results you received

% bin/darwin/podman machine ssh date
Error: ls: VM does not exist

Describe the results you expected

% bin/darwin/podman machine ssh date
Sat Jan  6 22:47:47 JST 2024

podman info output

% bin/darwin/podman info                                   
host:
  arch: arm64
  buildahVersion: 1.32.0
  cgroupControllers:
  - cpuset
  - cpu
  - io
  - memory
  - pids
  - rdma
  - misc
  cgroupManager: systemd
  cgroupVersion: v2
  conmon:
    package: conmon-2.1.8-2.fc39.aarch64
    path: /usr/bin/conmon
    version: 'conmon version 2.1.8, commit: '
  cpuUtilization:
    idlePercent: 99.62
    systemPercent: 0.18
    userPercent: 0.2
  cpus: 5
  databaseBackend: boltdb
  distribution:
    distribution: fedora
    variant: coreos
    version: "39"
  eventLogger: journald
  freeLocks: 2046
  hostname: localhost.localdomain
  idMappings:
    gidmap: null
    uidmap: null
  kernel: 6.6.3-200.fc39.aarch64
  linkmode: dynamic
  logDriver: journald
  memFree: 617013248
  memTotal: 1982873600
  networkBackend: netavark
  networkBackendInfo:
    backend: netavark
    dns:
      package: aardvark-dns-1.8.0-1.fc39.aarch64
      path: /usr/libexec/podman/aardvark-dns
      version: aardvark-dns 1.8.0
    package: netavark-1.8.0-2.fc39.aarch64
    path: /usr/libexec/podman/netavark
    version: netavark 1.8.0
  ociRuntime:
    name: crun
    package: crun-1.12-1.fc39.aarch64
    path: /usr/bin/crun
    version: |-
      crun version 1.12
      commit: ce429cb2e277d001c2179df1ac66a470f00802ae
      rundir: /run/crun
      spec: 1.0.0
      +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +CRIU +LIBKRUN +WASM:wasmedge +YAJL
  os: linux
  pasta:
    executable: /usr/bin/pasta
    package: passt-0^20231119.g4f1709d-1.fc39.aarch64
    version: |
      pasta 0^20231119.g4f1709d-1.fc39.aarch64-pasta
      Copyright Red Hat
      GNU General Public License, version 2 or later
        <https://www.gnu.org/licenses/old-licenses/gpl-2.0.html>
      This is free software: you are free to change and redistribute it.
      There is NO WARRANTY, to the extent permitted by law.
  remoteSocket:
    exists: true
    path: /run/podman/podman.sock
  security:
    apparmorEnabled: false
    capabilities: CAP_CHOWN,CAP_DAC_OVERRIDE,CAP_FOWNER,CAP_FSETID,CAP_KILL,CAP_NET_BIND_SERVICE,CAP_SETFCAP,CAP_SETGID,CAP_SETPCAP,CAP_SETUID,CAP_SYS_CHROOT
    rootless: false
    seccompEnabled: true
    seccompProfilePath: /usr/share/containers/seccomp.json
    selinuxEnabled: true
  serviceIsRemote: true
  slirp4netns:
    executable: /usr/bin/slirp4netns
    package: slirp4netns-1.2.2-1.fc39.aarch64
    version: |-
      slirp4netns version 1.2.2
      commit: 0ee2d87523e906518d34a6b423271e4826f71faf
      libslirp: 4.7.0
      SLIRP_CONFIG_VERSION_MAX: 4
      libseccomp: 2.5.3
  swapFree: 0
  swapTotal: 0
  uptime: 38h 20m 25.00s (Approximately 1.58 days)
  variant: ""
plugins:
  authorization: null
  log:
  - k8s-file
  - none
  - passthrough
  - journald
  network:
  - bridge
  - macvlan
  - ipvlan
  volume:
  - local
registries:
  search:
  - docker.io
store:
  configFile: /usr/share/containers/storage.conf
  containerStore:
    number: 1
    paused: 0
    running: 0
    stopped: 1
  graphDriverName: overlay
  graphOptions:
    overlay.mountopt: nodev,metacopy=on
  graphRoot: /var/lib/containers/storage
  graphRootAllocated: 106769133568
  graphRootUsed: 4921114624
  graphStatus:
    Backing Filesystem: xfs
    Native Overlay Diff: "false"
    Supports d_type: "true"
    Supports shifting: "true"
    Supports volatile: "true"
    Using metacopy: "true"
  imageCopyTmpDir: /var/tmp
  imageStore:
    number: 9
  runRoot: /run/containers/storage
  transientStore: false
  volumePath: /var/lib/containers/storage/volumes
version:
  APIVersion: 4.7.2
  Built: 1698762633
  BuiltTime: Tue Oct 31 23:30:33 2023
  GitCommit: ""
  GoVersion: go1.21.1
  Os: linux
  OsArch: linux/arm64
  Version: 4.7.2

Podman in a container

No

Privileged Or Rootless

None

Upstream Latest Release

Yes

Additional environment details

% bin/darwin/podman version
Client:       Podman Engine
Version:      5.0.0-dev
API Version:  5.0.0-dev
Go Version:   go1.21.5
Git Commit:   1697a8bfcffcaa1f8c9905970374562f465d9cf6-dirty
Built:        Sat Jan  6 22:40:17 2024
OS/Arch:      darwin/arm64

Server:       Podman Engine
Version:      4.7.2
API Version:  4.7.2
Go Version:   go1.21.1
Built:        Tue Oct 31 23:30:33 2023
OS/Arch:      linux/arm64

% sw_vers 
ProductName:            macOS
ProductVersion:         14.2.1
BuildVersion:           23C71

% vfkit -v
vfkit version: 0.5.0

%  bin/darwin/podman machine ls      
NAME                    VM TYPE     CREATED         LAST UP            CPUS        MEMORY      DISK SIZE
test                    applehv     57 minutes ago  Currently running  5           2GiB        100GiB
podman-machine-default  applehv     44 hours ago    Currently running  5           2GiB        100GiB

Additional information

Additional information like issue happens only occasionally or issue happens with a particular architecture or on a particular setting

@tnk4on tnk4on added the kind/bug Categorizes issue or PR as related to a bug. label Jan 6, 2024
@github-actions github-actions bot added macos MacOS (OSX) related remote Problem is in podman-remote labels Jan 6, 2024
@tnk4on
Copy link
Contributor Author

tnk4on commented Jan 6, 2024

The pattern for arg[0] is as follows.

no arg[0] Podman machine validVM err Comments
1 N/A podman-machine-default true <nil>
2 podman-machine-default podman-machine-default true <nil>
3 Command podman-machine-default false VM does not exist This issue
4 other VM's name other VM true <nil>

I am not sure if this is correct, but by removing the following part of the code, the problem will be solved.

if err != nil {
return err
}

@rhatdan
Copy link
Member

rhatdan commented Jan 7, 2024

Care to open a PR to fix?

@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Apr 12, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. macos MacOS (OSX) related remote Problem is in podman-remote
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants