ppggff / vagrant-qemu

Use Vagrant to manage machines using QEMU. Test with Apple Silicon / M1 and CentOS aarch64 image
MIT License
424 stars 33 forks source link

serial/console access functionality #37

Open leifliddy opened 1 year ago

leifliddy commented 1 year ago

Is there a convenient way to associate a VM with its socket_path? The vagrant paths are not logically named.

[leif.liddy@mac ~]$ find .vagrant.d/ | grep socket_serial
.vagrant.d//tmp/vagrant-qemu/UVg8j53wuBs/qemu_socket_serial
.vagrant.d//tmp/vagrant-qemu/wNR_5RUixTs/qemu_socket_serial
.vagrant.d//tmp/vagrant-qemu/1TTkvUQgz6Q/qemu_socket_serial
.vagrant.d//tmp/vagrant-qemu/5wbGTEzltJM/qemu_socket_serial
.vagrant.d//tmp/vagrant-qemu/g8P2n_5CawA/qemu_socket_serial
.vagrant.d//tmp/vagrant-qemu/wNwtgWiaMxs/qemu_socket_serial
.vagrant.d//tmp/vagrant-qemu/zABVz-znJlA/qemu_socket_serial

Having an equivalent function to vagrant ssh-config or vagrant-ssh would be a really useful feature Where you would run something like vagrant serial-config to list the qemu_socket_serial paths for each VM.

and/or maybe something like vagrant console [vm_name] or vagrant serial [vm_name] to serial/console in to a specific VM.

Anyone of these features would be extremely useful. Anyways, just a thought. Thank you for such a cool project!

ppggff commented 1 year ago

Thanks, I will try to add these custom commands.