Sie sind auf Seite 1von 10

###################################################### # # # GOOD VM HOW-TO FOR OSX (will show windows later) # # # ####################################################### Download Q Download TinyCore ##### Build

'base-sys' version ##### First, we'll build a barebones TinyCore VM and save it so we can build off it later. Open up Q and add a new guest pc. I called this one 'base-sys' since it is what I'll base everything on.

Now you'll need to congure the VM. I like using: no lesharing, default qcow2 Hard disk, Samba, and SSH. If you're wondering qcow2 is a le format for QEMU (the emulator we're using here) that expands as the partition reaches its max capacity (kind of like the expanding blob). Using 4gb of space for our system is really huge though, so I don't think the VM will ever even come close to that size.

For the CD-ROM section make sure to point to the .iso le of TinyCore you downloaded. Set the 'Boot from' to CD-ROM also. ##### Install tinycore for persistance ##### Start up the system and select the default boot. Go down and open up the terminal and download the tiny core installer with this command:

[code]tce-load -wi tc-install.tcz [/code]

After the application downloads, click the installer on the bottom right and choose whole disk format on sda1. Then set the "Boot options reference list" to "noswap kmap=qewrty/us opt=sda1 home=sda1 host=BridgeNet". Finish it up by hitting proceed.

Try entering "backup" on the command line. It should now backup the OS to sda1. If not, set the backup option (inside control panel) to sda1. Now exit out with "exittc" and backup on logout and choose reboot. After rebooting the system should be backing up to sda1! ###### SAVE THIS NOW!! ##### This is a pretty good stopping point for the system. By saving this harddisk and building new virtual systems off of it, you'll have a nice fallback for yourself if you ever need to start from scratch with the server again. ###### Build a new virtual OS ###### Go into ~/Documents/QEMU and select the base-sys.qvm le. Right click this by either holding down two ngers on the trackpad and clicking with your thumb (for MacBooks) or holding 'ctrl' while you click. Select 'Show Package Contents' from the list that pops up. Select 'Harddisk_1.qcow2' and copy that into the QEMU folder. Now we'll build a VM similar to before but with a few changes in the conguration. For the Hard disk choose the Harddisk_1.qcow2 that was just made, set CD-ROM to No, and boot from

Harddisk.

Start the VM to see if it's working. If Q creates the spinning wheel of death and force quitting doesn't solve it, try restarting. Sometimes this happens on the rst boot but it will never do it again after that. ##### Export #### The drive should now be ready for exporting so it can run as a standalone VM. To do this, go to 'Guest PC' on the top menu bar and click 'Export Guest PC to Flash Drive'. The VM will now run on your computer but it's not actually standalone quite yet.

Open the new VM le by right-clicking like before. The rst le we'll edit is info.plist. Change the Executable le from i386-softmmu to BridgeNet. Move to /Contents/Resources/Guest/BridgeNet.qvm/conguration.plist and open this le up. get to the About > Arguments line, highlight it, and dump the text into a text edit le. Add a few arguments to the line (look at the picture above) and then copy this back into the plist le. While

you're here, delete Harddisk_1.qcow2 because its a faulty le and copy over the Harddisk_1.qcow2 le that was originally made in the step 3.

Go to /Contents/Resources/Guest/arguments and edit this. Just like above we'll add some text (see picture).

Ok, we're almost there! Now make a basic text le with Text Edit (Format > Make Plain Text). Write this little bash script in:

#!/bin/bash cd "${0%/*}" ./i386-softmmu -hda ../Resources/Guest/BridgeNet.qvm/Harddisk_1.qcow2 Save this as 'BridgeNet.sh' to your Desktop. Drop this into /Contents/MacOS. #### Make An Executable File #### Now for the trickiest part of the process. To make an executable we'll need to run a special script (chmod +x doesn't get it done). Open up another basic text le with Text Edit and dump this bash script in: #!/bin/bash # makeexec.sh # # changes the le type to "Unix executable le" # by cat and chmod +x if [ -z "$1" ]; then echo usage: $0 directory exit for var in "$@" do if [ -f $var ]; then newname=${var%.*}; cat $var > $newname chmod +x $newname done exit

Save this as makeexec.sh to the Desktop. Open Terminal up (did you really think you could do everything with the command line?) and enter these lines to allow makeexec.sh to build a BridgeNet executable le:

cd Desktop sudo chmod +x makeexec.sh ./makeexec.sh ~/Desktop/BridgeNet.app/Contents/MacOS/BridgeNet.sh Now the BridgeNet le should pop up in /Contents/MacOS. From this point on your VM will actually run in standalone mode. This means you can dump it on any OS X computer and it should run just ne. It even works on public OS X computers, which is helpful if you have it stored on a ash drive.

##### Windows? #### download

Das könnte Ihnen auch gefallen