Solved

How to copy files to a VMWare Infrastructure server

Posted on 2006-07-24
17
3,832 Views
Last Modified: 2009-12-16
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
Comment
Question by:LSB-IT
  • 7
  • 5
  • 3
  • +2
17 Comments
 
LVL 27

Expert Comment

by:Tolomir
ID: 17169203
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
 
LVL 11

Expert Comment

by:rvthost
ID: 17169837
Alternatively, install WinSCP to do secure copies to ESX.  Works nice and easy!

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

Author Comment

by:LSB-IT
ID: 17170933
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
 
LVL 22

Expert Comment

by:pjedmond
ID: 17171037
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
 
LVL 11

Expert Comment

by:rvthost
ID: 17171049
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
 
LVL 22

Expert Comment

by:pjedmond
ID: 17171060
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
 

Author Comment

by:LSB-IT
ID: 17171297
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
 
LVL 11

Expert Comment

by:rvthost
ID: 17171322
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
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 

Author Comment

by:LSB-IT
ID: 17171333
and I would modify that how?
0
 
LVL 11

Expert Comment

by:rvthost
ID: 17171349
- 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
 

Author Comment

by:LSB-IT
ID: 17171406
what would be the path if I wanted to copy from a usb thumb drive rather than a CD?
0
 

Author Comment

by:LSB-IT
ID: 17171479
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
 
LVL 22

Expert Comment

by:pjedmond
ID: 17171580
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
 

Author Comment

by:LSB-IT
ID: 17171650
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
 

Author Comment

by:LSB-IT
ID: 17175468
I have increased the points to reward anyone that knows how to force the copy or resolve this issue.
0
 
LVL 11

Accepted Solution

by:
rvthost earned 300 total points
ID: 17175583
Can you reboot this host and perhaps just load into the linux mode instead of ESX mode? Then try your copy?
0
 
LVL 3

Expert Comment

by:mario_andres
ID: 22541913
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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
In this article we will discuss all things related to StageFright bug, the most vulnerable bug of android devices.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now