VMware Cloud Community
wmarques
Contributor
Contributor
Jump to solution

FTP on ESXi 3.5??

I have been bangin my head against our VM server for a while now trying to enable FTP so that we can back up the virtual machine files to another location in case the ESXi server were to meet an untimely end. I do not have the consolidated back up option. I have read multiple documents about removing the # comment from the inetd.conf file and then restarting the services or rebooting the server. I have done all of this and still can not get the ftp to work. I have managed to connect to the console using SSH, but no luck with ftp. When I try to FTP it returns the following...... -ash: ftp: not found

Anyone have this problem?

Reply
0 Kudos
114 Replies
DSTAVERT
Immortal
Immortal
Jump to solution

You can try adding

AllowForeignAddress on

to the proftpd.conf file.If you are using anonymous ftp then you will need to add that directive to the anonymous section of the config file. I haven't tried this on ESXi but that is how it works in Linux.

-- David -- VMware Communities Moderator
Reply
0 Kudos
s1xth
VMware Employee
VMware Employee
Jump to solution

I dont see that line in the conf file, should I add it?

Edit- That works!!!!! Thanks!!

http://www.virtualizationimpact.com http://www.handsonvirtualization.com Twitter: @jfranconi
Reply
0 Kudos
DSTAVERT
Immortal
Immortal
Jump to solution

I am assuming some of this need to copy files is for disaster recovery etc. I have been using NFS for both datastores and as disaster. If you haven't used NFS or looked at it, I believe it is a very useful option. A single NFS store can be attached to more than one ESXi host. Moving a VM from one host to another is no more than pausing, if I am lucky, or shutting down if I'm not on one host and starting it on another host. A few seconds. NFS may not be suitable for all VMs but for those that it is it quite spectacular. A poor mans vmotion. For disaster recovery just as easy. If you use NFS as the copy to location then it is just a matter of adding the VM to inventory and pressing start. If you use NFS as your datastore you have many more options for replicating, snapshots etc. I sometimes split the OS portion of the VM from the data portion. I can put the OS on a localstore and the data portion on the NFS store. Lots of options and I think worth a big look.

-- David -- VMware Communities Moderator
Reply
0 Kudos
s1xth
VMware Employee
VMware Employee
Jump to solution

I am using it more for transfering VM's the fastest possible way between hosts. I am in the process of moving some machines from one host to another, I have been using converter which has been working the best because it doesn't need to move the entier VMDK. As far as disaster recovery, I dont think this would work well because you have shut the machine DOWN to copy it off the datastore, (if I am correct). So this would not be an efficient DR move. Now as far as DR goes I have Acronis images that I convert on the fly to a VM that reside onsite/offsite.

http://www.virtualizationimpact.com http://www.handsonvirtualization.com Twitter: @jfranconi
Reply
0 Kudos
Dave_Mishchenko
Immortal
Immortal
Jump to solution

ESXi does included wget (wget ftp://user:password@remote_host/path/file). It's a very simple command but it'll transfer faster than running scp on the ESXi host.

Reply
0 Kudos
drewdown
Contributor
Contributor
Jump to solution

I somewhat new to command line FTP in linux, can you share the syntax you use to FTP files between your ESXi hosts? And I am assuming you are moving the entire folders? Or do you only need specific files to migrate?

Reply
0 Kudos
s1xth
VMware Employee
VMware Employee
Jump to solution

I am using a program called FlashFXP, which utilizes site-to-site transfer feature of FTP commands. Simple drag-n-drop from one to another, of the entire VM folder that I am moving.

http://www.virtualizationimpact.com http://www.handsonvirtualization.com Twitter: @jfranconi
Reply
0 Kudos
DSTAVERT
Immortal
Immortal
Jump to solution

What I am suggesting is that "IF" you can use NFS as a datastore there is no need to copy files between ESXi hosts to move them. The same NFS datastore can be attached to more than one ESXi host. The same VM can be in the inventory on both hosts simultaneously. Only one can be powered on. (In practice you probably wouldn't want to have a machine in two inventories but it is possible). To move a VM simply power it off on one and power it on in the other. If you only use NFS for DR then make your copies or use Converter to hot copy to the NFS store. If a server fails simply add the NFS store to another ESXi host, add the copied machine to inventory and power it on. A two minute recovery and no scrambling to recreate the VM.

If you have FAST drives and dedicated NICs NFS is quite satisfactory for many VMs.

-- David -- VMware Communities Moderator
Reply
0 Kudos
drewdown
Contributor
Contributor
Jump to solution

Tried wget but can't seem to get it move entire directories, only seem to be able to move individual files. Does ESXi support some form of zip which I could then move via wget?

Reply
0 Kudos
Dave_Mishchenko
Immortal
Immortal
Jump to solution

It includes both gzip and tar.

Reply
0 Kudos
s1xth
VMware Employee
VMware Employee
Jump to solution

Very good points. What do you recommend for use with NFS? OpenFiler?

This is all good if a server fails that is running the VM, but what about DR and backing up the VM? You stated something about using converter to hot copy to an NFS store. How exactly does that work?

http://www.virtualizationimpact.com http://www.handsonvirtualization.com Twitter: @jfranconi
Reply
0 Kudos
DSTAVERT
Immortal
Immortal
Jump to solution

Remember with gzip and tar you will be using host cpu and probably temp space. Use wget within the directory and create a receiving directory on the destination.

-- David -- VMware Communities Moderator
Reply
0 Kudos
drewdown
Contributor
Contributor
Jump to solution

I created the dir on the recieving end, trying to wget the folder and still won't allow me to get it.

This is the syntax I am using from the recieving machine:

wget ftp://root:<password>@172.23.22.140/vmfs/volumes/DEMO_DS/NetCool-Win2003

Connecting to 172.23.22.140[http://172.23.22.140|http://172.23.22.140]:21

wget: RETR: vmfs/volumes/DEMO_DS/NetCool-Win2003: Not a regular file

Reply
0 Kudos
DSTAVERT
Immortal
Immortal
Jump to solution

You can use openfiler but NFS is incredibly simple to set up. The export file is just a single line and NFS is part of every distribution.

/backup 192.168.111.0/255.255.255.0(rw,anonuid=96,anongid=96,secure,root_squash,no_wdelay,async)

As for NFS and DR simply attach an NFS datastore to all your ESXi hosts. You can have multiple NFS stores attached to each host. You can use Converter to basically Clone the VM and store it on one of the available datastores. So on one Host I have a localstore and an NFS store. I simply use Converter to copy the VM from localstore to NFS store. Since the same NFS store can also be attached to one or more other Hosts I can use that clone on any other Host. I often use the copy as a test environment for things like testing an OS update or . . .

-- David -- VMware Communities Moderator
Reply
0 Kudos
DSTAVERT
Immortal
Immortal
Jump to solution

Add /* to the end of your string as in

wget ftp://root:<password>@172.23.22.140/vmfs/volumes/DEMO_DS/NetCool-Win200/*

-- David -- VMware Communities Moderator
Reply
0 Kudos
drewdown
Contributor
Contributor
Jump to solution

Still not working right:

Source machine:

/vmfs/volumes/491acfc1-6cae4802-cee0-002219919c5e # ls

NetCool-Win2003

NetCool-win2k3.tgz

/vmfs/volumes/491acfc1-6cae4802-cee0-002219919c5e #

Destination machine:

/vmfs/volumes/49d43a14-c96b8b88-30dd-001a64be6ace/NetCool-Win2003 # wget ftp://root:<password>@172.23.22.140/vmfs/volumes/491acfc1-6cae4802-cee0-002219919c5e/NetCool-Win2003/*

Connecting to 172.23.22.140[http://172.23.22.140|http://172.23.22.140]:21

wget: RETR: vmfs/volumes/491acfc1-6cae4802-cee0-002219919c5e/NetCool-Win2003/*: No such file or directory

If I wget the .tgz file it works fine, just doesn't work with a directory.

Reply
0 Kudos
s1xth
VMware Employee
VMware Employee
Jump to solution

I understand what you mean now, thats a really good idea! I have to look more into NFS, and how I could implement that in my current setup.

http://www.virtualizationimpact.com http://www.handsonvirtualization.com Twitter: @jfranconi
Reply
0 Kudos
DSTAVERT
Immortal
Immortal
Jump to solution

s1xth

I don't know how you are set up so I can only describe how I use it. For the NFS server I use a server with fast SCSI or SAS drives. I usually add SATA drives to an additional array. I have multiple NICs in the ESXi hosts and have a management network and a production network ie two seperate subnets. The ESXi management network (where I connect the VI client) is isolated from my production network with a hardware router / switch and I vpn into it. It is a GB router that I built using a small tyan server and PFSense software. Total cost for the router was $400 or so. The management network has both a Virtual Machine connection and a VMKernel connection. The NFS servers are servers that I have retired. When the lease is up I just buy the ones I want and they become NFS storage devices. I add Centos and as much drive space as I can afford. Off lease servers are really inexpensive even if they weren't yours to begin with.

Once the NFS is set up and it is just a one liner add the storage to ESXi and you are done. Adding storage is done from the configuration / storage screen. NFS is just a radio button choice plus adding the server IP and the mount path. Give it a name and you're done. Do the same on another ESXi host with the same NFS server information. Now when you add a VM you have this second datastore to choose from. If you create a VM on one host and then browse the datastore on the other host you will see the VM you just created. If you just use the NFS store for DR then copying a VM from localstore to the NFS store gives you a copy that you can instantly make available from another Host.

I have attached a couple of images from a test network. The second host is pretty much the same asthis

-- David -- VMware Communities Moderator
Reply
0 Kudos
s1xth
VMware Employee
VMware Employee
Jump to solution

Wow..this is really an awesome setup that you have. I could totally do something along these lines, I have a ton of old servers left over from vming them that I could really start testing something like this.

I currently only have one network on my servers, not two but I could definitely add another nic and a new ip and connect the nfs server through that connection.

You really provided some excellent information, and I really appreciate it... I am going to do some thinking and testing and see if I can use this.

Do you recommend centos as a easy configure nfs server?? I tried openfiler a while ago and I didn't care for it much.

Sent from my Nokia E71

http://www.virtualizationimpact.com http://www.handsonvirtualization.com Twitter: @jfranconi
Reply
0 Kudos
DSTAVERT
Immortal
Immortal
Jump to solution

I read your earlier reply on my phone and misread it thinking you had asked for ways you could implement NFS. It wasn't until after I had pushed the send button that I saw that you hadn't asked that at all Oh well.

I have used openfiler and I still do have it somewhere but I think unless you use the other services it isn't useful. There are other similar pieces of software, e-open for one, that provide a nice frontend but just NFS is just too easy.

As for Centos, it is a Redhat copy and I have used RH since 1x something in the early 90's so I am familliar with where things are. Any distribution should be fine but long life server ones would be a first choice. Ubuntu has a very small install (JEOS).

I can't afford to do Virtual Center and HA and all. I have looked for ways to make what I can afford do as much as it possibly can. This is an ongoing hunt for ways to make a good, reliable, easy to manage setup.

Let me know what you come up with.

-- David -- VMware Communities Moderator
Reply
0 Kudos