[one-users] SCRIPT: for windows guest OS user :)

cloud.b.lab cloud.b.lab at zoho.com
Wed Jun 6 02:56:46 PDT 2012


Mario,

You may refer below two tutorials posted in the OpenNebula wiki to get some hints

This one is with VBSCRIPT and WINDOWS SHELL SCRIPT:

OpenNebula 3.4.1- Easy and faster way to create a Windows XP VM and perform MIGRATION & LIVE MIGRATION of the Windows VM [http://cloudblab.files.wordpress.com/2012/05/opennebula-3-4-1-and-windows-xp-vm-try-migration-and-live-migration1.pdf 

This one is with VBSCRIPT + WINDOWS POWERSHELL SCRIPT

Tutorial on creating Windows XP VM with OpenNebula R 3.4 and Ubuntu 11.10 64 bit serverhttp://cloudblab.wordpress.com/2012/03/08/how-to-create-windows-xp-vm-with-opennebula-r-3-4-and-ubuntu-11-10-64-bit-server/

Regards,
Anil


---- On Wed, 06 Jun 2012 02:13:12 -0700 mario wu<iamokcn at gmail.com> wrote ---- 


hi,all      i writed a trivial script for windows guest OS user, for automatic setting ip address,gateway address,dns server, and change the hostname:) . in the attachment.


the vm template sample like this:
 

CONTEXT = [
  HOSTNAME   = "$NAME",
   IP_PUBLIC = "$NIC[IP]",
  NET_MASK = "$NETWORK[NETWORK_MASK,NETWORK_ID=27]",
        DNS_ADDR="$NETWORK[DNS_ADDR,NETWORK_ID=27]",
        GATEWAY_ADDR="$NETWORK[GATEWAY_ADDR,NETWORK_ID=27]"
 ]




and the vnet template must have this attribute:




 DNS_ADDR="192.168.180.102"
GATEWAY_ADDR="192.168.173.254"
NETWORK_MASK="255.255.255.0"






just put the vbscript in the schedule task and set run as computer start. 
 

run as:
cscript.exe \some\path\for\set-network.vbs 

 the context.sh like this:


 # Context variables generated by OpenNebula
DNS_ADDR="192.168.180.102"
GATEWAY_ADDR="192.168.173.254"
HOSTNAME="test-win2003"
IP_PUBLIC="192.168.173.100"
NET_MASK="255.255.255.0"
 TARGET="hdb"




 _______________________________________________ 
Users mailing list 
Users at lists.opennebula.org 
http://lists.opennebula.org/listinfo.cgi/users-opennebula.org 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20120606/e1d3df2c/attachment-0003.htm>


More information about the Users mailing list