hyperhq / runv

Hypervisor-based Runtime for OCI
Apache License 2.0
828 stars 129 forks source link

How to locate vm root? #472

Closed Crazykev closed 7 years ago

Crazykev commented 7 years ago

For now, hypervisor related stuff(socket/pidfile etc.) exist in /var/run/hyper/ dir, and named with generated vm name vm-xxxxxxxx. This vm name can't be got through any runv command or option, could we offer a mechanism to get this vm specified path?

  1. add additional field in runv state result to include vm id.
  2. Or add a symbol link in container root dir, ie /run/runv/<container_id>/vm-root --> /var/run/hyper/<vm_id>

/cc @laijs

laijs commented 7 years ago

you can set the hypervisor.BaseDir to the containerd when runv containerd is just started. and the vm_id can be fetched from vm.Id. could you make a pr for it please?

Crazykev commented 7 years ago

@laijs yep, will do.

Crazykev commented 7 years ago

Fixed by #505