Am curious about this method which I have never used...
Following your recommended steps, Q about these steps...

3, 4. Assuming that the first machine is the machine without the desired
Hosts file and the second machine is the one with the desired Hosts file,
is this really any different than simply booting the first machine
naturally but with the second machine's disk mounted as a second drive?

5. Not clear what is meant by "access," are you suggesting more than or
only reading the second disk's file system?

Unless I'm missing something,
1. mounting the FreeBSD disk as a second drive won't work unless <maybe>
something like FUSE might support if there isn't native support for the
secondary disk's filesystem. This means that after investigating the FUSE
option, network file sharing seems to be the most likely option. BTW - it
might be worthwhile to consider filesystem support in <both> directions.
So, in this case if you can mount the FreeBSD disk while itself booting or
as a secondary disk in another FreeBSD instance, consider also mounting
your Linux disk as another secondary disk...That should grant you read
access to all your mounted disks, ie Although Linux might not support the
FreeBSD fielsystem, perhaps FreeBSD will support your Linux filesystem.

2. Once the file system is accessible, seems to me it should be trivial to
just copy and modify the template Hosts file.

IMO,
Tony


On Fri, Apr 5, 2013 at 5:45 AM, Jakob Bohm <jb-gnumli...@wisemo.com> wrote:

> On 4/5/2013 12:27 AM, Laurent Alebarde wrote:
>
>> Hi all,
>>
>> My host is Linux and my guest is FreeBSD, thus from
>> http://en.wikibooks.org/wiki/**QEMU/Images#Mounting_an_image_**
>> on_the_host<http://en.wikibooks.org/wiki/QEMU/Images#Mounting_an_image_on_the_host>,
>>  I cannot mount the image to access it since Linux has no driver for ufs
>> nor zfs, I cannot setup a spice client since the client is not yet
>> installed. Though I need to access/execute a host file.
>>
>> How can I do that please ?
>>
>>  The standard trick is this:
>
> 1. Prepare another virtual machine supporting the desired file system
>   and running an NFS or similar server (in your case, that would be a
>   FreeBSD server)
>
> 2. Shut down both virtual machines
>
> 3. Start the second virtual machine, with the main disk of the first
>   virtual machine as a second virtual hard drive
>
> 4. From the second virtual machine, mount the partition from the
>   second (virtual) hard drive
>
> 5. Access the files either directly on the second machine or via NFS
>
> 6. Shut down the second virtual machine
>
> 7. Remove the disk of the first virtual machine from the configuration
>   of the first virtual machine
>
> 8. Now the first virtual machine can be started to access its own disk
>   again
>
>
> A simpler alternative is to just boot the first virtual machine from
> an ISO of a "Live CD" for the target OS (in this case a FreeBSD Live
> CD/DVD).
>
> Enjoy
>
> Jakob
> --
> Jakob Bohm, CIO, Partner, WiseMo A/S.  http://www.wisemo.com
> Transformervej 29, 2730 Herlev, Denmark.  Direct +45 31 13 16 10
> This public discussion message is non-binding and may contain errors.
> WiseMo - Remote Service Management for PCs, Phones and Embedded
>
>
>

Reply via email to