Tag Archives: disk mode

How to determine various Disk States in OVM x86 using vm.cfg file ?

Today I came across very interesting topic about disk modes in configuration file of VM. I simulated in my Lab environment.  Below are my findings.

Case 1 : If we are assigning physical disk to VM in OVM x86 just like RDM LUN in VMware. It will be different from the other vDisks which are assigned to VM. We can see that difference in vm configuration file as well.

I have assigned physical disk to VM LinTest1 and in configuration file it is starting with ‘phy’ instead of ‘file’ which is used for simple vDisk. At the end we are seeing ‘w’ which shows that disk is in write status.

[root@OVS-2 0004fb00000600004689b1d1cc6e83d9]# cat vm.cfg
vif = [‘mac=00:21:f6:cd:c2:87,bridge=103a1e612f’]
OVM_simple_name = ‘LinTest1’
guest_os_type = ‘linux’
disk = [‘file:/OVS/Repositories/0004fb0000030000f1532acb312df8a2/VirtualDisks/0004fb0000120000f81558f292b2f52e.img,xvda,w’, ‘file:/OVS/Repositories/0004fb0000030000f1532acb312df8a2/VirtualDisks/0004fb0000120000ea645f4fa6a4abf8.img,xvdb,w’, ‘file:/OVS/Repositories/0004fb0000030000f1532acb312df8a2/VirtualDisks/0004fb0000120000ad06906d5a735bd0.img,xvdc,w’, ‘phy:/dev/mapper/14f504e46494c45004c32597330422d746257662d34434677,xvdd,w’]

Note : We can’t create the clone with physical disk assigned to VM

Case 2 : If we are sharing single disk between two VMs for the file systems like GFS2. Then that disk will come in configuration file ending with “w!”. It will be in the configuration file of both VMs to which the disk is shared.

[root@OVS-2 0004fb00000600004689b1d1cc6e83d9]# cat vm.cfg
vif = [‘mac=00:21:f6:cd:c2:87,bridge=103a1e612f’]
OVM_simple_name = ‘LinTest1’
guest_os_type = ‘linux’
disk = [‘file:/OVS/Repositories/0004fb0000030000f1532acb312df8a2/VirtualDisks/0004fb0000120000f81558f292b2f52e.img,xvda,w’, ‘file:/OVS/Repositories/0004fb0000030000f1532acb312df8a2/VirtualDisks/0004fb0000120000ea645f4fa6a4abf8.img,xvdb,w’, ‘file:/OVS/Repositories/0004fb0000030000f1532acb312df8a2/VirtualDisks/0004fb0000120000ad06906d5a735bd0.img,xvdc,w’, ‘file:/OVS/Repositories/0004fb0000030000f1532acb312df8a2/VirtualDisks/0004fb0000120000b1c0d51195d1a633.img,xvdd,w!’]

So when ever you see w! in VM configuration file that means the disk is in shared status.

Case 3 : If any device or virtual disk is presented on server only in read only. Then it will be ending with “r” in configuration file of VM.

In below case I have assigned ISO image to VM in below output r at end is showing that its in read only mode.

[root@OVS-2 0004fb00000600004689b1d1cc6e83d9]# cat vm.cfg
vif = [‘mac=00:21:f6:cd:c2:87,bridge=103a1e612f’]
OVM_simple_name = ‘LinTest1’
guest_os_type = ‘linux’
disk = [‘file:/OVS/Repositories/0004fb0000030000f1532acb312df8a2/VirtualDisks/0004fb0000120000f81558f292b2f52e.img,xvda,w’, ‘file:/OVS/Repositories/0004fb0000030000f1532acb312df8a2/VirtualDisks/0004fb0000120000ea645f4fa6a4abf8.img,xvdb,w’, ‘file:/OVS/Repositories/0004fb0000030000f1532acb312df8a2/VirtualDisks/0004fb0000120000ad06906d5a735bd0.img,xvdc,w’, ‘file:/OVS/Repositories/0004fb0000030000f1532acb312df8a2/VirtualDisks/0004fb0000120000b1c0d51195d1a633.img,xvdd,w!’, ‘file:/OVS/Repositories/0004fb0000030000f1532acb312df8a2/ISOs/V41362-01.iso,xvde:cdrom,r’]

I hope that will help while doing troubleshooting for OVM X86 issues 🙂