Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3855
  • Last Modified:

How to copy files to a VMWare Infrastructure server

I need to copy some files from a CD to /usr/lib/vmware/hostd on my ESX box.
I need to know the command syntax to do so.
0
LSB-IT
Asked:
LSB-IT
  • 7
  • 5
  • 3
  • +2
1 Solution
 
TolomirAdministratorCommented:
Take a look at:

Managing the VMware ESX Server File System from the Management Interface

Using the VMware Management Interface, you can manage the file system of your VMware ESX Server machine remotely. Use the file manager to change the permissions of any file on the physical machine, create new directories on the physical machine or cut, copy, paste and delete files as you would if you were working directly on the file system itself. To use the file manager, click Manage Files on the overview page of the management interface. To go directly to the file system browser, point your Web browser to http://<hostname>/showdir.

http://www.vmware.com/support/esx15/doc/esx15_running4.html



0
 
rvthostCommented:
Alternatively, install WinSCP to do secure copies to ESX.  Works nice and easy!

http://winscp.net/eng/index.php
0
 
LSB-ITAuthor Commented:
I am not sure how I would use WinSCP since it is a ESX box and doesnt have Windows on it.
Also, the tip regarding "http://<hostname>/showdir" is a little old as the link points to info on ESX server version 1.5
I do not think that the management interface can be accessed the same way as in 1.5
If anyone has the solution please point me in the right direction.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
pjedmondCommented:
If you have sshd running on the system, then you can use scp to copy files from it:

scp usr@hostname:/path/to/file .

Or from the virtual machine, you can transfer a file to any system that has ssh running on it:

scp myfile.txt usr@hostname:/home/usr/file

(   (()
(`-' _\
 ''  ''
0
 
rvthostCommented:
LSB-IT

You can install WinSCP on your Windows PC.  This then connects to your ESX box via IP.  In the left pane, you will see your local/network drives and on the right pane, you see the ESX file structure...allowing you to copy files back and forth.  Since I am not a Linux command line guru, this works well and I use it regularly with my ESX environment.
0
 
pjedmondCommented:
mount /mnt/cdrom

scp  /mnt/cdrom/dir/file root@myhostname:/usr/lib/vmware/hostd

or

scp  /mnt/cdrom/dir/file root@my.ho.st.ip:/usr/lib/vmware/hostd

Whilst the host concerned has sshd running on it.

      
Comment from Tolomir
Date: 07/24/2006 05:16PM BST
      Comment       

Take a look at:

Managing the VMware ESX Server File System from the Management Interface

Using the VMware Management Interface, you can manage the file system of your VMware ESX Server machine remotely. Use the file manager to change the permissions of any file on the physical machine, create new directories on the physical machine or cut, copy, paste and delete files as you would if you were working directly on the file system itself. To use the file manager, click Manage Files on the overview page of the management interface. To go directly to the file system browser, point your Web browser to http://<hostname>/showdir.

http://www.vmware.com/support/esx15/doc/esx15_running4.html




Comment from rvthost
Date: 07/24/2006 06:23PM BST
      Comment       

Alternatively, install WinSCP to do secure copies to ESX.  Works nice and easy!

http://winscp.net/eng/index.php

Comment from LSB-IT
Date: 07/24/2006 08:42PM BST
      Author Comment       

I am not sure how I would use WinSCP since it is a ESX box and doesnt have Windows on it.
Also, the tip regarding "http://<hostname>/showdir" is a little old as the link points to info on ESX server version 1.5
I do not think that the management interface can be accessed the same way as in 1.5
If anyone has the solution please point me in the right direction.

Comment from pjedmond
Date: 07/24/2006 09:01PM BST
      Your Comment       

If you have sshd running on the system, then you can use scp to copy files from it:

scp usr@hostname:/path/to/file .

Or from the virtual machine, you can transfer a file to any system that has ssh running on it:

scp myfile.txt usr@hostname:/home/usr/file

(   (()
(`-' _\
 ''  ''
0
 
LSB-ITAuthor Commented:
When I do this:  scp  /mnt/cdrom/dir/file root@my.ho.st.ip:/usr/lib/vmware/hostd
It prompts me for the root password as expected, but when I enter the root password it says its incorrect!
I am totally lost as why this is so hard.
I have increased the points again in hopes that someone can solve this.
0
 
rvthostCommented:
Ah yes...by default, root ssh access is disabled in VI3.

You'll have to modify /etc/ssh/sshd_config to allow "PermitRootLogin yes" instead of "PermitRootLogin no"

Restart ssh. "/etc/init.d/sshd restart" or "service sshd restart"
0
 
LSB-ITAuthor Commented:
and I would modify that how?
0
 
rvthostCommented:
- Login at the physical console
- cd /etc/ssh
- nano sshd_config

Modify the line as described above.

Ctrl-X to exit...it will prompt to save.

When back at the prompt, execute "service sshd restart"
0
 
LSB-ITAuthor Commented:
what would be the path if I wanted to copy from a usb thumb drive rather than a CD?
0
 
LSB-ITAuthor Commented:
OK, I managed to copy one file I needed but when I try to copy the second it tells me that the "text file is busy".
Is there some way to force the copy?
0
 
pjedmondCommented:
That means that the file you are copying to already exists and is being edited, or the file that you are trying to copy is opened for editing.

(   (()
(`-' _\
 ''  ''

0
 
LSB-ITAuthor Commented:
I figured that, but the file is neither open for editing nor is is being edited.
The file is the vmware-hostd file if that helps.
0
 
LSB-ITAuthor Commented:
I have increased the points to reward anyone that knows how to force the copy or resolve this issue.
0
 
rvthostCommented:
Can you reboot this host and perhaps just load into the linux mode instead of ESX mode? Then try your copy?
0
 
mario_andresCommented:
Thanks --  it is nice to find a quick answer to question here at Expert Exchange. This was really helpful.

Thank you all!
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 7
  • 5
  • 3
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now