Page 1 of 1

How to get VM name from the guest using vboxtools?

Posted: 22. Aug 2012, 16:05
by Alex_uk
I have been searching google for several days now without any luck.... (and have searched these forums without any luck)

I want a guest machine (running XP), on a Win7x64 host, to be able to query it's own guest VM name. I am then wanting to script a change of XP machine name to be the same as the VM name on the host (this bit is easy if I knew how to programatically collect the VM name!) i.e. when I clone a base XP machine, I have a run-once script on the XP machine that I want to use to rename the machine on the network to whatever I called the VM in the clone operation.

I have used the guest additions and vboxtools but can't find this variable being exposed anywhere.

Anyone have any ideas/solution?

Help much appreciated!

Thanks
Alex