Copying files from a virtual machine guest operating system that does not have network connectivity
search cancel

Copying files from a virtual machine guest operating system that does not have network connectivity

book

Article ID: 304572

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

This article provides information on copying files from a virtual machine guest operating system that does not have network connectivity.

Resolution

To copy a file from a virtual machine that does not have a network connectivity, use one of these methods:
  • If the ESX/ESXi host supports the USB passthrough mode, mount the USB device on the virtual machine and then copy the required files to the USB drive. After copying the files, you can unmount/detached the USB device.
  • Add an additional VMDK with required size and, from within the Guest OS, format and assign it a drive letter. To do this, you can use the Disk Management feature if you are using a Windows operating system. After you see the additional HDD, copy the files to the new HDD.

    After copying the files, you can remove the VMDK.

    To remove the VMDK:
    1. Right-click the virtual machine and click Edit Settings.
    2. Select the VMDK you created and click Remove from Virtual Machine only.

Note: If you are using a Linux guest operating system, follow the recommended options of the running guest operating system to mount the USB or format the newly added HDD.

  • Create and use a virtual floppy drive.

    To create and use a virtual floppy drive in Linux:

    1. Log in to the system as the root using using SSH.
    2. Run this command to create a virtual floppy image:

      dd if=/dev/zero of=<filename>.flp count=1 bs=1509949

    3. Run this command to format the .flp file under MSDOS file system:

      mkfs.msdos filename.flp

      Notes:
      • You can also use mformat to format the file. Alternatively, if you do not want to use MSDOS, use vfat.
      • Verify that 1.44 MB = 1509949 bytes, so that you can round off to 1500000 bytes.

    4. After the .flp file is ready, copy it to a shared location/storage or to your local desktop/system using scp or any other utility, such as winscp.
    5. Present the copied file to a virtual machine. To do this, right-click the virtual machine, click Edit Settings, and select the Mount Virtual Floppy option.
    6. Use the Windows Explorer on the Windows operating systems to access the virtual floppy and copy data to it from the operating system local drive.

      Notes:
      • For Linux virtual machines, the instructions are different and depends on the version of Linux you are using.
      • You can also use the Copy-VMGuestFile cmdlet to copy a file using VMware Tools.


Additional Information


从没有网络连接的虚拟机客户机操作系统复制文件