Showing posts with label VMware Esxi. Show all posts
Showing posts with label VMware Esxi. Show all posts

Tuesday, March 25, 2014

Enabling SSH for non-root users in ESXi fails with the error: Access denied

To enable SSH access for non-root users:
 
Create a user account on the ESXi host using one of these options:

  • Create a user account using the vSphere Client.

    Using the vSphere Client:
  1. Connect to the host directly using the vSphere Client with root credentials.
  2. Click the Local Users & Groups tab.
  3. Right-click anywhere in the tab, then click Add.
  4. Enter a log in name and password.
  5. Click OK.

  • Click the Permissions tab.
  • Right-click Add Permission then click Add.
  • Select the newly created local user from the list and click Add.
  • Assign the Administrator role to the user then click OK. 

  • Move / Delete esxi 5.5 vmkdump folder / files in datastore

    When you upgrade to ESXi 5.5,the vmkdump folder may appear in some datastore.
    Though this folder was Locked after ESXi host booting,you can still unlock it using ssh command.
    Check .dumpfile:
    ssh cmd
    esxcli system coredump file get
    
    Deactivate(unlock) .dumpfile:
    ssh cmd
    esxcli system coredump file remove --force
    
    Now you can move vmkdump folder.
    If the vmkdump folder (with .dumpfile) was moved to other datastore,you could reactivate it.
    Reactivate .dumpfile:
    ssh cmd
    esxcli system coredump file set --smart --enable true
    

    Wednesday, September 25, 2013

    如何打开 Vmware Esxi 已经存在的虚拟机

    第一步,利用VMware vSphere Client登陆Esxi SERVER

    第二步,点击"configuration"----"storage(scsi,san,nfs)----右击虚拟机所在的存储,右键点击"browser datastore",

    第三步,点击了"browse datastore"之后就进入了存储虚拟机的数据中心,然后找到需要添加的虚拟机,找到需要添加的虚拟机的*.vmx文件,然后点"add to inventory"即可.

    Monday, December 17, 2012

    Convert VM from VM Workstation to ESX / ESXi


    Importing and exporting virtual machine from a VMWare ESX Server host requires converting that virtual machine’s .vmdk file(s) from one format to another.
    Although the underlying technologies work the same, the formatting of the VMDKs differ.
    You have 2 options:
    1) If you have a running copy of workstation, simply use VMware Converter as you would for any normal conversion, treating the VM as you normally would a physical host in a P2V
    2) If you have no working Workstation, you can clone / convert the vmdk at the command line – as I have a fully ESXi lab to play in, I don’t have Workstation running on any machines in my office – as such, when IBM recently supplied a VM for a demo . . that had been created on VM workstation, I had to import it. I used the following process.
    Firstly, get hold of an SSH tool ( I use putty)
    Next, open a connection to any host that has the storage containing the vmdk presented
    In ESX / ESXi, this will be in /vmfs/volumes/
    Note: the destination path /dest/folder/vmserver1.vmdk should not contain any existing files with the name ‘vmserver1.vmdk’. If it does the file will be overwritten.
    Importing Virtual Disks from GSX Server and Workstation to ESX Server
    Before an ESX Server can run a virtual machine created on a different version of VMWare, the virtual disks must first be converted to a format that can be read by the VMFS file system. This is done by running the following vmkfstools command:
    vmkfstools -i /.vmdk :.dsk
    is the name of the folder from which you are importing from
    is the name of the virtual machine file(s) to be imported
    is the name of the VMFS partition you are importing to
    An example of a complete command would be:
    vmkfstools -i /vmfs/volumes/CLRLAB001T1/vmserver1.vmdk /vmfs/volumes/CLRLAB001T1/vmserver1_new.vmdk
    Additional information regarding the vmkfstools command can be found in the ESX Server documentation.

    Monday, August 20, 2012

    通过*.vmdk 恢复Esxi虚拟机文件

    以下是vmware 恢复详细步骤:
    1.用ssh 登入ESX 主机或者用显示器登入主机
    2.进入.vmdk 文件的目录  一般目录如下:
    cd /vmfs/volumes/myvmfsvolume/mydir
    3.查看当前vmdk 文件的大小。命令如下:
    # ls -l vmdisk0-flat.vmdk
    -rw------- 1 root root 4294967296 Oct 11 12:30 vmdisk0-flat.vmdk

    4.使用vmkfstool 创建新的虚拟磁盘
    # vmkfstools -c 4294967296 -a lsilogic -d thin temp.vmdk
    5.默认会生成两个文件,删除temp-flat.vmdk 文件
    # rm temp-flat.vmdk
    6.把新产生的vmdk文件,重命名为原来的文件。如下,假设我的虚拟文件为vmdisk0.vmdk
    # mv temp.vmdk vmdisk0.vmdk
    7.编辑新产生的文件,如:vmdisk0.vmdk 注意,我标注的颜色的地方需要修改。
    # Disk DescriptorFile
    version=1
    CID=fb183c20
    parentCID=ffffffff
    createType="vmfs"
    # Extent description
    RW 8388608 VMFS "vmdisk0-flat.vmdk"# The Disk Data Base
    #DDB
    ddb.virtualHWVersion = "4"
    ddb.geometry.cylinders = "522"
    ddb.geometry.heads = "255"
    ddb.geometry.sectors = "63"
    ddb.adapterType = "lsilogic"
    ddb.thinProvisioned = "1"
    下面链接是vmware 官方网的解释:
    http://kb.vmware.com/selfservice/microsites/search.do?cmd=displayKC&externalId=1002511

    Saturday, June 30, 2012

    VMware Esxi 5 如何添加/激活注册码


    connect via vShpere Client->xxx (the VM ip)-->Configuration(tab)
    -->Software-->Licensed Features-->Edit(right top)-->
    Assign a new license key to this host -->Enter Key....

    费我好几分钟去找。不知道是不是Vmware故意迷惑你让你以为Esxi要花钱

    VMware Esxi 5 adding a virtual machine to the inventory 导入旧的VM


    You can register a virtual machine in vCenter Server / VirtualCenter or from a command line.
     
    To register a virtual machine in vCenter Server:
    1. Open the vSphere / VMware Infrastructure (VI) Client and log in with appropriate credentials.
    2. If connecting to vCenter Server, click on the desired host.
    3. Click the Configuration tab.
    4. Click Storage.
    5. Right-click on the appropriate datastore and click Browse Datastore.
    6. Navigate to the folder named after the virtual machine, and locate the .vmx file. 
    7. Right-click the .vmx file and click Add to inventory. The Add to Inventory wizard opens. 
    8. Continue to follow the wizard to add the virtual machine.
    To register a virtual machine from a command line:
    1. Log in as root to the ESX host with an SSH client.
    2. Run the command:
      # vmware-cmd -s register \.vmx
    To register a virtual machine from a command line on an ESXi host:
    1. Log in as root to the ESXi host with an SSH client. For information on using Tech Support mode, see Using Tech Support Mode in ESXi 4.1 (1017910).
    2. Run the command:

      # vim-cmd solo/registervm /vmfs/volumes/datastore_name/VM_directory/VM_name.vmx