VMware Cloud Community
Khal
Contributor
Contributor
Jump to solution

Mounting a VMFS datastore volume on Centos/Redhat?

I have a SAN and one of the LUNs is the VMWare datastore. The SAN provides snapshotting of each volume, and I can export a snapshot as a volume to mount to another machine. I did this and mapped the snapshot to another host (running Centos 5) and I rescanned the bus and it showed up as /dev/sde, and when I ran "parted /dev/sde" the volume was there, however I don't know how to mount that LUN because I don't know what the filesystem type is. I assume it's vmfs or something like that but I don't know how to mount it on Centos.

What I'm trying to do ultimately is copy the .vmdk files etc from one host to another for backup purposes - it's a long story but someone wants it on a DVD-ROM. I could download it to my machine via the VI client, but it's a 100 GB image and my connection isn't the greatest, plus I don't have 100 GB of space on this machine. I tried SCPing the .vmdk files directly from the ESX host to the other host in the datacenter and I got a bunch of "device or resource busy" errors. I assume it would work if I shutdown the VM, but I can't do that for the whole time it takes to transfer the file.

0 Kudos
1 Solution

Accepted Solutions
Texiwill
Leadership
Leadership
Jump to solution

Hello,

A VM can be running if you make a snapshot first, do your 'scp' then commit the snapshot. Do not forget the commit as that can be a serious issue further down the line.

Free tools that do this all to consider are VISBU (xtravirt.com), vmbk.pl, a script from my book, and the free version of PhD esXpress.


Best regards,

Edward L. Haletky

VMware Communities User Moderator

====

Author of the book 'VMWare ESX Server in the Enterprise: Planning and Securing Virtualization Servers', Copyright 2008 Pearson Education.

SearchVMware Blog: http://itknowledgeexchange.techtarget.com/virtualization-pro/

Blue Gears Blogs - http://www.itworld.com/ and http://www.networkworld.com/community/haletky

As well as the Virtualization Wiki at http://www.astroarch.com/wiki/index.php/Virtualization

--
Edward L. Haletky
vExpert XIV: 2009-2023,
VMTN Community Moderator
vSphere Upgrade Saga: https://www.astroarch.com/blogs
GitHub Repo: https://github.com/Texiwill

View solution in original post

0 Kudos
7 Replies
Khal
Contributor
Contributor
Jump to solution

A related question - is it possible to export a .vmdk file using vmkfstools while the .vmdk file is in use? Or does the VM need to be shutdown first?

0 Kudos
SuryaVMware
Expert
Expert
Jump to solution

You could add a snapshot to the VM and run vmkfstools -i on the original VMDK of the VM.

Let me know if this helps.

-Surya

Texiwill
Leadership
Leadership
Jump to solution

Hello,

I have a SAN and one of the LUNs is the VMWare datastore. The SAN provides snapshotting of each volume, and I can export a snapshot as a volume to mount to another machine. I did this and mapped the snapshot to another host (running Centos 5) and I rescanned the bus and it showed up as /dev/sde, and when I ran "parted /dev/sde" the volume was there, however I don't know how to mount that LUN because I don't know what the filesystem type is. I assume it's vmfs or something like that but I don't know how to mount it on Centos.

You can not. There is no method to mount a VMFS on Linux.

What I'm trying to do ultimately is copy the .vmdk files etc from one host to another for backup purposes - it's a long story but someone wants it on a DVD-ROM. I could download it to my machine via the VI client, but it's a 100 GB image and my connection isn't the greatest, plus I don't have 100 GB of space on this machine. I tried SCPing the .vmdk files directly from the ESX host to the other host in the datacenter and I got a bunch of "device or resource busy" errors. I assume it would work if I shutdown the VM, but I can't do that for the whole time it takes to transfer the file.

Either SCP or use a VCB Proxy, either way you will have to have local storage to which to place the exported VMs.

To cut down on space requirements you could also use Vizioncore vRanger, Veeam Backup, or PhD esXpress.


Best regards,

Edward L. Haletky

VMware Communities User Moderator

====

Author of the book 'VMWare ESX Server in the Enterprise: Planning and Securing Virtualization Servers', Copyright 2008 Pearson Education.

SearchVMware Blog: http://itknowledgeexchange.techtarget.com/virtualization-pro/

Blue Gears Blogs - http://www.itworld.com/ and http://www.networkworld.com/community/haletky

As well as the Virtualization Wiki at http://www.astroarch.com/wiki/index.php/Virtualization

--
Edward L. Haletky
vExpert XIV: 2009-2023,
VMTN Community Moderator
vSphere Upgrade Saga: https://www.astroarch.com/blogs
GitHub Repo: https://github.com/Texiwill
0 Kudos
Khal
Contributor
Contributor
Jump to solution

Thanks Edward. Does the VM need to be shutdown in order to SCP? When I tried it, it had said resource busy, I presume because the VM was on.

0 Kudos
SuryaVMware
Expert
Expert
Jump to solution

Like I adviced earlier you could create a snapshot to the VM and use either vmkfstools -i to clone or SCP the original VMDK of the VM. Once you are done with the file transfer you can remove the snapshot.

-Surya

Khal
Contributor
Contributor
Jump to solution

Thanks Surya, I missed your post. I will try that.

0 Kudos
Texiwill
Leadership
Leadership
Jump to solution

Hello,

A VM can be running if you make a snapshot first, do your 'scp' then commit the snapshot. Do not forget the commit as that can be a serious issue further down the line.

Free tools that do this all to consider are VISBU (xtravirt.com), vmbk.pl, a script from my book, and the free version of PhD esXpress.


Best regards,

Edward L. Haletky

VMware Communities User Moderator

====

Author of the book 'VMWare ESX Server in the Enterprise: Planning and Securing Virtualization Servers', Copyright 2008 Pearson Education.

SearchVMware Blog: http://itknowledgeexchange.techtarget.com/virtualization-pro/

Blue Gears Blogs - http://www.itworld.com/ and http://www.networkworld.com/community/haletky

As well as the Virtualization Wiki at http://www.astroarch.com/wiki/index.php/Virtualization

--
Edward L. Haletky
vExpert XIV: 2009-2023,
VMTN Community Moderator
vSphere Upgrade Saga: https://www.astroarch.com/blogs
GitHub Repo: https://github.com/Texiwill
0 Kudos