VMware Cloud Community
vmmochi
Contributor
Contributor
Jump to solution

How do I edit files in the /opt directory and keep after reboot?

I figured out how to edit them, but the changes disappear after immediate reboot.  I read this other post about using the autobackup.sh script, but that was for '/etc' and not '/opt' directory.  The full path is /opt/cisco/v152/nexus/vem-v152/shell and the file is vssnet-functions. 

0 Kudos
1 Solution

Accepted Solutions
peetz
Leadership
Leadership
Jump to solution

I don't know how to solve the issue of having the same BIOS UUIDs on multiple machines in this case.

But to make the 1000v use different IDs you could try to add something like

vemset card uuid [new-uuid]

to the local boot script of ESXi. See this KB article:

VMware KB: Modifying the rc.local or local.sh file in ESX/ESXi to execute commands while booting

- Andreas

Twitter: @VFrontDe, @ESXiPatches | https://esxi-patches.v-front.de | https://vibsdepot.v-front.de

View solution in original post

0 Kudos
4 Replies
peetz
Leadership
Leadership
Jump to solution

This file is part of the "Cisco Nexus 1000v" software package for ESXi. To permanently modify it you would need to modify the contents of this package.

I'm sure that this is not supported by Cisco.

Why do you want to edit this file? Is it because of the "Duplicate host UUID" issue that is e.g. referenced here?: https://supportforums.cisco.com/thread/2166139

- Andreas

Twitter: @VFrontDe, @ESXiPatches | https://esxi-patches.v-front.de | https://vibsdepot.v-front.de
0 Kudos
vmmochi
Contributor
Contributor
Jump to solution

Same issue but I did not install with a service profile ( I don't know what service profile is. )  I've installed from scratch.  Seems to be a problem of vmware not being able to read the uuid from motherboard,

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=100625...

I've updated my Shuttle PC motherboard bios to the latest from around april this year and reinstalled vmware esxi from scratch but it still gets that generic UUID 00020003-0004-0005-0006-000700080009

0 Kudos
peetz
Leadership
Leadership
Jump to solution

I don't know how to solve the issue of having the same BIOS UUIDs on multiple machines in this case.

But to make the 1000v use different IDs you could try to add something like

vemset card uuid [new-uuid]

to the local boot script of ESXi. See this KB article:

VMware KB: Modifying the rc.local or local.sh file in ESX/ESXi to execute commands while booting

- Andreas

Twitter: @VFrontDe, @ESXiPatches | https://esxi-patches.v-front.de | https://vibsdepot.v-front.de
0 Kudos
vmmochi
Contributor
Contributor
Jump to solution

Thanks peetz, that local.sh file worked for me.

Here's what my file looks like,

~ # cat /etc/rc.local.d/local.sh

#!/bin/sh

# local configuration options

# Note: modify at your own risk!  If you do/use anything in this

# script that is not part of a stable API (relying on files to be in

# specific places, specific tools, specific output, etc) there is a

# possibility you will end up with a broken system after patching or

# upgrading.  Changes are not supported unless under direction of

# VMware support.

# manually set the UUID so N1KV doesn't think the're duplicates

vemcmd card uuid vmware 03000200-0400-0500-0006-000700080099

exit

After the edit above, use the esxi console gui to reload (I think I read somewhere that it will call the backup script to save the file changes).

0 Kudos