esxi.md (1587B)
1 # esxi 2 3 ## list vms 4 ``` 5 esxcli vm process list 6 ``` 7 8 ``` 9 vim-cmd vmsvc/getallvms 10 ``` 11 12 ## create vm 13 [steps taken from here](#ref#2) 14 15 1. create vm folder 16 ``` 17 mkdir /vmfs/volumes/datastore1/hostname/ 18 ``` 19 20 2. create hard disk 21 ``` 22 vmkfstools -c 32G -a lsilogic hostname.vmdk 23 ``` 24 * `-c` - createvirtualdisk 25 * `-a` - adaptertype [buslogic|lsilogic|ide|lsisas|pvscsi] 26 * `-d` - diskformat [zeroedthick|thin|eagerzeroedthick] 27 28 3. create hostname.vmx file with following ([ref 3](#ref#3) for info on vmx files) 29 ``` 30 config.version = "8" 31 virtualHW.version= "7" 32 guestOS = "winnetenterprise-64" 33 memsize = "1024" 34 displayname = "VirtualCenter" 35 scsi0.present = "TRUE" 36 scsi0.virtualDev = "lsilogic" 37 scsi0:0.present = "TRUE" 38 scsi0:0.fileName = "VirtualCenter.vmdk" 39 ide1:0.present = "true" 40 ide1:0.deviceType = "cdrom-image" 41 ide1:0.filename = "/vmfs/volumes/4a68046d-2159a120-ebac-001a9253e68f/win2k3_x64.iso" 42 ide1:0.startConnected = "TRUE" 43 ethernet0.present= "true" 44 ethernet0.startConnected = "true" 45 ethernet0.virtualDev = "e1000" 46 ``` 47 48 4. change permissions on vmx file 49 ``` 50 chmod 744 hostname.vmx 51 ``` 52 53 5. add vm to inventory 54 ``` 55 vim-cmd solo/registervm /vmfs/volumes/datastore/hostname/hostname.vmx hostname 56 ``` 57 58 ## ref 59 - :1: https://pubs.vmware.com/vsphere-51/index.jsp?topic=%2Fcom.vmware.vsphere.solutions.doc%2FGUID-0A264828-3933-4F4F-82D7-B5006A90CDBA.html 60 - :2: http://vm-help.com/esx40i/manage_without_VI_client_1.php 61 - :3: http://sanbarrow.com/vmx.html