qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: zhanghailiang <zhang.zhanghailiang@huawei.com>
To: Yan Vugenfirer <yvugenfi@redhat.com>
Cc: lilei@linux.vnet.ibm.com, qemu-devel@nongnu.org,
	mdroth@linux.vnet.ibm.com, lcapitulino@redhat.com,
	peter.huangpeng@huawei.com, lersek@redhat.com
Subject: Re: [Qemu-devel] [RFC PATCH 0/2] qga: add guest-get-os-version for windows
Date: Tue, 16 Dec 2014 19:06:43 +0800	[thread overview]
Message-ID: <54901243.1060706@huawei.com> (raw)
In-Reply-To: <41A27A83-471A-42D6-9D50-2E61D01B00FC@redhat.com>

On 2014/12/16 17:38, Yan Vugenfirer wrote:
> Hi,
>
> My suggestion is to handle the case when the newer OS will be installed in the guest as well.
>

Yes, we can do this when we install guest OS, save the version info into some places,
and get the info when we need, But it is not so flexible, especially when we manage the OS image directly,
we have to record the relationship between image name and its OS version, besides, we need to apply an API to
return image's OS version.

So IMHO, get the OS version info from guest and use qga command to get the info are more flexible and reliable.


> Please look at version helper API - http://msdn.microsoft.com/en-us/library/windows/desktop/dn424972(v=vs.85).aspx <http://msdn.microsoft.com/en-us/library/windows/desktop/dn424972(v=vs.85).aspx>
> and keep in mind that the usual GetVersion and GetVersionEx (that returned major, minor versions and build number) will be deprecated or changed after Windows 8.1.
>

Hmm, i noticed this ;), i have handle it specially for windows 8.1 in this patch.
We can still get its real version by other method.

And here i just add a framework for get-os-version, we can improve it when new OS comes out.

Thanks,
zhanghailiang

>
>
>> On Dec 16, 2014, at 9:30 AM, zhanghailiang <zhang.zhanghailiang@huawei.com> wrote:
>>
>> Hi,
>>
>> This patch series add a new guest command 'guest-get-os-version'.
>> It is now only available for windows guest.
>>
>> It will return guest's OS version name and type, like bellow:
>> '{"return":{"name":"Microsoft Windows Server 2012 R2","type":64}}'
>>
>> Sometimes we need to know guest's OS version info.
>> (Actually, we need this info when we update guest's applications and drivers
>> in our project.)
>>
>> This patch is only RFC, it is another try to add more commands for qemu-ga.
>> Though qemu-ga has supported some commands now, but it is not enough and some
>> of them only support for linux ...
>>
>> I would like to enrich it, if someone think it is acceptable.
>>
>> So, any comments will be welcome! Thanks ;)
>>
>> zhanghailiang (2):
>>   qga: Introduce guest-get-os-version command with stubs
>>   qga: implement qmp_guest_get_os_version for windows
>>
>> qga/commands-posix.c |   7 +++
>> qga/commands-win32.c | 125 +++++++++++++++++++++++++++++++++++++++++++++++++++
>> qga/qapi-schema.json |  26 +++++++++++
>> 3 files changed, 158 insertions(+)
>>
>> --
>> 1.7.12.4
>>
>>
>>
>
>

  reply	other threads:[~2014-12-16 11:07 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-16  7:30 [Qemu-devel] [RFC PATCH 0/2] qga: add guest-get-os-version for windows zhanghailiang
2014-12-16  7:30 ` [Qemu-devel] [RFC PATCH 1/2] qga: Introduce guest-get-os-version command with stubs zhanghailiang
2014-12-16 16:23   ` Eric Blake
2015-01-03  0:32     ` Richard W.M. Jones
2014-12-16  7:30 ` [Qemu-devel] [RFC PATCH 2/2] qga: implement qmp_guest_get_os_version for windows zhanghailiang
2014-12-16 11:48   ` Yan Vugenfirer
2014-12-16 16:26     ` Eric Blake
2014-12-17  8:14       ` zhanghailiang
2014-12-16  9:38 ` [Qemu-devel] [RFC PATCH 0/2] qga: add guest-get-os-version " Yan Vugenfirer
2014-12-16 11:06   ` zhanghailiang [this message]
2014-12-16 16:25 ` Eric Blake
2014-12-17  8:12   ` zhanghailiang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54901243.1060706@huawei.com \
    --to=zhang.zhanghailiang@huawei.com \
    --cc=lcapitulino@redhat.com \
    --cc=lersek@redhat.com \
    --cc=lilei@linux.vnet.ibm.com \
    --cc=mdroth@linux.vnet.ibm.com \
    --cc=peter.huangpeng@huawei.com \
    --cc=qemu-devel@nongnu.org \
    --cc=yvugenfi@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).