Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Using WMI to Get Virtual PC Host Name
I setup servers for our tester & developers, and we have deployed over 50
Virtual PCs running across approximately 30 VPC Hosts.

Is there some way I can get the Host Machine Name for running VPCs, either
by WMI or maybe somewhere in the registry of each Virtual PC?

We are currently planning another development cycle for the next release of
our product, and the number of running VPCs & hosts is going to double if no
t
triple.

Thank you.

Report this thread to moderator Post Follow-up to this message
Old Post
Bill R
08-14-04 01:55 AM


Re: Using WMI to Get Virtual PC Host Name
No - they are completely isolated.  The guest doesn't know what its host is

--
--Jonathan Maltz [Microsoft MVP - Windows Server - IIS, Virtual PC]
http://www.visualwin.com - A Windows Server 2003 visual, step-by-step
tutorial site :-)
http://vpc.visualwin.com - Does <insert OS name> work on VPC 2004?  Find out
here
Only reply by newsgroup.  I do not do technical support via email.  Any
emails I have not authorized are deleted before I see them.


"Bill R" <BillR@discussions.microsoft.com> wrote in message
news:D6352850-B7A7-4671-BF6E-134D269FA410@microsoft.com...
> I setup servers for our tester & developers, and we have deployed over 50
> Virtual PCs running across approximately 30 VPC Hosts.
>
> Is there some way I can get the Host Machine Name for running VPCs, either
> by WMI or maybe somewhere in the registry of each Virtual PC?
>
> We are currently planning another development cycle for the next release
of
> our product, and the number of running VPCs & hosts is going to double if
not
> triple.
>
> Thank you.



Report this thread to moderator Post Follow-up to this message
Old Post
Jonathan Maltz [MS-MVP]
08-14-04 01:55 AM


Re: Using WMI to Get Virtual PC Host Name
Although the Virtual Machine Additions probably knows, there is no
documented API which exposes it.

You can, however, solve the problem another way. Exactly how you would do it
in your environment would depend on a lot of things but below are a couple
of general approaches you could take. I am assuming that your guest OS is
always Windows (otherwise you would not have asked about using WMI).

1. Naming conventions: If your guest images are configured with networking
enabled and bound to the host's physical NIC (which is the default in VPC
2004), then even if you aren't joining the guest machines to a domain, you
must be giving each of them a distinct computer name to avoid "duplicate
name on the network" errors. If so, then your images are not 100%
transportable because you can't simply copy a guest from one host and start
running it on another, unless the first host stops running it, or unless you
rename the guest. Therefore, it should be practical to use a naming
convention for guest machines which indicates the host it's running on. Even
if you only assign 2 alphanumeric characters (0-9 and A-Z) for this purpose,
that would allow for 1,296 possible host IDs. Your program/script running on
the guest would just obtain its own machine name and then do a lookup, based
upon that portion of the name.

2. Standard path on the host containing config file: Configure your guest
images with the Shared Folders feature so that there is a consistent,
permanent drive letter (let's say H: for host) which always maps to C:\VPC.
In the C:\VPC folder of each host, deploy a config file (ini file, xml file,
or just a plain txt file) which contains the host's name. You don't even
have to touch each host machine to deploy this file. You could have a logon
script or startup script generate it, or you could run an ADSI-based script
from a central machine which connects to \\host\c$\vpc to drop the file.




"Bill R" <BillR@discussions.microsoft.com> wrote in message
news:D6352850-B7A7-4671-BF6E-134D269FA410@microsoft.com...
>I setup servers for our tester & developers, and we have deployed over 50
> Virtual PCs running across approximately 30 VPC Hosts.
>
> Is there some way I can get the Host Machine Name for running VPCs, either
> by WMI or maybe somewhere in the registry of each Virtual PC?



Report this thread to moderator Post Follow-up to this message
Old Post
Ronny Ong
08-15-04 01:55 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

MSDN archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 04:40 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.