[Top][All Lists]

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

Re: [Qemu-discuss] How to load a host file in the client while not yet i

From: Laurent Alebarde
Subject: Re: [Qemu-discuss] How to load a host file in the client while not yet installed ?
Date: Sun, 07 Apr 2013 12:10:08 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.11) Gecko/20130116 Thunderbird/10.0.11

Thanks both of you. Yes, the problem is trivial when both machine have the same FS.

If I have not mistaken myself, it seems to me that Jakob defines the 1st machine as the one with the desired files (let's call it MWDF) and the 2nd one the one to install that needs these files (let's call it MTI) - and reverse for Tony.

My problem is when MWDF and MTI do not have the same FS and when you cannot setup any client in the MTI since, by definition, it is not yet installed. In this configuration though, we have access to the iso of the Live/Install CD. But I don't want to have to prepare a specific Live/Install CD with the desired files - I need flexibility. I wonder if the MTI, when booted on the Live/Install CD could be configured as an ssh server to transfer the desired files with scp ? Or as an NFS server ?



Le 05/04/2013 20:11, Tony Su a écrit :
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.


On Fri, Apr 5, 2013 at 5:45 AM, Jakob Bohm <address@hidden> 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 , 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

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


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

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