Skip navigation
VMware
0

Building my VI3 testenvironment, I discovered some interesting stuff:

 

  • VMware Fusion #

 

  • vmware-vdiskmanager under /Library/Application Support/VMware Fusion to create and convert virtual disk files(.vmdk)

 

  • Starting a virtual machine remotely over ssh: /Applications/VMware\ Fusion.app/Contents/MacOS/vmware /Volumes/Data/vmware/ESX001/esx301.vmx &

 

 

132 Views 0 Comments Permalink Tags: network, fusion, script
0

To change the VMkernel interface ip I use this code snippet (tested on esx 3.0.x):

     /usr/bin/vimsh -n -e "hostsvc/net/vnic_remove $(/usr/bin/vimsh -n -e "hostsvc/net/vnic_info"|grep device|awk '{print $3}'|sed s/\"//g|sed s/\,//g)"
     /usr/bin/vimsh -n -e "hostsvc/net/vnic_add --ip-address=$vmkernelip --ip-subnet=$vmkernelsubnet VMkernel"
     /usr/bin/vimsh -n -e "hostsvc/vmotion/vnic_set $(/usr/bin/vimsh -n -e "hostsvc/net/vnic_info"|grep device|awk '{print $3}'|sed s/\"//g|sed s/\,//g)"

The variables $vmkernelip and $vmkernelsubnet have to be defined earlier in your script!

912 Views 0 Comments Permalink Tags: vi3, script, vimsh
0

I use the following code snippet to chnage ip and hostname of esx service console (tested on esx 3.0.x):

     /usr/bin/vimsh -n -e "hostsvc/net/dns_set --dns-hostname=$targethostname"
     /usr/bin/vimsh -n -e "hostsvc/net/consolevnic_set --ip-address=$targetip --ip-subnet=$targetnetmask vswif0"

 

 

 

 

Attention: The ip is immediately changed. It's not a good idea to try this by ssh! The variables $targethostname, $targetip and $targetnetmask have to be defined.

 

 

647 Views 0 Comments Permalink Tags: vi3, script, vimsh
0

Today I tried to rename the local datastore on some esx 3.0.2 systems. Because I need a script to do this on many servers, I'm looking for a command on the cli (bash). I've some commands:

 

  • vimsh -n -e "/hostsvc/datastore/rename oldname newname"

  • ln -sf /vmfs/volumes/target /vmfs/volumes/newname && rm /vmfs/volumes/oldname

  • mv /vmfs/volumes/oldname /vmfs/volumes/newname

 

 

 

 

 

vimsh produces no error, but nothing really happens. The same for ln. Calling mv to rename the link, I've got a message saying "... Function not implemented".

 

 

 

Any suggestions?

 

 

 

Annotation:I tried everything as root, no virtual machines were running and the server was in maintenance mode. To rename the datastore with vi-client was possible.

322 Views 0 Comments Permalink Tags: vi3, script, vimsh


cleygraf

cleygraf

Member since: Jul 6, 2005

Everything Vmware: VI3, VMware Server, VMware Fusion, VMware Workstation

View cleygraf's profile

Recent Comments

No recent comments.

Filter Blog

Communities