Aketaton
Contributor
Contributor

Vimsh to export VSwitch configuration and restore to another box

Hi all

I'm working on a DR project and my goal is to export vswitch configuration from one box and import it to another box in a DR Site.

I'm playing with vimsh because escfg-vswitch does not give me this opportunity.

What I am doing:

vimsh -n -e "hostsvc/net/config_save /root/config"

To save a big text file containing every net parameter

Then I try to restore it with:

vimsh -n -e "hostsvc/net/config_load /root/config"

but.. IT'S NOT WORKING even on the same host where I've backed it up...

I'm stuck... any idea?

0 Kudos
5 Replies
dinny
Expert
Expert

Hiya,

I appreciate it doesn't answer your exact question.

However one thing you could consider is using vimsh and esxcfg commands to script your initial server build (there are many forum posts about that)

For DR - you then just need to build the DR server with a similar build script and it will be identical.

It also gets round any worries about manually changing settings and documenting it all etc...

Dinny

0 Kudos
Aketaton
Contributor
Contributor

I totally agree with you, but in this case an outsourcer supplies the DR servers already installed so I have to customize the installation on a live ESX box.

Thank you for your hints Smiley Happy

0 Kudos
sbeaver
Leadership
Leadership

You can still write a script that will blow away networking and put things together the way you want them. I do this on my post and as long as you know the script is solid networking will come back and you will be fine.

Steve Beaver
VMware Communities User Moderator
VMware vExpert 2009 - 2020
VMware NSX vExpert - 2019 - 2020
====
Co-Author of "VMware ESX Essentials in the Virtual Data Center"
(ISBN:1420070274) from Auerbach
Come check out my blog: [www.virtualizationpractice.com/blog|http://www.virtualizationpractice.com/blog/]
Come follow me on twitter http://www.twitter.com/sbeaver

**The Cloud is a journey, not a project.**
0 Kudos
Aketaton
Contributor
Contributor

Can you please provide me a link?

\[So many posts.... 😛 ]

0 Kudos
sthoppay_wipro
Enthusiast
Enthusiast

Wait for Site Recovery Manager. It might make it easier for you.

0 Kudos