VMware Cloud Community
zare_N0222
Enthusiast
Enthusiast
Jump to solution

disk RO

Hi,

I have one question, is it possible with VM tool to get info does the HDD ov VM in read-only stat.

last night there was some problem with network and result was that there was a lose connection with the storage ,  connectivity lost was about 50sec (STP) . After that  Linux VM had a disk in RO mode and we must do fsck on all of them .

Reply
0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

You would have to query the filesystems inside the guest OS of each VM.

You can do that with the Invoke-VMScript cmdlet, provided you have VMware Tools installed and running on the VMs.

Depending on the Linux distro you can send the required command to the guest OS.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

View solution in original post

Reply
0 Kudos
8 Replies
LucD
Leadership
Leadership
Jump to solution

Not afaik.
You could have a look at the VM's vmware.log, but I'm not sure if you will find anything in there.

I would normally consult the guest OS logs.
On Linux you should find a trace of why a HDD was placed in RO.
On an Ubuntu box for example, you would look in /var/log/syslog.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
zare_N0222
Enthusiast
Enthusiast
Jump to solution

Hi LucD,

I know why that has happened. But I need to find a way how to get list of all affected VM ,  Some VMs had a problem with disk in RO state others didn't.

I was hoping that with powercli somehow I can get list of all affected VMs.

Reply
0 Kudos
LucD
Leadership
Leadership
Jump to solution

You would have to query the filesystems inside the guest OS of each VM.

You can do that with the Invoke-VMScript cmdlet, provided you have VMware Tools installed and running on the VMs.

Depending on the Linux distro you can send the required command to the guest OS.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
zare_N0222
Enthusiast
Enthusiast
Jump to solution

hm,

I start from

I try  Get-HardDisk -VM $VM -DiskType flat

but I don't have idea how, or is it possible to get result od mount command on centos  over vm tools

Reply
0 Kudos
LucD
Leadership
Leadership
Jump to solution

Send a 'dmesg' command to the guest OS through Invoke-VMScript.
The output should provide some info.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
zare_N0222
Enthusiast
Enthusiast
Jump to solution

  Invoke-VMScript -VM VM-cent -ScriptText "mount"  -guestUser root -guestPassword "#123#123" -ScriptType Bash

this work , same if I set  "dmesg" , but this is't a solution for my problem because there is 50 VM on Linux and I don't know all GuestUser and user password.

Reply
0 Kudos
LucD
Leadership
Leadership
Jump to solution

That is not really a PowerCLI problem then.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
zare_N0222
Enthusiast
Enthusiast
Jump to solution

yes, you are right.  Thanks LucD ,

Reply
0 Kudos