From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K4H9w-00011E-2B for qemu-devel@nongnu.org; Thu, 05 Jun 2008 11:13:48 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K4H9r-0000yu-5r for qemu-devel@nongnu.org; Thu, 05 Jun 2008 11:13:47 -0400 Received: from [199.232.76.173] (port=53538 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K4H9q-0000yd-Uy for qemu-devel@nongnu.org; Thu, 05 Jun 2008 11:13:42 -0400 Received: from wr-out-0506.google.com ([64.233.184.234]:36417) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1K4H9n-0006nO-Su for qemu-devel@nongnu.org; Thu, 05 Jun 2008 11:13:40 -0400 Received: by wr-out-0506.google.com with SMTP id c49so267801wra.19 for ; Thu, 05 Jun 2008 08:13:38 -0700 (PDT) Message-ID: <48480294.4040405@codemonkey.ws> Date: Thu, 05 Jun 2008 10:13:24 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 2/5] Add -uuid command line option. References: <20080605083536.11678.439.stgit@gleb-debian.qumranet.com.qumranet.com> <20080605083541.11678.90045.stgit@gleb-debian.qumranet.com.qumranet.com> In-Reply-To: <20080605083541.11678.90045.stgit@gleb-debian.qumranet.com.qumranet.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Gleb Natapov wrote: > Let user specify UUID of the virtual machine. > Looks good to me. Note, this is a very common feature request for management tools running agents within a guest. They need to have a unique identifier to be able to correlate guests with hosts. Normally, this would be exposed via DMI tables but that's an obvious extension. Reviewed-by: Anthony Liguori Regards, Anthony Liguori > Signed-off-by: Gleb Natapov > --- > > vl.c | 8 ++++++++ > 1 files changed, 8 insertions(+), 0 deletions(-) > > diff --git a/vl.c b/vl.c > index 18ddcce..8e9e841 100644 > --- a/vl.c > +++ b/vl.c > @@ -240,6 +240,8 @@ static CPUState *cur_cpu; > static CPUState *next_cpu; > static int event_pending = 1; > > +const char *qemu_uuid_str; > + > #define TFR(expr) do { if ((expr) != -1) break; } while (errno == EINTR) > > /***********************************************************/ > @@ -7195,6 +7197,7 @@ static void help(int exitcode) > "-g WxH[xDEPTH] Set the initial graphical resolution and depth\n" > #endif > "-name string set the name of the guest\n" > + "-uuid %%08x-%%04x-%%04x-%%04x-%%012x specify machine UUID\n" > "\n" > "Network options:\n" > "-net nic[,vlan=n][,macaddr=addr][,model=type]\n" > @@ -7379,6 +7382,7 @@ enum { > QEMU_OPTION_clock, > QEMU_OPTION_startdate, > QEMU_OPTION_tb_size, > + QEMU_OPTION_uuid, > }; > > typedef struct QEMUOption { > @@ -7467,6 +7471,7 @@ const QEMUOption qemu_options[] = { > #ifdef CONFIG_CURSES > { "curses", 0, QEMU_OPTION_curses }, > #endif > + { "uuid", HAS_ARG, QEMU_OPTION_uuid }, > > /* temporary options */ > { "usb", 0, QEMU_OPTION_usb }, > @@ -8227,6 +8232,9 @@ int main(int argc, char **argv) > case QEMU_OPTION_show_cursor: > cursor_hide = 0; > break; > + case QEMU_OPTION_uuid: > + qemu_uuid_str = optarg; > + break; > case QEMU_OPTION_daemonize: > daemonize = 1; > break; > > > >