Newsgroup: it.comp.os.linux.sys
Titolo: vmware-server mi spegne le vm?

Stamattina la vm era magicamente spenta, sto guardando i log ed ecco qui 
la parte incriminata:
Jan 11 20:13:36: app| SP: New user session for user: root, pos: 0
Jan 11 20:13:36: app| The vm-list file has changed! Reloading the list 
of registered vms
Jan 11 20:14:11: app| SP: Retrieved username: root
Jan 11 20:15:08: app| vmdbPipe_Streams Couldn't read: OVL_STATUS_EOF
Jan 11 20:15:08: app| SP: Deleting user session: 0 username: root
Jan 11 20:15:08: app| vmdbPipe_Streams Couldn't read: OVL_STATUS_EOF
Jan 11 20:15:08: app| VMHS: Connection to VM broken: cfg: 
/var/lib/vmware/Virtual Machines/Win 2000 (new york sever)/Win 2000 (new 
york sever).vmx; error: Pipe: Read failed; state: 3
Jan 11 20:15:08: app| VMServerd IPC closed the connection with thread 
/var/lib/vmware/Virtual Machines/Win 2000 (new york sever)/Win 2000 (new 
york sever).vmx (0x831b020)
Jan 11 20:15:08: app| Lost connection to /var/lib/vmware/Virtual 
Machines/Win 2000 (new york sever)/Win 2000 (new york sever).vmx 
(/var/lib/vmware/Virtual Machines/Win 2000 (new york sever)/Win 2000 
(new york sever).vmx) unexpectedly.
Jan 11 20:15:08: app| VM suddenly changed state: poweredOff.
Ieri sera mi ero collegato a quell'ora e si è spenta da sola subito 
dopo, cosa potrei aver fatto di così malvagio? Mi ci sono solo collegato 
e poi sono uscito dal programma client.
Il vmx incriminato è queesto
-rwxr-xr-x 1 root root       1149 2008-01-12 08:42 Win 2000 (new york 
sever).vmx
Ha qualcosa di male?

andrea ha scritto:

Stavo tentando di scrivere una conf per monit per controllare che vmware 
server e la macchina virtuale stiano sempre up, ma, incredibile, non 
trovo da nessuna parte il file .pid, nè dove fisicamente sia nè dove 
dovrebbe essere (nella conf).
# ls /var/run/vmware/
%2Fvar%2Flib%2Fvmware%2FVirtual%20Machines%2FWin%202000%20%28new%20york%20sever%29%2FWin%202000%20%28new%20york%20sever%29%2Evmx
root
serverd-rendezvous
vmware%2Dserverd
e poi
#ls /var/run/vmware/vmware%2Dserverd
fsserver-fd  server-fd         server-vmdb-fd     vmx-fd
nfc-fd       server-vcvmdb-fd  server-vmxvmdb-fd
(che sono tutti file)
Poi questo:
check process vmware-serverd with pidfile /var/run/vmware/vmware-serverd.pid
         group newyork
         start program "/etc/init.d/vmware start"
         stop program "/etc/init.d/vmware stop"
         if 5 restarts within 5 cycles then timeout
check host newyork with address newyork
         group newyork
         depends on vmware-serverd
         if failed icmp type echo count 5 with timeout 15 seconds
                 then alert
         if failed port 5900 with timeout 10 seconds
                 then alert
Dovrebbe andare ma ho bisogno del file pid...

 Dovrebbe andare ma ho bisogno del file pid...
Se ti serve solo avere il pid file del servizio vmware, e' molto probabile
che devi scriverti un wrapper che: a) faccia partire/fermi/riavvi vmware b)
si scriva il PID da qualche parte. Se invece vuoi il pid della macchina
virtuale (dico cosi' con abuso di linguaggio, probabilmente ti serve il pid
del vmware-vmx che gestisce la macchina virtuale, sempre ammesso che la
corrispondenza tra macchine virtuali ed esecutori sia semplice) a naso penso
che devi andare a vedere la API di VMware per scoprire come scoprire quello
che ti serve. Hai provato sul forum di VMware?
-- 
Per rispondermi, sostituisci a nomecognome il mio nome e cognome
To reply me, substitute nomecognome with my real name and surname
http://bitsandchaos.wordpress.com

 
Ok grazie, poi ho trovato
vmware-cmd /home/calzitex/virtual/Ubuntu/Ubuntu.vmx getpid
getpid() = 10526
Automatizzerň io la faccenda in qualche maniera, usando vmware-cmd per 
ritirar su la macchina virtuale in caso vada giů.
Il fatto č che mi serve il pid da mettere nella conf di monit, non so se 
me lo prende dandogli un comando di qualche tipo..
Uso lo script di avvio scritto da loro, ma gli faceva fatica mettere un 
pid da qualche parte?

 pid da qualche parte?
Non si puň mai stare tranquilli, stavo facendo altre cose e vmware pensa 
bene di chiudermi tutte le vm, ma che diavolo gli prende?
Jan 25 01:15:38: app| vmdbPipe_Streams Couldn't read: OVL_STATUS_EOF
Jan 25 01:15:38: app| SP: Deleting user session: 0 username: rootJan 25 
01:15:38: app| vmdbPipe_Streams Couldn't read: OVL_STATUS_EOF
Jan 25 01:15:38: app| VMHS: Connection to VM broken: cfg: 
/home/""/virtual/Ubuntu/Ubuntu.vmx; error: Pipe: Read failed; state: 
3Jan 25 01:15:38: app| vmdbPipe_Streams Couldn't read: OVL_STATUS_EOF
Jan 25 01:15:38: app| VMServerd IPC closed the connection with thread 
/home/""/virtual/SUSE Linux/SUSE Linux.vmx (0x831b020)
Jan 25 01:15:38: app| Lost connection to /home/""/virtual/SUSE 
Linux/SUSE Linux.vmx (/home/""/virtual/SUSE Linux/SUSE Linux.v
mx) unexpectedly.
Jan 25 01:15:38: app| vmdbPipe_Streams Couldn't read: OVL_STATUS_EOF
Jan 25 01:15:38: app| VMServerd IPC closed the connection with thread 
/home/""/virtual/Win 2000 (new york sever)/Win 2000 (new york
  sever).vmx (0x831b09c)
Jan 25 01:15:38: app| Lost connection to /home/""/virtual/Win 2000 (new 
york sever)/Win 2000 (new york sever).vmx (/home/""/v
irtual/Win 2000 (new york sever)/Win 2000 (new york sever).vmx) 
unexpectedly.
Jan 25 01:15:38: app| VMServerd IPC closed the connection with thread 
/home/""/virtual/Ubuntu/Ubuntu.vmx (0x831b118)
Jan 25 01:15:38: app| Lost connection to 
/home/""/virtual/Ubuntu/Ubuntu.vmx (/home/""/virtual/Ubuntu/Ubuntu.vmx) 
unexpectedly
.
Jan 25 01:15:38: app| VM suddenly changed state: poweredOff.
Jan 25 01:15:38: app| VM suddenly changed state: poweredOff.
Jan 25 01:15:38: app| VM suddenly changed state: poweredOff.
Jan 25 01:15:38: app| VMHS: Connection to VM broken: cfg: 
/home/virtual/SUSE Linux/SUSE Linux.vmx; error: Pipe: Read failed; sta
te: 3
Jan 25 01:15:38: app| VMHS: Connection to VM broken: cfg: 
/home/virtual/Win 2000 (new york sever)/Win 2000 (new york sever).vmx;
  error: Pipe: Read failed; state: 3
Jan 25 01:15:38: app| VM suddenly changed state: poweredOff.
Jan 25 01:15:38: app| VM suddenly changed state: poweredOff.Jan 25 
01:15:38: app| VM suddenly changed state: poweredOff.
Jan 25 01:15:38: app| VM suddenly changed state: poweredOff.
Jan 25 01:15:38: app| VM suddenly changed state: poweredOff.
Jan 25 01:15:38: app| VM suddenly changed state: poweredOff.
Jan 25 01:16:17: app| New connection on socket server-vmdb from host 
localhost (ip address: local) , user: root
Jan 25 01:16:17: app| SP: New user session for user: root, pos: 0
Jan 25 01:16:17: app| The vm-list file has changed! Reloading the list 
of registered vms
Jan 25 01:16:17: app| Failed to lookup owner for: 
/var/lib/vmware/Virtual Machines/Win 2000 (new york sever)/Win 2000 (new 
york sever).vm
x. Reason: No such file or directory
Jan 25 01:16:17: app| Could not get canonical path for 
/var/lib/vmware/Virtual Machines/Win 2000 (new york sever)/Win 2000 (new 
york seve
r).vmx: No such file or directory
Jan 25 01:16:17: app| Error Adding vm: /var/lib/vmware/Virtual 
Machines/Win 2000 (new york sever)/Win 2000 (new york sever).vmx
Jan 25 01:16:17: app| Failed to lookup owner for: 
/var/lib/vmware/Virtual Machines/Ubuntu/Ubuntu.vmx. Reason: No such file 
or directory
Jan 25 01:16:17: app| Could not get canonical path for 
/var/lib/vmware/Virtual Machines/Ubuntu/Ubuntu.vmx: No such file or 
directory
Jan 25 01:16:17: app| Error Adding vm: /var/lib/vmware/Virtual 
Machines/Ubuntu/Ubuntu.vmx