Quantcast
Channel: VMware Communities: Message List
Viewing all 230224 articles
Browse latest View live

Revisiting scripted ESXi Installs - now working in ESXi 6.5

$
0
0

I thought I would revisit scripted ESXi installation for my lab. It's been since 5.0 or prior since I actually went into depth on this and there are some significant changes for 6.5. The example script draws heavily from other sources and it is now working.

 

Goals are:

  1. Install ESXi, set password,  IP, hostname, etc.
  2. enable shess/ssh
  3. set logfile location
  4. add NIC to vSwitch0
  5. add portgroup(s)
  6. configure VLANs
  7. add vSwitch for iSCSI
  8. set MTU for vSwitch
  9. create vmkernel NICs
  10. set MTU for vmkernel NICs
  11. set failover policy for vmkernel compliant with iSCSI port binding
  12. Enable software iSCSI
  13. Execute port binding
  14. add iSCSI discovery
  15. add NFS 4.1
  16. configure NTP
  17. Set password policy

 

Hope it is useful!

# Accept the VMware End User License Agreement

vmaccepteula

 

 

# Set the root password for the DCUI and ESXi Shell

rootpw P@ssw0rd

 

 

# Install on the first local disk available on machine

install --firstdisk --overwritevmfs

 

 

# Set the network to Static on the first network adapater, use the specified hostname and do not create a portgroup for the VMs

network --bootproto=static --addvmportgroup=true --device=vmnic0 --ip=172.20.100.103 --netmask=255.255.0.0 --gateway=172.20.0.1 --nameserver=172.20.200.10 --hostname=esx103.mydomain.com

 

 

# reboots the host after the scripted installation is completed

reboot

 

%firstboot --interpreter=busybox

 

 

# The following commands MAY BE specific to esxXYZ.mydomain.com. Customize the hostname and IP specific for your installation

# Set the network to static on the first network adapter, specifies network properties, sets hostname, must replace network from above script

 

 

# enable & start remote ESXi Shell  (SSH)

vim-cmd hostsvc/enable_ssh

vim-cmd hostsvc/start_ssh

 

 

# enable & start ESXi Shell (TSM)

vim-cmd hostsvc/enable_esx_shell

vim-cmd hostsvc/start_esx_shell

 

 

# supress ESXi Shell shell warning - from YellowBricks (http://www.yellow-bricks.com/2011/07/21/esxi-5-suppressing-the-localremote-shell-warning/)

esxcli system settings advanced set -o /UserVars/SuppressShellWarning -i 1

 

 

# Set logfile location for ESXi to SAN (volume must exist) (https://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2003322)

esxcli system syslog config set --logdir=/vmfs/volumes/103/host-logfiles/esx103

 

 

# Add an extra nic to vSwitch0 and set as active (vmnic1)

esxcli network vswitch standard uplink add --uplink-name=vmnic1 --vswitch-name=vSwitch0

esxcli network vswitch standard policy failover set --active-uplinks vmnic0,vmnic1 --vswitch-name vSwitch0

 

 

# configure portgroups

esxcli network vswitch standard portgroup add --portgroup-name Production --vswitch-name vSwitch0

esxcli network vswitch standard portgroup set --portgroup-name Production --vlan-id 24

 

 

# Add vSwitch 1

esxcli network vswitch standard add --vswitch-name=vSwitch1

 

 

# Add NIC's to vSwitch1 (vmnic2,vmnic3)

esxcli network vswitch standard uplink add --uplink-name=vmnic4 --vswitch-name=vSwitch1

esxcli network vswitch standard uplink add --uplink-name=vmnic5 --vswitch-name=vSwitch1

esxcli network vswitch standard policy failover set --active-uplinks vmnic4,vmnic5 --vswitch-name vSwitch1

 

 

# configure mtu for vSwitch1

esxcli network vswitch standard set --mtu 9000 --vswitch-name vSwitch1

 

 

# Add iSCSI01 Portgroup to vSwitch1 and create a VMkernel interface

esxcli network vswitch standard portgroup add --portgroup-name=VMkernel-iSCSI01 --vswitch-name=vSwitch1

 

 

# Add a virtual NIC to the Portgroup created in the previous step

esxcli network ip interface add --interface-name=vmk1 --mtu 9000 --portgroup-name=VMkernel-iSCSI01

 

 

# Set the IP address of the iSCSI01 Portgroup to: 10.0.0.XYZ

esxcli network ip interface ipv4 set --interface-name=vmk1 --ipv4=10.0.100.103 --netmask=255.255.0.0 --type=static

 

 

#Set failover policy for iSCSI01 Protgroup so that only one NIC is active

esxcli network vswitch standard portgroup policy failover set --active-uplinks vmnic4 --portgroup-name=VMkernel-iSCSI01

 

 

# Add iSCSI02 Portgroup to vSwitch1 and create a VMkernel interface

esxcli network vswitch standard portgroup add --portgroup-name=VMkernel-iSCSI02 --vswitch-name=vSwitch1

 

 

# Add a virtual NIC to the Portgroup created in the previous step

esxcli network ip interface add --interface-name=vmk2 --mtu 9000 --portgroup-name=VMkernel-iSCSI02

 

 

# Set the IP address of the iSCSI02 Portgroup to: 10.0.0.ABC

esxcli network ip interface ipv4 set --interface-name=vmk2 --ipv4=10.0.100.123 --netmask=255.255.0.0 --type=static

 

 

#Set failover policy for iSCSI01 Portgroup so that only one NIC is active

esxcli network vswitch standard portgroup policy failover set --active-uplinks vmnic5 --portgroup-name=VMkernel-iSCSI02

 

 

# Enable Software iSCSI

esxcli iscsi software set --enabled 1

 

 

#Port Binding

esxcli iscsi networkportal add -A vmhba64 -n vmk1

esxcli iscsi networkportal add -A vmhba64 -n vmk2

 

 

# Add iSCSI SAN

esxcli iscsi adapter discovery sendtarget add --adapter vmhba64 --address=10.0.0.23:3260

esxcli storage core adapter rescan --adapter vmhba64

 

 

#NFS Storage

# esxcli storage nfs41 add -H "172.20.0.97" -s "/var/nfs/" -v "NFS"

 

 

# Add vMotion Portgroup to vSwitch1 and create a VMkernel interface

esxcli network vswitch standard portgroup add --portgroup-name=VMkernel-vMotion --vswitch-name=vSwitch1

 

 

esxcli network ip interface add --interface-name=vmk3 --mtu 9000 --portgroup-name=VMkernel-vMotion

esxcli network ip interface ipv4 set --interface-name=vmk3 --ipv4=10.0.100.143 --netmask=255.255.0.0 --type=static

esxcli network vswitch standard portgroup policy failover set --active-uplinks vmnic4 --standby-uplinks vmnic5 --portgroup-name=VMkernel-vMotion

 

 

# Add FT Portgroup to vSwitch1 and create a VMkernel interface

esxcli network vswitch standard portgroup add --portgroup-name=VMkernel-FT --vswitch-name=vSwitch1

 

 

esxcli network ip interface add --interface-name=vmk4 --mtu 9000 --portgroup-name=VMkernel-FT

esxcli network ip interface ipv4 set --interface-name=vmk4 --ipv4=10.0.100.163 --netmask=255.255.0.0 --type=static

esxcli network vswitch standard portgroup policy failover set --active-uplinks vmnic5 --standby-uplinks vmnic4 --portgroup-name=VMkernel-FT

 

 

 

 

### NTP CONFIGURATIONS ###

cat > /etc/ntp.conf << __NTP_CONFIG__

restrict default kod nomodify notrap noquerynopeer

restrict 127.0.0.1

server 0.us.pool.ntp.org

server 1.us.pool.ntp.org

server 2.us.pool.ntp.org

__NTP_CONFIG__

/sbin/chkconfig --level 345 ntpd on

 

 

### PASSWORD CONFIGURATIONS ###

cat > /etc/pam.d/passwd << __PAM.D_CONFIG__

#%PAM-1.0

 

 

password   requisite    /lib/security/$ISA/pam_passwdqc.so retry=3 min=2,2,2,2,2

password   sufficient   /lib/security/$ISA/pam_unix.so use_authtok nullok shadow sha512

password   required     /lib/security/$ISA/pam_deny.so

__PAM.D_CONFIG__

 

 

# enter maintenance mode

vim-cmd hostsvc/maintenance_mode_enter

 

 

# Needed for configuration changes that could not be performed in esxcli (thanks VMware)

reboot


Re: Enabling EVC and adding a new server.

$
0
0

I see, this is supported. I thought this is with standard general approach like 5.x and 6.x version like you cant add esxi 6.x under vcenter 5.x.

 

You can add esxi 5.5 U3 under vCenter 5.5 U2 but beware if you are going to update new host upto last 5.5 Update 3 b. See notification below.

 

 

5.5 Update 3 has :

 

ESXi 5.5 Update 3b2015-12-083248547N/A
ESXi 5.5 Update 3a2015-10-063116895N/A
ESXi 5.5 Update 32015-09-163029944N/A

 

So you should update it to Update 3 a. Other things are good to proceed.

 

Please consider marking this answer "correct" or "helpful" if you think your query have been answered correctly.

Re: Entitle Users to Desktops or Applicaitons with PowerCli 6.5

$
0
0

Oh this is great. I will test this and judge the performance.

 

I was able to create the script below that works also.

 

invoke-command -computername $connectionserver -scriptblock {        param($vmname, $vmviewPool, $vmuser)               $Username = 'ServiceAccount'        $Password = 'xxxxxxx' | ConvertTo-SecureString -AsPlainText -Force        $Credential = New-Object -TypeName pscredential -ArgumentList $Username,$Password           add-pssnapin vmware.view.broker        Get-Module -ListAvailable VMware* | Import-Module        connect-hvserver localhost -Credential $credential               #add machine to pool        add-hvdesktop -pool $vmviewpool -machines $vmname               #add user to VM In pool        $userresult = get-user -name $vmuser         $usersid = $userresult.sid        $vmresult = get-desktopvm -name $vmname        $vmMachineID = $vmresult.Machine_id        update-userownership -machine_id $vmMachineID -sid $usersid        disconnect-hvserver localhost -confirm:$false
}   -ArgumentList $vmname, $vmviewPool, $vmuser

Re: MS Access 2013 and ActiveX Addin ProgressBar Version 6

Re: VCSA 6.5 Web GUI Error

Re: Build query/alert help: No logs received from given hosts/agents

$
0
0

So there is 2 ways to do this -

 

1. involving a special tag like you requested - create a new VIP (Admin \ Cluster page) and put a tag on the VIP e.g. product = sensitive and configure all the sensitive ( i.e. the ones that you want to be notified on if they stop sending logs) sources to send logs to this vip. So all the logs from these sources will get the tag product=sensitive. Then in Interactive Analytics

Create a query for count of events with a filter on product field with 'contains' operator and value as 'sensitive' . Run the query for last minutes. Now select the red Bell icon on the right and select the option to create alert from query. In the Threshold section select when 'less than' 0 (zero) matches are found in the last '15 mins'  ( you can select the time to be different as desired and also the zero can be 10 or 1000 or another number as desired. Now select the notification option when the alert is triggered e.g email or webhook or vROps and save your alert.

You will now be notified if you do not see events from your sources in the last 15 mins or the time you configured. (Note this will alert if there are no events from any of the sources so if one source stops sending but other are sending this alert will not fire). If you desire to look for a particular source you can create a similar for the one source.

2. The second option is to create 1 alert per log source  - creation of the alert will the same as described above; but you do not need to do the VIP and tag portion of the steps. You query will simply look like

Count of events over time filtered on source ( or you can use hostname if desired I recommend source) contains value '10.11.12.13' and run the query for last 5 mins and then follow the same steps as above by selecting the red bell icon to create the alert.

You should do this separately for each log source that is sensitive and you want to be notified on so that you do not miss it and the alert text will show the exact source that stopped sending logs for you to go fix / troubleshoot it further to address the issue.

This option does create an over head of creating multiple alerts but it will NOT create an email spam if you select your threshold correctly so you do not get notified if no logs are seen really quickly without giving LI a chance to ingest the logs for e.g  if you have 10 vCenters integrated with log insight I would make my threshold to be 30 mins.

 

Hope this helps.

Re: Alerts to vROps are not associated with correct object

$
0
0

I think you need to Edit the alert to modify the fallback object to point to the correct object. The default is the default fall back object and looks like the alert is going to this default object as opposed to the object (VM ) you need.

Re: Alerts to vROps are not associated with correct object

$
0
0

I was hoping and expecting that the integration was intelligent enough to automatically match the object up. That's what the info suggests, anyway. Otherwise, what's the point in a fall back object if the relationship has to be explicitly set on every alert?


Re: Windows 10 IE favorite icons blank

$
0
0

We have also seen this behavior. 

 

Website favicon.ico files are stored in the IE temp cache. 

 

Could you create a new ini setting and target LocalAppData\Microsoft\Windows\INetCache\*.ico ?   or add that as an include to your existing IE ini.

Re: Unable to send Ctrl + Alt + Ins or Guest > Send Ctrl + Alt + Del (Workaround)

Re: bandwidth utilization for Vmware Replication 5.5

vRA 7.3 __asd_catalogRequestID is not being passed

$
0
0

I recently ported over working workflows from vRO 6.2 to 7.3. The ASD form has several embedded global variables as :

__asd_requestedBy and __asd_catalogRequestID. Both are added as input values as empty strings. After launching the workflow I see the variable input for RequestedBy, which is my ID, but the request ID remains empty. Is this global value still used in vra 7.3 and if so, what am I missing?

2017-07-14_9-50-17.gif

Re: VMware 6 and iSCSI with LACP

$
0
0

LLDP is fully activated on needed vmnic, please see below :

 

pic5.png

 

 

The problem seems to be that the iSCSI Software storage doesnt handle LAG group as un object, that I know in VDS 5.5 LACP was handled differently in the web GUI.

Image profile install failing - 2017-07-10T12:40:32Z esxupdate: root: ERROR: StatelessError: The transaction is not supported: Nothing to do for live install - live installation has been disabled.

$
0
0

An image profile install is failing with the message

 

2017-07-10T12:40:32Z esxupdate: root: ERROR: StatelessError: The transaction is not supported: Nothing to do for live install - live installation has been disabled.  

Also in the esxupdate.log I see these messages that may have something to do with the problem

 

 

2017-07-10T12:42:10Z esxupdate: HostImage: INFO: Installer <class 'vmware.esximage.Installer.BootBankInstaller.BootBankInstaller'> was not initiated - reason: bootbank is invalid: /bootbank is not a directory!

 

I see this message too but /locker/packages does in fact exist

 

No such file or directory: '/locker/packages'

2017-07-10T12:42:10Z esxupdate: vmware.runcommand: INFO: runcommand called with: args = '['/sbin/esxcfg-advcfg', '-U', 'host-acceptance-level', '-G']', outfile = 'None', returnoutput = 'True', timeout = '0.0'.

 

2017-07-10T12:47:24Z esxupdate: HostImage: INFO: Installer <class 'vmware.esximage.Installer.LockerInstaller.LockerInstaller'> was not initiated - reason: Failed to create empty Database directory: [Errno 2] No such file or directory: '/locker/packages'

 

 

This image works fine on other servers but is failing on one in particular.  We have tried to run it multiple times and this problem occurs each time. 

 

If anyone has any ideas what I can look at that would be great.  I am going to keep information minimal for now as to not load this post with a bunch of information that may not be relevant.  Please let me know what other details may be needed to move forward.

 

Thank You

Re: Increasing disk size

$
0
0

Hi,

Thank you for reply

In business group, I do have my self as group manager role. In blueprint I do have range limitation set on cpu/memory/storage, and VM is not on highest range. I do not have any custom properties set.


Re: ESXi 6.5 host freezing/crashing when shutting down VM with GPU passthrough

$
0
0

Hi all-- I had a very similar problem with a mixture of AMD and NVIDIA boards on a 6.5 host.  The AMD Radeon 460 vm would (almost)always crash the host when rebooting, but wasn't the only source of problems.  Removing it fixed most but not all of the problem.  Changing /etc/vmware/passthru.map entries DID fix the remainder of the problem and would probably work for the AMD board as well: system is now reliable regarding reboot/shutdown.  Search elsewhere in these forums regarding this fix. Thanks

Re: Edit etc/vmware/config

$
0
0

Did anyone ever figure out how to edit /etc/vmware/config/?!!

Re: Virtual Machine Replication

$
0
0

jreesefields   yes, it needs Vcenter Server. so you can run on standalone Vcenter Server

 

Please let me know if you have any other questions. in a case of no other questions, please mark this answer correct or helpful to close this.

Re: Upgrade vCenter Server from 5.5 to 6.5

$
0
0

Thanks you.   I see all these options but not sure which one to use.

 

Thanks,'-Adam

 

vCenter.jpg

Re: Image profile install failing - 2017-07-10T12:40:32Z esxupdate: root: ERROR: StatelessError: The transaction is not supported: Nothing to do for live install - live installation has been disabled.

Viewing all 230224 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>