Rob van Hamersveld.nl My digital life

15Oct/125

Remote restart ESXi management agents

Today I had a problem with all of our vSphere hosts in my cluster. To resolve the problem I needed to restart the management agents on each host. In the past with ESX there was the service console to which you could connect by using SSH and then execute the restart commands from the CLI. But since ESXi doesn't ship with the service console this is not an option.

The correct method stated in KB 1003490 by VMware is to restart the management agents from the console of the host. Because we have over 15 hosts this is time consuming task so I decided to look for an alternative method, and found it 🙂

First you have to enable 'remote techsupport' (SSH access) to your hosts, this can be done at the configuration tab of your host under the 'security profile';

Click the 'Properties...' link to enable or disable services.

Now highlight the SSH service and click 'Options...'

Click 'Start' to start the SSH service, now you're able to remote connect to your host using SSH.

Now you can restart the management agents by executing the following command

/sbin/services.sh restart

This command will restart the management services, the VMs running on the host are not affected.

When you're done is recommended to disable SSH for security purposes.

30Sep/108

VMware: Move VM to differtent datastore on ESXi standalone host

On many forums and newsgroups people ask how to move a VM to a different datastore within a standalone ESXi host (not managed by vCenter). Today I had to perform this task over at a costumer and wrote a procedure for this task.

The tool I used to copy the VM is Veeam FastSCP, you can download this software for free at http://www.veeam.com/vmware-esxi-fastscp.html

After you have installed Veeam FastSCP follow the steps below to move the VM.

Login using the vSphere client on the ESXi host and power off the VM you want to move to a different datastore. After the VM is powered off you must remove it from the inventory (right click on the VM and select 'Remove from inventory').

Now start FastSCP. First we have to make a connection to the ESXi host, right click at 'Servers' and choose 'Add Server'.

Now follow the wizard to make the connection;

After the connection is made you can unfold the servers datastores and just drag and drop you VM folder into another datastore.

Now the copy process starts;

You can also monitor this in the vSphere client, the copy task will appear in the Recent Task pane;

When the copy process is finished you can add the VM back to the inventory by using the datastore browser within the vSphere client. Browse the destination datastore;

Now open the VM folder and right click the <VMNAME>.vmx file. Click here on 'Add to inventory'.

Follow the steps in the wizard and the VM will be visible in the inventory.

Now the VM is back in the inventory we have to start it for the first time. When you power on the VM it will notice that he is on a different datastore. Answer the question by selecting 'I _copied it' and click 'OK'. The VM will now start.

The only task that's left is to delete the VM folder on the source datastore, for this task you can use the Datastore browser again.

[ad#postad]

Tagged as: , 8 Comments