From dev-return-113131-archive-asf-public=cust-asf.ponee.io@cloudstack.apache.org Mon Jun 17 13:33:34 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 4C97F18062B for ; Mon, 17 Jun 2019 15:33:34 +0200 (CEST) Received: (qmail 39797 invoked by uid 500); 17 Jun 2019 13:33:32 -0000 Mailing-List: contact dev-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list dev@cloudstack.apache.org Received: (qmail 39785 invoked by uid 99); 17 Jun 2019 13:33:31 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Jun 2019 13:33:31 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 0BEF21A3276 for ; Mon, 17 Jun 2019 13:33:31 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.8 X-Spam-Level: * X-Spam-Status: No, score=1.8 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id 3MlizWccpn0q for ; Mon, 17 Jun 2019 13:33:29 +0000 (UTC) Received: from mail-qk1-f177.google.com (mail-qk1-f177.google.com [209.85.222.177]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id CC2075F1ED for ; Mon, 17 Jun 2019 13:33:28 +0000 (UTC) Received: by mail-qk1-f177.google.com with SMTP id c11so6130163qkk.8 for ; Mon, 17 Jun 2019 06:33:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=INmw911/GI1Fl2r9e1BsjhXgEEa7NlnDeBFdwFy0fbE=; b=YxusThl1OJGHtXc/zxMd8zgkUNbtKbuporWoYSUdVG4eo0Jg0N/l0Spw5ntCk015JQ 5Fob2nWNsXX8Zs9yDsIOUQxjC/AwjbcxqNL6gkby/+h6dKC+8VKISf3vyOnWD3qLS5kn KC8+cWMNNXDUfCDKzfSEL14eo04uA/qfKrilPYjrL6e0cnkJ0Gj2yxmdebeD0m1P7G64 R9F44QpVv83yXzzeZQHaIFM+/MHp5jTalw6xsfvSV0B7diiViKaY1uhZ2C0BS7dRZQon 3i7mkT6rjn4uO4AopaeJ0riTa6wYhwIxTPJJjVou4B7gOplI1+S7WDHPtvZKFHgWpU+R A9SQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=INmw911/GI1Fl2r9e1BsjhXgEEa7NlnDeBFdwFy0fbE=; b=iY/rlGtWGN+N/8ciAKBobBtgN1lEz52R5QIc4tL0P0tdY+FHXl5LmC9kiMh1hEPaDf Z2reZkhZq7a+bGAYoT9aL3ujaC7mri4tUQTlMbKtWtNN16f/raiNQtdOYFMgK4ZgIXgq QKAYhie7vfjSqGDZTOHZbfRJy3psVgzqlxo3SUUa/IQoD5O2uVk3GBd0DQkZVTG6AF57 wXkIro9F4r0BfN0qXF0DRHXiwqSrzK1p/lSmwzgLkiFGu9sVlfKElCIdonwdh5uwoJ/p /dTOPMJ75GH1ebqQO84+EGP0TmjUPhdUmfeiGjSSjdNOuF7P9aONBHxxPS/3glDgQMc1 PMcw== X-Gm-Message-State: APjAAAVMoTbLwm0wIZHe56OO9Aq3CUCr6WhBppwhvBc3c3ifn9yrTjk7 7Pq3VaDzwW3owSPUQG8dDoo8ZeTsQE5HYUn0b6SemmMZ X-Google-Smtp-Source: APXvYqzE1K1OynvNA7VW1CHvP8v8+INsNsXTIc87FLCtOT65QUz7Of3Xi8z37F303VhW+PfsPXsVXs5oAZnCiYiIIQ8= X-Received: by 2002:a37:e0d:: with SMTP id 13mr48465426qko.83.1560778402211; Mon, 17 Jun 2019 06:33:22 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Rakesh Venkatesh Date: Mon, 17 Jun 2019 15:33:10 +0200 Message-ID: Subject: Re: Get VM OS type To: dev@cloudstack.apache.org Content-Type: multipart/alternative; boundary="0000000000003cab5a058b850ae8" --0000000000003cab5a058b850ae8 Content-Type: text/plain; charset="UTF-8" Thanks a lot for your replies. @Riepl nmap -sS -O does help in fetching the OS type only if they have public ip. I cant ssh into the machines because they are customer machines and I dont have credentials for them. @Nikolaos ping didnt work for me all the time because few VM's have blocked ping and in that case, there is no way of telling it. Also, the default TTL values are outdated in that page. I got a response of 122 for windows vm On Mon, Jun 17, 2019 at 12:30 PM Nikolaos Dalezios wrote: > Another solution is to ping a VM and check the TTL value. > Due to slightly different TCP/IP implementation on each OS-family, you can > identify the OS family by checking this > table > > > On Mon, Jun 17, 2019, 12:44 Riepl, Gregor (SWISS TXT) < > Gregor.Riepl@swisstxt.ch> wrote: > > > > > > version. Another way is to open the console and see the login screen. > > > This will get the actual data but I want to do automation to see for > > > all VM's and opening the console is not feasible to automate. Is > > > there any other way to get it? > > > > Are the VMs networked? > > > > You could fetch their public IPs and run nmap -sS -O against them. This > > should produce fairly accurate results. > > > > If they are all on the same Cloudstack network, you could also SSH into > > a connected VM and run nmap from there. > > > > I don't think that there is a generic way to obtain the actual OS > > running on a VM via Cloudstack. It might be possible through the > > hypervisor, but nmap will work in most cases. > > > -- Thanks and regards Rakesh venkatesh --0000000000003cab5a058b850ae8--