VMware Summary Installation Script

Source: Internet
Author: User

# # #cust configurations###

P_sn= ' ESXCLI hardware platform Get | grep "Serial Number" | Awk-f ":" ' {print $NF} ' | Sed ' s///g '

P_name= ' ESXCLI hardware platform Get | grep "Product Name" | Awk-f ":" ' {print $NF} '

wget Http://10.10.10.10/config/newserver

Local_ipaddr= ' Cat NewServer | grep $P _SN | Awk-f "," ' {print '} '

#LOCAL_GATEWAY = ' Cat NewServer | grep $P _SN | Awk-f "," ' {print $} '

Local_gateway= "$ (cat NewServer | grep $P _sn | awk-f". " ' {print $ '. $ "." $ ') "." 254 "

#LOCAL_HOSTMANE = ' Cat NewServer | grep $P _SN | Awk-f "," ' {print $} '

Local_hostmane= "Lg_${p_sn}_ops"


# # #network config####


ESXCLI Network IP set--ipv6-enabled=no

ESXCLI Network vswitch Standard uplink add--uplink-name=vmnic1--vswitch-name=vswitch0

# ADD VMotion PortGroup to VSwitch0, assign it VLAN ID 5 and create a VMkernel interface

ESXCLI Network vswitch Standard portgroup add--portgroup-name=vmotion--vswitch-name=vswitch0

ESXCLI Network vswitch Standard PortGroup set--portgroup-name=vmotion--vlan-id=2060

ESXCLI Network IP interface add--interface-name=vmk0--portgroup-name=vmotion

#esxcfg-vswitch--vlan=2060--pg= "Management Network" VSwitch0

ESXCLI Network IP interface IPv4 set--interface-name=vmk0--ipv4= $LOCAL _ipaddr--netmask=255.255.255.0--type=static

ESXCLI Network IP route IPv4 add--gateway= $LOCAL _gateway--network=default

# Enable VMotion on the newly created VMkernel Vmk1

Vim-cmd Hostsvc/vmotion/vnic_set Vmk0

# Set DNS and hostname

ESXCLI system hostname Set--fqdn= $LOCAL _hostmane

ESXCLI Network IP DNS search add--domain=localdomain

ESXCLI network IP DNS server add--server=202.106.196.115

ESXCLI network IP DNS server add--server=8.8.8.8

# Set The default PSP for EMC V-max to Round Robin as that's our preferred load balancing mechanism

ESXCLI storage NMP SATP set--DEFAULT-PSP vmw_psp_rr--SATP vmw_satp_symm

# Disable NETQ #

Esxcfg-module-s force_netq=0,0,0,0 TG3

Esxcfg-advcfg-k FALSE netnetqueueenabled

# Enable SSH and the ESXi Shell

Vim-cmd Hostsvc/enable_ssh

Vim-cmd Hostsvc/start_ssh

Vim-cmd Hostsvc/enable_esx_shell

Vim-cmd Hostsvc/start_esx_shell


This article from "Let Me Men Grow Together" blog, reprint please contact the author!

VMware Summary Installation Script

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.