Original article: http://vaemon.com/article/1079.html
[This problem was first solved by the "newbie" author]
Sorry, I have been busy with the release of the new account, so I am also slow to get back to the file. I hope this week will be able to recover to normal again. Users often ask questions about using USB to directly copy data in datastore from the service console. In fact, in most cases, it is not recommended, but there is still a need for this, especially the larger the current USB flash capacity, the ability to directly copy the information from the service console to the USB, for small and medium-sized enterprises, it is really convenient to say that the ESX Server is in its own environment, winscp and other tools are actually more straightforward, so in this article, we will look at how to use the service console, directly access the complete process of the USB connector memory.
Before starting, we must confirm the following steps.
1. the USB hard drive can be recognized by ESX and can be merged. Currently, the ESX protocol can be used in Linux ext and Windows FAT32. If your hard drive is NTFS, you may not be able to copy the data (only the data can be retrieved), so you cannot complete the manual copy requirement.
2. ESX has complete server guard, because when installing ESX, you must install USB drivers. Most of your ESX systems can be used as long as they are not "Uneasy" during security.
Next, let's take a look at our next steps.
First set the USB access part in ESX
First, we enter the ESX service console, whether it is using SSH, directly to the local machine, or using remote control such as Dell Perc, The key must be able to use commands. Since the system will use most of the space for datastore at the time of installing ESX, what we see from fdisk is the system disk, currently, no USB hard drive is available. In the service console
Fdisk-l
We can see that the current SDB is a system disk. Next, we will insert the USB flash
Tail-F/var/log/messages
USB-storage is displayed, but the system is VM-dominated at this time. Therefore, the USB hard drive is still invisible under the service console. We want to move the USB control from the VM to the service console.
In ESX/esxi, the USB control permission is handed over to the service console, and the usbarbitrator parameter needs to be switched over. Therefore, we must import
Chkconfig usbarbitrator off
This operation allows the use of USB to be managed from the system and to the service console. After the configuration is complete, you must restart the ESX server and then restart the ESX Server in "reboot. After the reboot, when a USB hard drive is inserted, the system will automatically receive messages and prompt that the USB hard drive has been caught and is specified to SDA.
We can click "fdisk-L" to check whether the USB hard drive is known. In the Jiayu system, it is "/dev/SDA", and there is a separate area on it: "/dev/sda1 」.
Migrate a USB hard drive to the ESX Service Console
After finding the hard disk, you can copy the partition to the trial system of the service console. First, we should first set up a temporary project
Mkdir/mnt/usbdisk
After importing the USB hard drive, we need to keep the USB hard drive under this category. Next, merge
Mount/dev/sda1/mnt/usbdisk-T vfat
This command sets the "/dev/sda1" parameter to "/mnt/USB disk. The "-T vfat" parameter specifies the partitioning system. If your USB hard drive is ext2/3 that can be recognized in Linux, you do not even need to copy the-V Data of the local system.
Locate the datastore on which the VM is located and start the VM
Next, we will go to/mnt/USB disk to view the USB hard drive case. Next, we will copy the data to the disk to make it simple. For example, if we want to copy a VM in a datastore on the hard drive to a USB hard drive, we only need to find the datastore that the VM is attached, use the standard Linux Command to copy the data. For example, we want to copy the VM in nostalgia to USB, as long as the following command is copied.
CP/vmfs/volumes/datastore1/nostalgia/*. */mnt/usbdisk /.