diff --git a/src/client/cli/cmd/list.cpp b/src/client/cli/cmd/list.cpp index 8e6ac792a7..d38f265e75 100644 --- a/src/client/cli/cmd/list.cpp +++ b/src/client/cli/cmd/list.cpp @@ -46,6 +46,7 @@ mp::ReturnCode cmd::List::run(mp::ArgParser* parser) ListRequest request; request.set_verbosity_level(parser->verbosityLevel()); + request.set_request_ipv4(true); return dispatch(&RpcMethod::list, request, on_success, on_failure); } diff --git a/src/client/gui/gui_cmd.cpp b/src/client/gui/gui_cmd.cpp index 971898da1b..8e256c5461 100644 --- a/src/client/gui/gui_cmd.cpp +++ b/src/client/gui/gui_cmd.cpp @@ -349,6 +349,7 @@ mp::ListReply cmd::GuiCmd::retrieve_all_instances() }; ListRequest request; + request.set_request_ipv4(false); dispatch(&RpcMethod::list, request, on_success, on_failure); return list_reply; diff --git a/src/daemon/daemon.cpp b/src/daemon/daemon.cpp index 3ab826c640..bd33aebd53 100644 --- a/src/daemon/daemon.cpp +++ b/src/daemon/daemon.cpp @@ -1420,7 +1420,7 @@ try // clang-format on entry->set_current_release(current_release); - if (mp::utils::is_running(present_state)) + if (request->request_ipv4() && mp::utils::is_running(present_state)) { auto vm_specs = vm_instance_specs[name]; mp::SSHSession session{vm->ssh_hostname(), vm->ssh_port(), vm_specs.ssh_username, diff --git a/src/rpc/multipass.proto b/src/rpc/multipass.proto index 52971d901a..8f147810da 100644 --- a/src/rpc/multipass.proto +++ b/src/rpc/multipass.proto @@ -223,6 +223,7 @@ message InfoReply { message ListRequest { int32 verbosity_level = 1; + bool request_ipv4 = 2; } message ListVMInstance {