Ok...first off I apologize for wasting bandwidth this morning looking for 
help...blame it on Sunday morning laziness. After googling and trying things I 
got my qemu working w/XP finally. The undeadly article is great but isn't as 
complete as it could be. Hopefully this will fill in the cracks for any of you 
out there that want to get qemu going ASAP to start using virtualization on 
OBSD ;) Here it is cut and dry:

### Install ###
1) qemu-img create -f qcow xp.hd 4G #### Create image
***** make sure xp.hd is writable by the owner running qemu (otherwise you 
can't partition the drive in Windows Install) ******
2) qemu -m 384 -cdrom XP.iso -boot d -monitor stdio xp.hd #### Boot iso image 
as if it was on a cdrom

### Setup networking ###
3) Update /etc/sysctl to enable forwarding:
net.inet.ip.forwarding=1

4) Create /etc/hostname.tun0 with the following:
link0 up
inet 192.168.0.1 255.255.255.0

5) Create /etc/pf.conf with this or something similar:
internal = "tun0"
external = "ipw0"

set loginterface $external
scrub in all

nat on $external from $internal:network to any -> ipw0

pass quick on lo0 all flags any
pass in quick on $internal proto icmp all keep state
pass in quick on $internal from $internal:network to any keep state
pass out quick on $internal from any to $internal:network keep state

pass out quick on $external proto tcp all modulate state
pass out quick on $external proto { udp, icmp } all keep state

block quick all
### starting Qemu ###
6) sudo qemu -m 384 -monitor stdio -net nic -net tap xp.hd

That's it !!! No qemu-ifup script needed. Obviously you assign XP (or whatever 
OS you install) an IP in the 192.168.0.0/24 network and you're golden. This is 
a virtual network...so changing it is as easy as changing your hostname.tun0, 
pf.conf, and the IP in the OS you're running as a virtual. My only dilemma is 
that I run dhcp on two external interfaces and I don't want to change DNS 
servers on my virtual every time I move. I think I'm going to work on running 
dhcpd on tun0 and script a DNS IP harvester for dhcpd to assign the same DNS 
servers as the host. There's always more to do ;) Enjoy...

Reply via email to