Mostrando entradas con la etiqueta VMware. Mostrar todas las entradas
Mostrando entradas con la etiqueta VMware. Mostrar todas las entradas

lunes, 2 de septiembre de 2013

VMWare migrating vm the method is disabled by vm-xxxx


This error appears migrating virtual machine, storage vmotion fails with the error: vmware migrating vm the method is disabled by vm-xxxx, remove from inventory and delete from disk options are grayed out.

This issue occurs because the entries from VPX_DISABLED_METHODS table are not removed after a VM backup.
When a VM backup begins the backup engine informs vcenter to disable Storage vmotion for that VM, ensuring that backup can complete succesfully.

Resolution:

- Schedule another backup of virtual machine, once backup is completed succesfully, entry on VPX_DISABLED_METHODS is automatically removed.

If the preceding resolution doesn't work:

- Remove an re-add the VM from the inventory

Backup your vcenter database first!!!

1.- Poweroff VM
2.- in vSphere Client right-click the VM and click Remove from inventory
3.- Browse the datastore where the VM resides.
4.- Right-click the .vmx file of the VM and click Add to inventory
5.- Poweron the VM and retry de Storage vMotion.

lunes, 18 de junio de 2012

ESX, operaciones con mv desde consola


Desde la consola de ESX se pueden realizar muchas operaciones, puede ser muy útil conocerlas por si es necesario emplearlas en caso de caída de parte de la red o incomunicación del ESX.
Este es un pequeño ejemplo, en la parte inferior hay una lista con todos los comandos disponibles.

Listar las maquinas virtuales de un ESX.

[root@esx02 ~]# vim-cmd vmsvc/getallvms
Vmid      Name                            File                               Guest OS          Version   Annotation
112    TESTFS01     [TEST_DATA_VM01] TESTFS01/TESTFS01.vmx       windows7Server64Guest   vmx-07
128    TESTADDS02   [TEST_DATA_VM02] TESTADDS02/TESTADDS02.vmx   windows7Server64Guest   vmx-07
144    TEST01       [TEST_DATA_VM02] TEST01/TEST01.vmx           windows7Server64Guest   vmx-07
16     TESTADDS01   [TEST_DATA_VM01] TESTADDS01/TESTADDS01.vmx   windows7Server64Guest   vmx-07

Ver los datastores de una maquina virtual.

En este ejemplo usaremos la 112, el ID se obtiene con el comando “getallvms” visto anteriormente.

[root@esx02 ~]# vim-cmd vmsvc/get.datastores 112
name                 TEST_DATA_VM02                                   TEST_DATA_VM01
url                  /vmfs/volumes/4be9552a-45ffcfd3-ac82-e61f1352c977   /vmfs/volumes/4be7e6a0-ceff2d1c-5ec4-e61f1352c977
capacity             2836020592640                                       160792838144
freeSpace            638826053632                                        66992472064
accessible           1                                                   1
type                 VMFS                                                VMFS
multipleHostAccess                                               

Arrancar una maquina virtual.

[root@esx02 ~]# vim-cmd vmsvc/power.on 112

Parar una maquina virtual.

[root@esx02 ~]# vim-cmd vmsvc/power.off 112
               
Lista de comandos disponibles.

[root@esx02 ~]# vim-cmd vmsvc
Commands available under vmsvc/:
acquiremksticket          get.configoption          power.off
connect                   get.datastores            power.on
convert.toTemplate        get.disabledmethods       power.reboot
convert.toVm              get.environment           power.reset
createdummyvm             get.filelayout            power.shutdown
destroy                   get.guest                 power.suspend
device.connection         get.guestheartbeatStatus  reload
device.connusbdev         get.managedentitystatus   setscreenres
device.disconnusbdev      get.networks              snapshot.create
device.diskadd            get.runtime               snapshot.dumpoption
device.diskaddexisting    get.snapshotinfo          snapshot.get
device.diskremove         get.summary               snapshot.remove
device.getdevices         get.tasklist              snapshot.removeall
device.toolsSyncSet       getallvms                 snapshot.revert
device.vmiadd             gethostconstraints        snapshot.setoption
device.vmiremove          login                     tools.cancelinstall
devices.createnic         logout                    tools.install
get.capability            message                   tools.upgrade
get.config                power.getstate            unregister
get.config.cpuidmask      power.hibernate           upgrade

ESX, como cambiar la Ip

Puede que necesitemos en algún momento cambiar la ip de nuestros servidores ESX, por un cambio de direccionamiento de nuestra red, por un movimiento físico...
A continuación describimos los pasos para hacer este cambio de una forma mas o menos rápida.


En primer lugar veremos los switches virtuales y los Portgroup asociados.

[root@esx02 ~]# esxcfg-vswitch -l
[root@esx02 ~]# esxcfg-vswitch -l
Switch Name    Num Ports   Used Ports  Configured Ports  MTU     Uplinks
vSwitch0       32          6           32                1500    vmnic0,vmnic1

  PortGroup Name      VLAN ID  Used Ports  Uplinks
  Servers             10       1           vmnic0,vmnic1
  Service Console 2   5       1           vmnic0,vmnic1
  Service Console 1   5       1           vmnic0,vmnic1


En el ejemplo anterior se puede ver que existe un “virtual switch” vSwitch0 con tres PortGroup Name: “Servers”, “Service Console 1” y “Service Console 2”.

Ahora vamos a ver los interfaces virtuales de los “Service Console”, estos interfaces son los que usa ESX para comunicar con el cluster.

[root@esx02 ~]# esxcfg-vswif -l
Name     Port Group/DVPort   IP Family IP Address          Netmask              Broadcast        Enabled   TYPE
vswif0   Service Console 1   IPv4      10.4.0.100          255.255.255.0        10.4.0.255       true      STATIC
vswif1   Service Console 2   IPv4      10.4.0.101          255.255.255.0        10.4.0.255       true      STATIC


Si hemos cambiado de red y queremos cambiar las ips de los interfaces virtuales.

Ejecutaremos en primer lugar el cambio de ip en los interfaces “vswif0” y “vswif1”.

[root@esx02 ~]# esxcfg-vswif -i 10.5.0.100 -n 255.255.255.0 vswif0
[root@esx02 ~]# esxcfg-vswif -i 10.5.0.101 -n 255.255.255.0 vswif1

A continuación deberemos cambiar la puerta de enlace por la que sale el ESX, ya que hemos cambiado de red. Deberemos cambiar el parámetro GATEWAY del archivo /etc/sysconfig/network.

[root@esx02 ~]# vi /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=esx02.masterd.es
GATEWAY=10.5.0.254
GATEWAYDEV=vswif0
IPV6_AUTOCONF=no
NETWORKING_IPV6=no

Si al cambiar de red, también hemos cambiado de vlan en nuestros switches, también será necesario cambiarlo en la configuración de ESX.

Como se puede ver en el primer comando que hemos ejecutado esxcfg-vswitch –l , para la red de Servers se está usando la VLAN 10, y para la red de las “Service Consoles” se está usando la VLAN 5.
En nuestro ejemplo hemos cambiado la red de las “Service Consoles” a la red 10.5.0.0/24 que pertenecen a la VLAN 50, y la red de “Servers” con nuevo direccionamiento 10.6.0.0/24 que pertenece a la VLAN 52.

PortGroup Name
VLAN
Red
Servers
52
10.6.0.0/24
Service Console 1
50
10.5.0.0/24
Service Console 2
50
10.5.0.0/24

Por lo tanto vamos a proceder a cambiar las VLANs del switch vSwitch0.

[root@esx02 ~]# esxcfg-vswitch vSwitch0 -v 50 -p "Service Console 1"
[root@esx02 ~]# esxcfg-vswitch vSwitch0 -v 50 -p "Service Console 2"
[root@esx02 ~]# esxcfg-vswitch vSwitch0 -v 52 -p "Servers"
[root@esx02 ~]# esxcfg-vswitch -l

Switch Name    Num Ports   Used Ports  Configured Ports  MTU     Uplinks
vSwitch0       32          6           32                1500    vmnic0,vmnic1

  PortGroup Name      VLAN ID  Used Ports  Uplinks
  Servers             52       1           vmnic0,vmnic1
  Service Console 2   50       1           vmnic0,vmnic1
  Service Console 1   50       1           vmnic0,vmnic1