qemu-discuss
[Top][All Lists]
Advanced

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

Re: [Qemu-discuss] Unable to share host folder


From: Narcis Garcia
Subject: Re: [Qemu-discuss] Unable to share host folder
Date: Sun, 11 Dec 2016 11:35:21 +0100

About 2nd way (attaching a secondary disk image with data to copy),
guest may not be mounting image's partitions "automagically" but you may
need to operate in guest OS and mount secondary (virtual) disk
partitions manually.

To do only a copy (fast) I often pack the data to an ISO image (with
file-roller GUI or similar) and attach the .iso file as a CD-ROM to the
guest.

And a different way: to share same folder forever, I use smb from host
or mount through sftp (ssh) from guest to host.


El 05/12/16 a les 14:40, Jayadev Kumaran ha escrit:
> Hello everyone,
> 
> I'm very new to Qemu and currently running the emulator for arm64
> platform. I'm trying to share/copy a folder from my host system onto
> Qemu , but haven't succeeded yet. I have tried quite a few ways
> 
> 1 Mount a host folder using 9p over virtio
> 
>    Kernel configuration options were verfied to ensure 9p options are
> enabled.
>    Ran the emulator using :
>    /*qemu-system-aarch64 -M virt -cpu cortex-a57 -kernel Image -initrd
> rootfs.img.gz -nographic -append "console=ttyAMA0 root=/dev/ram
> rootfstype=ramfs init=/bin/sh" -snapshot -fsdev
> local,*//*security_model=none,id=fsdev0,path=/mnt/shared -device
> virtio-9p-pci,id=fs0,fsdev=fsdev0,mount_tag=hostshare*/
>  
>    And tried mounting using
>    /*mount -t 9p -o trans=virtio,version=9p2000.L hostshare /tmp/share*/
>  
>    But  the console showed ;
>    9pnet_virtio : No channels available
>    mount: mounting hostshare on /tmp/share/ failed: No such file or
> directory
>    
>    a) I verfied that /tmp/share is present .
>    b) Tried using -virtfs option with qemu-system-aarch64 , but it
> showed the same logs.
>   
> 2  Created a plain binary image using qemu-img ( raw format ). Formatted
> it as ext4. Mounted it on the host , copied the required folder into the
> mount point and then unmounted it . Now I tried inserting the image using;
>  /*qemu-system-aarch64 -M virt -cpu cortex-a57 -kernel Image -initrd
> rootfs.img.gz -nographic -append "console=ttyAMA0 root=/dev/ram
> rootfstype=ramfs init=/bin/sh" -snapshot -drive
> /home/user/Documents/image_file
> */
> Also using/*
> *//*qemu-system-aarch64 -M virt -cpu cortex-a57 -kernel Image -initrd
> rootfs.img.gz -nographic -append "console=ttyAMA0 root=/dev/ram
> rootfstype=ramfs init=/bin/sh" -snapshot -hdd
> /home/user/Documents/image_file
> 
> */
> But on my guest , I couldn't locate any mount point for the image
> 
> 3 Sharing through host USB device
> Added the usb device using the usb_add monitor command . But the device
> wasn't detected/mounted in Qemu ( lsusb and mount didn't show any USB
> device )
> /*
> */4 Added the folder to initrd image ( rootfs.img.gz)
> In this method , emulator didn't start , supposedly due to exceeding
> size limit of 16M ( new image was found to be around 160M ).
> 
> As I had mentioned in the beginning , I'm very new to this and couldn't
> actually figure the proper way to resolve these issues.. Any help would
> be appreciated.
> 
> Regards,
> Jayadev



reply via email to

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