Archive for the ‘vmware’ Category.

Convertire un disco IDE in SCSI in una macchina virtuale VmWare

Può capitare, sopratutto usando il Vmware Converter, oppure durate la creazione di una macchina virtuale, di creare il disco fisso C: venga creato in modo IDE invece che SCSI.

Questo porta due svantaggi: primo che il formato IDE è più lento, poi che il formato IDE non è incrementabile di dimensioni.

Essendomi trovato a corto di spazio su una macchina in queste condizioni ho usato questo trucchetto trovato sull KB di vmware:

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1016192

Tenete presente una cosa, il boot della macchina segue la catena scsi, nella mia macchina avevo due disco: il disco C: che era IDE e il disco D: che era SCSI 0:0, dopo la conversione il disco C: mi viene allocato come SCSI 0:1 e quindi la vm cerca di partire dal disco D:

Poco male, sposto il D: in SCSI 0:2, il C: da SCSI 0:1 a SCSI 0:0 e il D: da SCSI 0:2 a SCSI 0:1 e il tutto riparte.

Riporto qui sotto che non si sa mai, io, inoltre, per semplificarmi la vita prima di tutto il lavoro, elimino il cdrom dalla macchina virtuale, poi lo rimetto dopo aver completato la procedura:

 

To convert the IDE disk to SCSI:

Locate the datastore path where the virtual machine resides.

For example:

# cd /vmfs/volumes///

From the ESX Service Console, open the primary disk (.vmdk) using the vi editor. For more information, see Editing files on an ESX host using vi or nano (1020302)
Look for the line:

ddb.adapterType = “ide”

To change the adapter type to LSI Logic change the line to:

ddb.adapterType = “lsilogic”

To change the adapter type to Bus Logic change the line to:

ddb.adapterType = “buslogic”

Save the file.
From VMware Infrastructure/vSphere Client:
Click Edit Settings for the virtual machine.
Select the IDE virtual disk.
Choose to Remove the Disk from the virtual machine.
Click OK.

Caution: Make sure that you do not choose Remove from disk.

From the Edit Settings menu for this virtual machine:
Click Add > Hard Disk > Use Existing Virtual Disk.
Navigate to the location of the disk and select to add it into the virtual machine.
Choose the same controller as in Step 3 as the adapter type. The SCSI ID should read SCSI 0:0.

If a CDROM device exists in the virtual machine it may need to have the IDE channel adjusted from IDE 0:1 to IDE 0:0. If this option is greyed out, remove the CD-ROM from the virtual machine and add it back. This sets it to IDE 0:0.

Converting a virtual IDE disk to a virtual SCSI disk

To convert the IDE disk to SCSI:

  1. Locate the datastore path where the virtual machine resides.For example:# cd /vmfs/volumes/<datastore_name>/<vm_name>/
  2. From the ESX Service Console, open the primary disk (.vmdk) using the vi editor. For more information, see  Editing files on an ESX host using vi or nano (1020302)
  3. Look for the line:ddb.adapterType = “ide”
  4. To change the adapter type to LSI Logic change the line to:ddb.adapterType = “lsilogic”To change the adapter type to Bus Logic change the line to:ddb.adapterType = “buslogic”
  5. Save the file.
  6. From VMware Infrastructure/vSphere Client:
    1. Click Edit Settings for the virtual machine.
    2. Select the IDE virtual disk.
    3. Choose to Remove the Disk from the virtual machine.
    4. Click OK.Caution: Make sure that you do not choose Remove from disk.
  7. From the Edit Settingsmenu for this virtual machine:
    1. Click Add > Hard Disk > Use Existing Virtual Disk.
    2. Navigate to the location of the disk and select to add it into the virtual machine.
    3. Choose the same controller as in Step 3 as the adapter type. The SCSI ID should read SCSI 0:0.
  8. If a CDROM device exists in the virtual machine it may need to have the IDE channel adjusted from IDE 0:1 to IDE 0:0. If this option is greyed out, remove the CD-ROM from the virtual machine and add it back. This sets it to IDE 0:0.

Fonte: http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1016192

Oppure usare il vmware converter

Devo provare su una macchina, poi vi faccio sapere…

.

.

——————

Vmtools su ubuntu 10.10 virtuale

apt-get install –no-install-recommends open-vm-dkms
apt-get install open-vm-tools

e il gioco è fatto

Problemi di orario su ESX 3.5x

Una delle tre lame del Blade Center di Milano con ESX 3.5 ogni tanto saltava di un paio d’ore avanti o indietro, da sola, e si porta dietro gli orari delle vm che ospita, e ovviamente Active Directory ed Exchange si arrabbiano parecchio.

Andando a controllare mi sono accorto che sulle lame erano impostati degli NTP server non utilizzabili, e li ho sistemati, sulle prime due nessun problema, sulla terza, l’ultima ad essere installata in ordine di tempo non mi prendeva il cambio di NTP server e se ne usciva con un laconico “Failed to change host configuration”.

Seguendo questa guida, senza dover riavviare la lama e le vm ospitate si sistema tutto

http://kb.vmware.com/selfservice/……

Ribadisco: togliete il riavvio e lo shutdown automatico delle VM dalla lama prima di procedere, altrimenti il riavvio del servizio farà riavviare anche le macchine contenute nella lama

VmWare server 2.02 su Ubuntu 10.10

Con questa guida:

http://risesecurity.org/2010/04/02/vmware-server-2-0-2-update-patch-2/

Si trovano le patch ed il modo di applicarle per far girare vmware server 2.0.2-203138.x86_64 sulla nuova ubuntu server 10.10.

in pratica si deve unzippare il vmware 2.02, andare nella cartella

vmware-server-distrib/lib/modules/source/

untarrare i 4 file che ci sono dentro, tornare in

vmware-server-distrib

applicare la patch

patch -p1 < VMware-server-2.0.2-203138-update-2.patch

ritrornare in

vmware-server-distrib/lib/modules/source/

e ricreare i tar, poi si può lanciare il setup di vmware server come sempre.

Se quando leggerete questo articolo la apatch non fosse disponibile potete scaricarla da qui

http://spippolazione.interfree.it/VMware-server-2.0.2-203138-update-2.patch

Ovviamente PRIMA si devono installare i soliti:

apt-get install ia32-libs make build-essential psmisc gcc-4.1 linux-headers-$(uname -r) linux-source

export CC=/usr/bin/gcc-4.1

Durante il setup l’installazione non dovesse trovatva gli header del kernel, che invce erano presenti, questo problema si risolve cosi:

cd /lib/modules/$(uname -r)/build/include/linux

ln -s ../generated/utsrelease.h

ln -s ../generated/autoconf.h

e si rilancia il setup.

Colgo l’occasione per dire una prece per il Vmware Server 2, software ormai dismesso, fidato amico di tante macchine virtuali, purtroppo abbandonato dalla casa produttrice e sostituito dalla nuova versione ESXi, anch’essa gratuita ma un poco più sofisticata in quanto necessita di un hardware più specifico.

Per chi vuole usare VmWare sui pc di casa deve comprare per qualche decina di euro la versione Workstation oppure usare il gratuito player.

Per quello che riguarda ESXi ho un serverotto IBM ancora imballato sul quale proverò a montarla. forse proprio domani :-)

Vlan id sulle schede di rete virtuali

Nel vshpere clinet abilitare la modalità promiscua delle schede di rete, che è una cosa che, nonostante riguardi le schede dei computer, mi ha sempra saputo di roba sessuale :-)

Poi:

ip link set eth1 up

ip link add link eth1 name vlan6 type vlan id 6
ip link set vlan6 up

ip link add link eth1 name vlan22 type vlan id 22
ip link set vlan22 up

ip link add link eth1 name vlan23 type vlan id 23
ip link set vlan23 up

bla bla bla

fino ad un massimo di 10 schede virtuali per ogni interfaccia fisica.