Tag: vmware esxi

  • Delete a disk partition in VMWare ESXI

    To delete a partition in VMWare ESXI, you can use command

    partedUtil
    

    First find out all disks available on your server using command

    ls /vmfs/devices/disks/
    

    On my server, it show following

    [root@ns3048991:~] ls /vmfs/devices/disks/
    t10.ATA_____HGST_HUS726020ALA610____________________N4G3T44Y____________    vml.01000000004e34473354343459202020202020202020202020484753542048
    t10.ATA_____HGST_HUS726020ALA610____________________N4G3T44Y____________:1  vml.01000000004e34473354343459202020202020202020202020484753542048:1
    t10.ATA_____HGST_HUS726020ALA610____________________N4G3T44Y____________:2  vml.01000000004e34473354343459202020202020202020202020484753542048:2
    t10.ATA_____HGST_HUS726020ALA610____________________N4G3T44Y____________:3  vml.01000000004e34473354343459202020202020202020202020484753542048:3
    t10.ATA_____HGST_HUS726020ALA610____________________N4G3T44Y____________:5  vml.01000000004e34473354343459202020202020202020202020484753542048:5
    t10.ATA_____HGST_HUS726020ALA610____________________N4G3T44Y____________:6  vml.01000000004e34473354343459202020202020202020202020484753542048:6
    t10.ATA_____HGST_HUS726020ALA610____________________N4G3T44Y____________:7  vml.01000000004e34473354343459202020202020202020202020484753542048:7
    t10.ATA_____HGST_HUS726020ALA610____________________N4G3T44Y____________:8  vml.01000000004e34473354343459202020202020202020202020484753542048:8
    t10.ATA_____HGST_HUS726020ALA610____________________N4G3T44Y____________:9  vml.01000000004e34473354343459202020202020202020202020484753542048:9
    t10.ATA_____HGST_HUS726020ALA610____________________N4G3TSMY____________    vml.01000000004e34473354534d59202020202020202020202020484753542048
    t10.ATA_____HGST_HUS726020ALA610____________________N4G3TSMY____________:1  vml.01000000004e34473354534d59202020202020202020202020484753542048:1
    [root@ns3048991:~]
    

    I want to delete the partition

    t10.ATA_____HGST_HUS726020ALA610____________________N4G3T44Y____________:3  vml.01000000004e34473354343459202020202020202020202020484753542048:3
    

    To do this, i run

    partedUtil delete "/vmfs/devices/disks/t10.ATA_____HGST_HUS726020ALA610____________________N4G3T44Y____________" 3
    

    Here is help for partedUtil

    [root@ns3048991:~] partedUtil
    Not enough arguments
    
    Usage: 
     Get Partitions : get  
     Set Partitions : set  ["partNum startSector endSector type attr"]* 
     Delete Partition : delete  
     Resize Partition : resize    
     Get Partitions : getptbl  
     Set Partitions : setptbl  
  • VMWare ESXI Commands

    To find vmware version, run

    vmware -l
    vmware -v
    

    Example

    [root@dedi-ams-116581:~] vmware -l 
    VMware ESXi 6.5.0 GA
    [root@dedi-ams-116581:~] vmware -v
    VMware ESXi 6.5.0 build-4887370
    [root@dedi-ams-116581:~] 
    

    To find IP address, run

    [root@dedi-ams-116581:~] hostname -i
    51.15.0.152
    [root@dedi-ams-116581:~] 
    

    See VMWare esxcli

  • Create Virtual Machine in VMware ESXi Server

    To create Virtual Machine, login to VMware ESXi, click on “Create/Register VM” link on top.

    Create VM

    On next page, it ask you to “Select creation type”.

    Select “Create a new virtual machine”. Click next.

    On next page, you need to “Select a name and guest OS”.

    It ask for datastore, select the datastore you need to use for your VM.

    On “Customize settings” page you need to select Virtual Machine CPU/RAM/Disk etc..

    If you need to boot from ISO, set “CD/DVD Drive 1” to “Datastore ISO file”. This will show you datastore browser, you need to select the ISO file you need to install. Make sure you select “Connect at power on” option for VM to boot from ISO file.

    On next screen, it shows information about the virtual machine you are going to create.

    Click “Finish” to create the Virtual Machine.

    Click on “Virtual Machines” link on left side menu, you will see all your Virtual Machines

    Click on the VM to start the Virtual Machine, this will boot the VM from ISO, you can do the installation of Guest OS.

    Posted in vmware

  • Finding Information on VMware ESXi Host

    Finding Information on VMware ESXi Host

    You can run

    esxcfg-info
    

    In VMware ESXi host SSH terminal. You can also see this information by going to URL

    https://SERVER_IP/cgi-bin/esxcfg-info.cgi
    

    This will ask for your user name and password. Normally default user name is root.

    Once you logged in you will see something like

    vmware esxi hardware info

    https://gist.github.com/serverok/b173106275a5d1d593ae73c40b1828c7