VMware ESXi 5.0の設定情報のバックアップをとります
今回はManagement Assistant 5.0(vMA 5.0)のvCLIでnfs mountした領域にバックアップを作成しました
環境
- VMware ESXi 5.0(Free Edition)
- Management Assistant 5.0(vMA 5.0)
- FreeNAS(nfs Server)
- vMAにsshでログイン
- vMAにFreeNASのnfs共有領域を接続
- ターゲットに移動
- 設定情報のバックアップ作成
123456 vi-admin@vma5:~> df -hFilesystem Size Used Avail Use% Mounted on/dev/sda3 2.7G 1.5G 1.2G 57% /devtmpfs 290M 88K 290M 1% /devtmpfs 290M 0 290M 0% /dev/shm/dev/sda1 130M 18M 105M 15% /bootvi-admin@vma5:~> sudo mkdir /FreeNAS
vi-admin@vma5:~> sudo mount -t nfs 192.168.1.10:/mnt/data /FreeNAS
12345678 vi-admin@vma5:~> df -hFilesystem Size Used Avail Use% Mounted on/dev/sda3 2.7G 1.5G 1.2G 57% /devtmpfs 290M 88K 290M 1% /devtmpfs 290M 0 290M 0% /dev/shm/dev/sda1 130M 18M 105M 15% /boot192.168.1.10:/mnt/data289G 15G 252G 6% /FreeNAS
vi-admin@vma5:~> vifp listservers
vmesxi.rootlinks.net ESXi
vi-admin@vma5:~> vifptarget -s vmesxi.rootlinks.net
vi-admin@vma5:~[vmesxi.rootlinks.net]>
vi-admin@vma5:~[vmesxi.rootlinks.net]> vicfg-cfgbackup -s /FreeNAS/vmesxi_20120818.cfg
Saving firmware configuration to /FreeNAS/vmesxi_20120818.cfg …
12 vi-admin@vma5:/FreeNAS[vmesxi.rootlinks.net]> ls -l /FreeNAS-rw------- 1 root root 16205 2012-08-18 09:30 vmesxi_20120818.cfg
参考
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 vi vicfg-mpath35 vicfg-volume vimvicfg-advcfg vicfg-nas vicfg-vswitch vimdiffvicfg-authconfig vicfg-nics vidmode vim-normalvicfg-cfgbackup vicfg-ntp view vimtutorvicfg-dns vicfg-rescan vifp viperl-supportvicfg-dumppart vicfg-route vifpinit vipwvicfg-hostops vicfg-scsidevs vifptarget visudovicfg-ipsec vicfg-snmp vifs vitmpvicfg-iscsi vicfg-syslog vigrvicfg-module vicfg-user vihostupdatevicfg-mpath vicfg-vmknic vihostupdate35vi-admin@vma5:~> vicfg-cfgbackup --helpSynopsis: /usr/bin/vicfg-cfgbackup OPTIONS [<backupfile>]Command-specific options:--force-fForce the restore of the configuration.--load-lRestore configuration onto the host--quiet-qDo not prompt for user confirmation.--reset-rResets host, restore to factory settings.--save-sBackup the host configuration.Common VI options:--config (variable VI_CONFIG)Location of the VI Perl configuration file--credstore (variable VI_CREDSTORE)Name of the credential store file defaults to<HOME>/.vmware/credstore/vicredentials.xml onLinux and <APPDATA>/VMware/credstore/vicredentials.xml on Windows--encoding (variable VI_ENCODING, default 'utf8')Encoding: utf8, cp936 (Simplified Chinese),iso-8859-1 (German), shiftjis (Japanese)--helpDisplay usage information for the script--passthroughauth (variable VI_PASSTHROUGHAUTH)Attempt to use pass-through authentication--passthroughauthpackage (variable VI_PASSTHROUGHAUTHPACKAGE,default 'Negotiate')Pass-through authentication negotiation package--password (variable VI_PASSWORD)Password--portnumber (variable VI_PORTNUMBER)Port used to connect to server--protocol (variable VI_PROTOCOL, default 'https')Protocol used to connect to server--savesessionfile (variable VI_SAVESESSIONFILE)File to save session ID/cookie to utilize--server (variable VI_SERVER, default 'localhost')VI server to connect to. Required if url is not present--servicepath (variable VI_SERVICEPATH, default '/sdk/webService')Service path used to connect to server--sessionfile (variable VI_SESSIONFILE)File containing session ID/cookie to utilize--url (variable VI_URL)VI SDK URL to connect to. Required if server is not present--username (variable VI_USERNAME)Username--verbose (variable VI_VERBOSE)Display additional debugging information--versionDisplay version information for the script