VMware Cloud Community
fcastill
Contributor
Contributor
Jump to solution

How to copy a VM to a USB drive

Hi,

Does anybody know the commands on how to

1: mount a USB drive to an ESX3.5 host,

2: copy a VM to the USB once mounted.

Then mount on another ESX3.5 host

copy the VM from the USB to the new ESX3.5 host.

If you do please provide the commands, I am kinda new at it Smiley Sad

Thanks!!!!!

Reply
0 Kudos
1 Solution

Accepted Solutions
Veee
Enthusiast
Enthusiast
Jump to solution

To mount usb drive:

1. First see that usb drive is recognised:

as root do=> # lsusb

it would show you your usb drive (like --- "Bus 002 Device 002: ID 0951:1600 Kingston Technology Data Traveler II Pen Drive")

2. Now do => # dmesg | grep -i "SCSI device"

This would show you an extra scsi device than usual. Lets say for my case it is "sdc".

3. Now make a directory for mounting usb - say - /mnt/flash

4. Use # mount /dev/sdc1 /mnt/flash/ to mount your usb drive to flash directory.

5. Now in /mnt/flash dir, you can see the contents of your drive.

To copy VM:

Use normal cp command with -r -f options.

  1. cp -rf <path-to-vm-dir / vm-name> /mnt/flash

View solution in original post

Reply
0 Kudos
4 Replies
Kevin_Hamilton
Contributor
Contributor
Jump to solution

Mate, I would look at using winscp to copy the files not mounting direct through service console. Create a normal user in both hosts connect via winscp turn off vm then copy files from 1st host then connect to seconed host put them in there and bring it up.

ctfoster
Expert
Expert
Jump to solution

I'd second that. Also if you use veeam (a similiar scp tool) you can copy directly between the hosts.

If you found this or any other post helpful please consider the use of the Helpfull/Correct buttons to award points

Reply
0 Kudos
Veee
Enthusiast
Enthusiast
Jump to solution

To mount usb drive:

1. First see that usb drive is recognised:

as root do=> # lsusb

it would show you your usb drive (like --- "Bus 002 Device 002: ID 0951:1600 Kingston Technology Data Traveler II Pen Drive")

2. Now do => # dmesg | grep -i "SCSI device"

This would show you an extra scsi device than usual. Lets say for my case it is "sdc".

3. Now make a directory for mounting usb - say - /mnt/flash

4. Use # mount /dev/sdc1 /mnt/flash/ to mount your usb drive to flash directory.

5. Now in /mnt/flash dir, you can see the contents of your drive.

To copy VM:

Use normal cp command with -r -f options.

  1. cp -rf <path-to-vm-dir / vm-name> /mnt/flash

Reply
0 Kudos
fcastill
Contributor
Contributor
Jump to solution

How does veeam work. I get a socket denied every time I try to copy a VM even when I am logged as root on both ESX servers

Reply
0 Kudos