Quantcast
Channel: VMware Communities : Discussion List - Virtual Disk Development Kit
Viewing all articles
Browse latest Browse all 2039

is there any certain command not available when using vmrunprograminguest?

$
0
0

I tried to use vmrunprograminguest command to change the ip address of a virtual machine.and I write a shell to perform it, as followed

sed -i "s/IPADDR.*/IPADDR=123.123.234.1/g" /etc/sysconfig/network-scripts/ifcfg-eth0

sed -i "s/PREFIX.*//g" /etc/sysconfig/network-scripts/ifcfg-eth0

sed -i "s/NETMASK.*/NETMASK=255.255.0.0 /g" /etc/sysconfig/network-scripts/ifcfg-eth0

/etc/init.d/network restart

and i also tried vmrun,like  vmrun -gu root -gp 123456 runProgramInGuest "E:\\redhat\\Red Hat Enterprise Linux 6.vmx" /bin/bash /root/ipchange.sh

the problem is that the first four line is executed perfectly well, but the network cannot restart. and no error code is returned.

similar problem occured when i try to run other command like start arpd as a background service.

looking forward to your help.


Viewing all articles
Browse latest Browse all 2039

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>