Skip to main content

Posts

Setting up Proxy for debian OS using CLI

Create proxy file using VIM or nano  sudo vim /etc/profile.d/proxy.sh Populate your proxy values. # set proxy config via profie.d - should apply for all users # http/https/ftp/no_proxy export http_proxy="http://192.10.1.20:8080/" export https_proxy="http://192.10.1.20:8080/" export ftp_proxy="http://192.10.1.20:8080/" export no_proxy="127.0.0.1,localhost" # For curl export HTTP_PROXY="http://192.10.1.20:8080/" export HTTPS_PROXY="http://192.10.1.20:8080/" export FTP_PROXY="http://192.10.1.20:8080/" export NO_PROXY="127.0.0.1,localhost" Add any additional IP address to be excluded to the  NO_PROXY  &  no_proxy  environment variables. When done add execution bit to the script created. sudo chmod +x /etc/profile.d/proxy.sh Source the file for runtime use: source /etc/profile.d/proxy.sh Confirm proxy has been loaded in your environment. $ env | grep -i proxy

How to reset UUID of a vCenter Virtual Machine when vCenter license expired

  Problem: Issue when the old vCenter license expired and you want to create a new vCenter with EVAL license and it should use the same UUID. Solution: Steps: 1.Note down the Datacenter tree details of Folder,cluster names,Resource pools names and ESXi IPs of the current VC 2.Power of the current Expired VC 3.Download the .VMX file of the old vCenter where license expired.      and note down the below details of from the .VMX file.      VCHOST.vmx file can found by browsing the datastore and the VC VM name: 4.Install the new vCenter server with same hostname and IP address on the ESXi server 5.Power of the new vCenter VM from ESXi 6.Download the new vCenter VM .vmx file from esxi datastore browse->Files 7.Edit the .vmx file and replace the below details from the old expired VCs .vmx file: uuid.bios = "23 44 d0 1a e1 fd 75 15-5d e3 2b bc 79 a9 87 6d" vc.uuid = "04 f0 71 4a 88 b4 c7 ba-4f 30 2r 40 97 64 d2 89" 8.After saving the changes upload the edi...

How to extend reset your expired ESXi Evaluation EVAL license

  The below steps help to renew your EVAL for another 60days again! 1.SSH to your esxi server 2.Remove the existing License file : rm -r /etc/vmware/license.cfg 3.Copy the license from template file : cp /etc/vmware/.#license.cfg /etc/vmware/license.cfg 4.rm  /etc/vmware/vmware.lic  4. restart VPXA service using : /etc/init.d/vpxa restart   

register VMs from all datastores where we have .vmx file

When you want to register all VMs from datastore use below script to register all VMs. A) Register all Virtual Machine in a datastore find /vmfs/volumes/<Datastore name>/ -type f -maxdepth 2 -name '*.vmx' -exec vim-cmd solo/registervm {} \;   B) Register all Virtual Machine in all datastore find /vmfs/volumes/ -maxdepth 3 -name '*.vmx' -exec vim-cmd solo/registervm {} \;

Deploy/Install vCenter using single click using command

  Please see the below steps to install vCenter server in one click without manual intervention using onetime created of config file.    1.Mount the vCenter ISO image to any windows machine. 2.Copy the config json file from the location "E:\vcsa-cli-installer\templates\install\embedded_vCSA_on_ESXi.json" ,edit and save locally. 3.run the below command from the Path:     E:\vcsa-cli-installer\win32 >vcsa-deploy.exe install --accept-eula --acknowledge-ceip --no-ssl-certificate-verification --log-dir=G:\LogsVCSA G:\embedded_vCSA_on_ESXi.json   Wait for 30-40mins and the vCenter installation will be completed without any intervention. You can see the logs in case of any failure from log-dir. Note:use fqdn for vCenter Names. Example of json file:

Reset forgot vCenter server root password when management password known

 Problem: Forgot the root password of your vCenter root password. Solution: If you know the administrator password, Login to vCenter server through ssh and provide            user:administrator@vsphere.local             password: Enable shell prompt : shell.set --enabled true Now reset password with sudo : "sudo passwd root"

How to Update/Upgrade vCenter server patch versions

  For upgrading from major versions (7.x) to major versions(8.x) we can download vCenter full image and use run installer and then upgrade option. But in case of upgrade from same versions to next level patch : 1.Download the latest patch FP bundle(VMware-vCenter-Server-Appliance-7.0.3.01800-22837322-patch-FP.iso) from VMware website:  Product Patches - VMware Customer Connect  https://my.vmware.com/group/vmware/home 2.Once download ,copy the ISO to the esxi datastores. 3.Go to the vCenter VM and edit attach this iso to CD/DVD and connect 4.Now login to vCenter using 5480 port with root. 5.Go to Updates and check for updates. 6.Now select Stage and Install. 7.You are done with install and reboot. Or you can follow the below steps once you attach the DVD. Attach the  VMware-vCenter-Server-Appliance-7.0.3.01600-21958406-patch-FP.iso  file to the vCenter Server CD or DVD drive. Log in to the appliance shell as a user with super administrative privileges (for exampl...