quarta-feira, 25 de setembro de 2013

Corrigindo erro 10061 do MySQL

Olá,

Estou fazendo alguns testes com o Ubuntu Server e a após a instalação do MySQL recebi o erro 10061 ao tentar conectar através de uma ferramenta de gerenciamento, segue a dica para resolver.

1) Edite o arquivo /etc/mysql/my.cnf

2) Localize a linha:

bind-address = 127.0.0.1
Troque pelo IP na rede interna, ou externa, dependendo de onde você quer o acesso:
bind-address = SeuIP

3) Salve o arquivo

4) Reinicie o servidor
sudo service mysql restart

quarta-feira, 14 de novembro de 2012

Armazenar em variável a data do dia anterior

Olá,

Estava pesquisando como armazenar em uma variável a data do dia anterior, encontrei o link abaixo com ótimas dicas:

http://www.cyberciti.biz/tips/linux-unix-get-yesterdays-tomorrows-date.html

http://www.cyberciti.biz/faq/linux-unix-formatting-dates-for-display/

O meu problema foi resolvido com a sintaxe abaixo:

dia=$(date --date="yesterday" +"%d-%m-%Y")

Ou seja, se eu quiser criar uma pasta com a data do dia anterior basta eu fazer um script conforme abaixo:


#######################################
dia=$(date --date="yesterday" +"%d-%m-%Y")
mkdir /root/diego.$dia
#######################################

Abraços

quinta-feira, 18 de outubro de 2012

Criando um NFS share no Windows para usar no ESXi

Pessoal,

Segue os links dos vídeos mostrando passo a passo como configurar um compartilhamento NFS no Windows 2003 para ser usado no VMware, um uso prático para isso seria um local para armazenamento de ISOs, templates e até backups rápidos.

Parte 1: http://www.youtube.com/watch?v=s9JVwXw102E&noredirect=1
Parte 2: http://www.youtube.com/watch?v=dCXYS7uCYDY&feature=relmfu
Parte 3: http://www.youtube.com/watch?v=pN1UZF_C120&feature=relmfu

Abraços

Pass-Through devices no VMware

Olá,

Segue um material de configuração de Pass-Through no VMware, testei na versão 4.1 e funcionou legal.


1- Adding a tape Library/Tape drive utilizing VMDirectPath (Make sure your hardware & software setup meet VMDirectPath before you proceed with this method)

Note: The below steps has been obtained from VMware KB Article: 1010789
:

About VMDirectPath I/O pass-through devices

You can connect up to two passthrough devices to a virtual machine. When selecting the devices, keep in mind these restrictions:
  • Devices cannot be plugged in after a PCI Bridge.
  • You cannot have two devices in two different contexts (for example, one used by VMkernel and one in pass-through) using the same PCI slot. For example, the dual head NIC is dedicated to the VMkernel OR is available for pass-through. If you select one, the other is automatically selected as well. A dialog informs you why this occurred.
::

Configuring pass-through devices

To configure pass-through devices on an ESX host:
  1. Select an ESX host from the Inventory panel of VMware Infrastructure (VI) Client.
  2. On the Configuration tab, click Advanced Settings. The Pass-through Configurationpage lists all available pass-through devices.Note: A green icon indicates that a device is enabled and active. An orange icon indicates that the state of the device has changed and the host must be rebooted before the device can be used.
  3. Click Edit.
  4. Select the devices and click OK.Note: If you have a chipset with VT-d, when you clickAdvanced Settings in VI Client, you can select what devices are dedicated to the VMDirectPath I/O.
  5. When the devices are selected, they are marked with an orange icon. Reboot for the change to take effect. After rebooting, the devices are marked with a green icon and are enabled.Note: The configuration changes are saved in the /etc/vmware/esx.conf file. The parent PCI bridge, and if two devices are under the same PCI bridge, only one entry is recorded.The PCI slot number where the device was connected is 00:0b:0. It is recorded as:/device/000:11.0/owner = “passthru”Note: 0b is 11 in decimal.
To configure a PCI device on a virtual machine:
  1. From the Inventory in VI Client, right-click the virtual machine and choose Edit Settings.
  2. Click the Hardware tab.
  3. Click Add.
  4. Choose the PCI Device.
  5. Click Next.

    Note:
     When the device is assigned, the virtual machine must have a memory reservation for the full configured memory size.
:

2- Adding a Tape Library/Drive as a SCSI device to the VM running on ESX/ESXi.

The below instruction are coming from VMware KB Article: 1016407.
To configure a tape device with a virtual machine in ESX 4.0 and ESX 4.1:
  1. Consult your backup hardware and software vendor to ensure that your tape device and backup software are supported to work with VMware ESX 4.0 and ESX 4.1. For more information, see the Additional Information section in this article.
  2. Configure the tape device and controller according to the hardware vendor’s guidelines.
  3. Connect VMware vSphere Client to the VMware vCenter Server or VMware ESX host.
  4. Click on the VMware ESX host which has the hardware connected.
  5. Click Configuration tab > Storage Adapters.
  6. On the Storage Adapters list, identify the controller which has the tape attached.
  7. Under Details, record the Runtime Name of the tape device. For example, vmhba2:C0:T1:L0.
  8. Select the virtual machine that will use the tape device, and click Summary tab > Edit Settings….
  9. Click the Hardware tab > Add….
  10. Select SCSI Device from the list of device types and click Next.
  11. Select the appropriate device from the SCSI Device drop down list.
  12. Select the Virtual Device Node which matches the Adapter and Target of the Runtime Name of the device, as recorded in step 6. The Virtual Device Nodes are denoted as:. For example, the Runtime Name vmhba2:C0:T1:L0 corresponds with a Virtual Device Node of (1:1), (2:1), or (3:1).Note: For more information about theRuntime Name, see Identifying disks when working with VMware ESX (1014953).Warning: For clarification, (0:1) is also available for configuration. However this bus is usually already populated by a virtual disk in a typical virtual machine setup. As tape operations by nature are quite disruptive for devices on the same bus, to avoid interruption, ensure the tape devices’ target IDs are on a separate bus from the other virtual machine disks attached to the virtual machine. For example, bus (0:x) can have several virtual machine disks, while bus (1:x) has the tape pass-through device(s).
  13. Proceed to install and configure the backup software according to the software vendor’s guidelines.

:

Additional Information

The functionality of the tape library and the backup software in conjunction with VMware ESX is partner-supported. VMware assumes that the third party vendor has completed necessary validation to support this configuration in a production environment.
In the event that a problem is found, VMware recommends opening a support request directly with the third-party or partner vendor’s support organization. VMware collaborates with other vendors via Technical Support Alliance Network (TSANet) or Cooperative Support Agreement (CSA).
For more information regarding third party vendor support, see Third Party Hardware and Software Support Policy.
:
Note:
  • As of vSphere 4.0, ESX only supports connectivity to parallel SCSI tape libraries.
  • VMware only supports the attaching of Parallel SCSI based tape Devices to an Adaptec SCSI Controller, see Page 20 of the Virtual Machine Backup Guide for further information
:
Now, you ask which method shall I use. If your hardware & software configuration is supported by VMDirectPath, then I would check with the tape library vendor on which method to use, else you are stuck with the attaching directly to SCSI method. Remember the support statement here highly depend on your tape library vendor, so consult your vendor before implementing it.
At the end, I would still say if you can avoid attaching a tape library to a virtual VM then by all mean just avoid it as it will make your life much easier beside there is many other good methods for backing up VMs that does not require it (Ex: vStorage API)
Referências: 

Cannot initialize SFTP protocol. Is the host running a SFTP server?

Olá,

Hoje ao tentar acessar o meu servidor ESXi através do programa winSCP recebi a seguinte mensagem de erro:

Cannot initialize SFTP protocol. Is the host running a SFTP server?

Pesquisei e descobri que por padrão no ESXi 4.x não está habilitado o protocolo SFTP,  para conectar altere o tipo do protocolo para SCP.


Encontrei um vídeo no youtube mostrando como habilitar o protocolo SFTP, o link é http://www.youtube.com/watch?v=2KimI4DEJU8

Abraços