the Fink Wiki:VMWare

From the Fink Wiki

Jump to: navigation, search

17-Sept-2005 - Maxxuss has created a Darwin/x86 VMware NIC Driver: http://maxxuss.hotbox.ru/pcnet.html

It's proven itself to be quite stable over the last few days of testing!


This describes how to install Darwin on VMWare 5.x and get IP networking between a Darwin virtual machine and Linux in another virtual machine (Fedora Core 4 used in this example, but it should be applicable with any unix that works in vmware, supports the vmware virtual network interface, and has pppd). Once packets are flowing between the two machines, they can be either NATed or routed out to the internet at large through the Linux virtual machine.

The OSX86Project.org folks have a wiki on installing Darwin on VMWare. Since the process is not at all intuitive, it is a very useful wiki. I will post the abbreviated steps below for getting darwin8 installed on vmware 5.x, and you should visit their wiki for detailed instructions. http://wiki.osx86project.org/wiki/index.php/Darwin_on_VMware I used the osx86project wiki while getting Darwin 8 installed on vmware when I first started, and this will draw heavily from theirs.

Installing Darwin8 on vmware:

  • Read the Darwin release notes here: http://www.opendarwin.org/downloads/8.0.1/release-notes-8.0.1.txt
  • Make sure your host CPU supports the SSE2 extensions. You'll need a Pentium 4 or an AMD processor better than the Athlon XP.
  • Get the Darwin 8.0.1 install CD from http://www.opendarwin.org/downloads/8.0.1/
  • Create or use an existing virtual machine running Linux.
  • Add a serial port to the Linux virtual machine, output should be a named pipe (the default name of \\.\pipes\com_1 is fine). This virtual machine will be the client, and the other end will be a virtual machine.
  • Create a vmware virtual machine for Darwin with at least 128MB of ram.
  • Add a serial port to the Darwin virtual machine, output should be a named pipe (the default name of \\.\pipes\com_1 is fine). This virtual machine will be the server, the other end will be a virtual machine.
  • Attach the darwin install iso to the Darwin virtual machine's cdrom device.
  • Boot the Darwin virtual machine off the cd.
  • We will procede with the Darwin installation as described at osx86project.org's wiki describes, with the following paraphrased instructions: 1) When it prompts for which device to install onto, press 1 to install onto the first virtual hard disk (should be the only one on the machine).
    2) When it asks about partitioning the hard disk, press 2 to manually partition.
    3) When in the fdisk program, issue to following commands:
    auto hfs
    update
    write
    quit
    

    4) Use hfs when formatting the filesystem, and procede normally.
    5) It will complain about an unknown filesystem type. That is fine, and have the machine reboot.
    6) Make sure the virtual machine boots off the CD again and we re-enter the installer
    7) When prompted for which device to install onto, press 1 again for the first (and only) virtual hard disk.
    8) When prompted for partitioning the device, press 3 to use existing partitions
    9) Continue with the installation normally (choosing the HFS filesystem again).
    10) When done, disconnect the install cd image and restart the virtual machine to boot into darwin 8.

  • Once you've successfully logged into the new darwin 8 virtual machine as root, you can set up the networking between Darwin and Linux.
  • Make sure both darwin and linux virtual machines are booted, and you've logged into them.
  • On the Darwin machine, issue the following command:
    pppd /dev/tty.builtin-serial1 115200 noauth crtscts passive asyncmap 0 10.6.6.1:10.6.6.2
    

    On the Linux machine, issue the following command:

    pppd /dev/ttyS0 115200 noauth crtscts 10.6.6.2:10.6.6.1
    
  • If successful, you should have a ppp0 interface that is up and configured on both the linux and darwin sides of the link. Verify the link is up by pinging the other end.
  • To get packets from the darwin machine out to the internet through the linux machine, I ran the following commands (which can be added to /etc/sysconfig/iptables and /etc/sysctl.conf respectively):
    iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
    sysctl -w net.ipv4.ip_forward=1
    
Personal tools