Subject: Re: [Semi-OT] Running QEMU
To: Jan Danielsson <jan.m.danielsson@gmail.com>
From: haad <haaaad@gmail.com>
List: netbsd-users
Date: 03/28/2007 22:02:02
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Jan Danielsson wrote:
> Hello all,
>
> I've decided that I want to understand the boot process, and how to
> build a "livecd". But I don't feel like spending a bunch of CD's in the
> intial trial-and-error phase, so I thought I'd begin experimenting in an
> QEMU virtual machine.
>
> Getting QEMU to boot up NetBSD/i386 was dead easy, as was installing
> it. But now I need to be able to:
>
> 1) Fetch pkgsrc into the VM so that I can install some tools I need
> 2) Transfer the generated livecd ISO out to my "real" system so that
> I can try booting from it in another QEMU session.
>
> Both these points "require" networking. I tried to read the docs, but
> frankly: I don't understand anything. :-) My knowledge of networking is
> extremely limited. Is there any easy way to allow me to transfer files
> between my real system and a virtual machine? I tried the tftp thing,
> but couldn't get it working. And I read somewhere that it was very limited.
what you need is desribed here [1]. You will use ifconfig(8) and route(8).
set up your virtual/real enviroment like this
virtual#
ifconfig {virtual int} 192.168.1.2/24 up
route add default 192.168.1.1
real# ifconfig {real int} 192.168.1.1/24
then run sshd on your real machine and use scp command from virtual qenu machine.
#virtual scp {your login on real machine}@192.168.1.1:/{path to pkgsrc}
{destination dir}
>
> I guess I don't really need to have access to the Internet from the
> virtual machine, as I can install binary packages, but I still need to
> transfer files to/from the VM from my "real" system.
>
> In worst case, I guess I can simply create a "second harddrive" image
> which I dd tar archives to/from. :-)
>
[1]http://netbsd.org/guide/en/chap-net-intro.html#chap-net-intro-tcpip-subnet
Regards
- ---------------------------------------------------------------
Adam Hamsik
ICQ 249727910
jabber haad@jabber.org
- ---------------------------------------------------------------
There are 10 kinds of people in the world. Those who understand
binary numbers, and those who don't.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (NetBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGCsm69Wt2FT7y228RAqJhAJ9UN1YgsxZmBYR1K0Eqci4gQ2v3bACfS+gF
XCYVgi8brJM2m9BTtxY3dl4=
=PtNG
-----END PGP SIGNATURE-----