Tiny Core Linux

Tiny Core Extensions => TCE Corepure64 => Topic started by: Juanito on April 03, 2016, 01:36:21 AM

Title: Howto: qemu with networking
Post by: Juanito on April 03, 2016, 01:36:21 AM
It took a while to figure this out so, in case anybody else needs it...

Using the corepure64 qemu and bridge-utils extensions.

Setup a network bridge:
Code: [Select]
$ sudo modprobe bridge
$ sudo brctl addbr br0
$ sudo brctl addif br0 eth0
$ sudo ifconfig br0 up

..then startu qemu:
Code: [Select]
# echo 'allow br0' > /usr/local/etc/qemu/bridge.conf
$ qemu-img create -f qcow2 vdisk.img 2G
$ qemu-system-x86_64 -enable-kvm -hda vdisk.img -m 2G -cdrom CorePure64-7.0.iso -boot d -net nic -net bridge

..then tce-load -w/tce-load -i work fine from within the vm  :)

(for some reason wbar didn't want to work though)
Title: Re: Howto: qemu with networking
Post by: curaga on April 03, 2016, 02:00:08 AM
The default doesn't work for you?

I do just
Code: [Select]
qemu-system-x86_64 -cdrom TinyCore.iso
And networking works just fine in the default user mode. It's slower than bridge, and doesn't support pings, but works fine for downloading things, web browsing, etc.

edit: Clarifying, this works both on other systems and CorePure64 for me.
Title: Re: Howto: qemu with networking
Post by: Juanito on April 03, 2016, 03:50:56 AM
Hmm - I tried ping and, when it didn't work, assumed networking didn't work - rookie mistake  :-[

That being said, the networking is so slow as to be unusuable - when trying "tce-load -w flwm", wget times out.

Edit: scrub that, the repo was down - it works on one of the mirrors
Title: Re: Howto: qemu with networking
Post by: Juanito on April 11, 2016, 03:05:06 AM
Continuing the <ahem> howto...

To share files between host and guest:

On the host use the following with nfs-server:
Code: [Select]
# echo '/mnt/nfs *(fsid=1,rw,no_root_squash,async,no_subtree_check,insecure)' > /usr/local/etc/exports
..and on the guest with nfs-client:
Code: [Select]
$ sudo mount.nfs -o nfsvers=3 10.0.0.2:/mnt/nfs /mnt/nfs