2

how to copy files on esxi4 datastore (fs=vmfs) over network using console (SSH)?

giving up older question:have seen on vmware forums that its not possible have a USB drive NTFS attached to ESXi4 host. fdisk -l shows the device as /dev/mpx.... but when i try to mount that using mount /dev/xxx /mnt/usbdisk....it fails with message "no such file or dir"

could anyone help with correct entry in etc/fstab?

all that i am trying to do is backup the vms on esxi host to usb disk...thanks in advance

there is a dir called usbdrv, tried cp of vmdk file here but failed

2
  • Please don't rewrite questions while people try to answer them :(
    – pehrs
    Apr 20, 2010 at 9:40
  • sorry for that...
    – JMS77
    Apr 20, 2010 at 9:58

4 Answers 4

1

First of all I don't think you can on ESXi, unless you are in unsupported mode. I have done it on ESX a few times, but the recommended way to backup the files from esxi are over the network, using the vSphere client. If at all possible go that route, it's much easier.

With that said. Format the disk with ext3 (You only have read support for NTFS, and FAT32 is not good with large files). Plug in the drive.

tail /var/log/dmesg

Should tell you the name of the drive. Create a mount point and mount it, specifying the correct fs

mkdir /mnt/usb
mount /dev/<device_name> /mnt/usb -t ext3

You will probably have to use vmkstools to export the files.

2
  • tail ...no files found? using esxi4
    – JMS77
    Apr 20, 2010 at 9:59
  • ESXi is pretty limited, and I don't have one here to play around with. Seems they have changed the log structure. Check if you can't read it in /var/log/messages
    – pehrs
    Apr 20, 2010 at 10:32
3

Here's a quick walkthrough to enable SSH access.

  • Use Alt-F1 to access console (you will need physical access to the machine)
  • Type the word "unsupported" (that's right, console access is not supported by VM for ESXi)
  • Login as root
  • vi /etc/inetd.conf and find the rule starting with #ssh and uncomment it. Save and quit
  • run /sbin/services restart and you should be good to go
3

I was trying to type unsupported on ESXi 4.1 and never succeeded.

Finally I managed to activate SSH extremly simply :

From vSphere client 4.1:

Configuration Tab => Software => Security Profile => Properties

Then click on (Remote Technical Support) SSH => Options and Automatic Start.

1
2

Easily done through powershell:

Enable it with:

Connect-VIServer "<your VC server>"
get-cluster "<your cluster>" | Get-VMHost | Get-VMHostService | Where { $_.Key -eq “TSM-SSH”} | start-VMHostService

Disconnect-VIServer -Confirm:$false

Do what you need, then disable it again with:

Connect-VIServer "<your VC server>"
get-cluster "<your cluster>" | Get-VMHost | Get-VMHostService | Where { $_.Key -eq “TSM-SSH”} | stop-VMHostService

Disconnect-VIServer -Confirm:$false

*note you can specify a single server by removing the get-cluster and giving the hostname after Get-VMHost like so:

Connect-VIServer "<your VC server>"
Get-VMHost "<your server>" | Get-VMHostService | Where { $_.Key -eq “TSM-SSH”} | start-VMHostService

Disconnect-VIServer -Confirm:$false

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .