[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-discuss] sharing files between host and guest

From: Brooke Wallace
Subject: [Qemu-discuss] sharing files between host and guest
Date: Wed, 2 Nov 2016 20:03:19 +0000

Hi folks,

I'm new to QEMU and was able to pull the latest stable version and build it. I downloaded a simple test arm image that I found in one of the docs - arm-test-0.2.tar.gz and was able to run that w/o any problems.

I grabbed the appropriate corss compiler tool chain for the ARM device supported by that image, wrote and compiled a simple program. Now I want to load that program on the device, but I can't find a simple method of shareing files between the host and guest.

This seems to be a pretty basic requirement, but the instructions I've found in the docs are not working for me. I've tried multiple options and am stuck at this point. Here is a summary of what I tried:

1. qemu-img to create an raw image, and mount that to the host
   - was able to mount an image formated w/mkfs.ext4
   - not able to mount one partitioned with fdisk, tried many different offsets
   - not able to format a file image partitioned with fdisk
2. unable to mount anything to the arm-test image other than the -initrd arm_root.img that was provided
  - tried many combinations of -hda, -drive and -device, eg.
    -hda test.img,fmt=raw
    -drive if=none,file=test.img,format=raw,id=hda -device ide-hd,drive=hda,bus=ide,unit=0
3. Tried creating a bridge to enable networking using the qemu-ifup/down scripts documented.
   -I'm able to ping, but can't ping my host ip
   -also tried tftp (after setting put anonymous ftp server on the host), eg.

sudo qemu-ifup tap0
qemu-system-arm -kernel zImage.integrator -initrd arm_root.img -machine integratorcp -net nic -net tap,ifname=tap0,script=no,downscript=no
sudo qemu-ifdown tap0

It seems that the arm-test image does not have support for an IDE bus. I found and sd card device on
the device and can read/write to it, but am not able to mount a host file image to it using the -sd option.

I did not want to get into compiling my own kernel yet, and emulating an x86 image does not seem to be as
interesting as working with an ARM image.

I've followed the procedures I've found on many different wikis, but my overall impression is that the documentation
is very sparse, much of it out dated, and certainly not maintained. It assume advanced knowledge of many aspects
Linux administration that are not normally used such as paritioning/formating disks and setting up bridge networks.

I also see several methods using a Windows host or mounting CIFS file system - since I'm working on a Linux host
these are not attractive options.

Its my goal to eventually get into the source code, but if just getting started as a user is this difficult I may have to
reevaluate that goal.

Any help would be greatly appreciated - this seems like something very basic that should be well documented...


reply via email to

[Prev in Thread] Current Thread [Next in Thread]