Solved

How to copy files to a VMWare Infrastructure server

Posted on 2006-07-24
17
3,833 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Many people tend to confuse the function of a virus with the one of adware, this misunderstanding of the basic of what each software is and how it operates causes users and organizations to take the wrong security measures that would protect them ag…
In this article we will discuss all things related to StageFright bug, the most vulnerable bug of android devices.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

914 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

17 Experts available now in Live!

Get 1:1 Help Now