How-to: VMware player modification

VMware
Last week the free VMware player was released. It lets you run virtual machines, but not create them. [Faileas] contributed today’s how-to for creating your own virtual machines.

Programs required to carry out hack:

  1. Copy of VMware Player

  2. Browser appliance or another virtual machine(browser appliance is the smallest one, by size, and thus I am using that)

  3. Notepad or other text editor

  4. ISO image or CD/floppy of FreeDOS (I’m using the ripcord distribution) or MSDOS 7.1 would work as well, but i haven’t tried it yet.

  5. Replacement OS (must have SCSI HDD support)

Once you’ve downloaded the browser appliance or whatever image you intend to use, the first step is to open up and edit the browser-appliance.vmx file. I used notepad for this, though any text editor should do.

I’d reccomend changing the settings as needed, though these are what i suggest. Change the value of memsize to 64 from 256. For most operating systems this is sufficient and you can change this later as needed.

Part 1: Using an ISO
The image i am using has been setup to use the physical CD-Rom drive of my system. Not really desireable when you want to install from a downloaded ISO. While using daemontools, or a similar CD mounting program is an option, a more elegant method would be to use VMware player’s own ability to read ISOs.

At this point i suggest saving and making a copy of the browser-appliance.vmx file, since it might be desireable to use a physical CD-Rom drive at a later point of time.

To do this replace:
ide1:0.fileName = "auto detect"
ide1:0.deviceType = "cdrom-raw"

with:
ide1:0.fileName = "C:targetcd.iso"
ide1:0.deviceType = "cdrom-image"

Where C:targetcd.iso is the location of the disk you intend to use. Once this is done, save the edited vmx file and run it.

Part 2: Removing the current OS

Now, at the startup screenstart screen
press escape and choose to boot from the CD drive at the next screen. If all goes well, you should be greeted by
boot
where you should choose to boot from CDrom. From there menu
choose to boot to the second option “FreeDOS ** FAT32. At the next screentoreto
pick the first option, to “boot with el toreto cd rom driver” (default)driver
and then the second option, to run FreeDOS from CD command prompt.

Now the fun part

Comments

  1. hex4def6 says:

    Now the next thing to do would be to create a portable version of the vmware player, so that you can have the image and player on a flash drive / other portable storage. Anyone attempted doing that?

  2. I do know something similar has been done with small distributions of linux, but I don’t know it’s been done with vmware specifically.

  3. Pyr0 says:

    Works great with ubuntu. After step one you can install it normally. Get the .iso here: http://www.ubuntu.com/download/

  4. vbrtrmn says:

    CAKE! I’m installing Ubuntu onto my virtual drive now… will be installing OSX, once I get a good IMG.

  5. n3ldan says:

    Not bad, not bad. I’ve been using VMware Workstation 5, it’s great. I run it inside linux, so when I *need* windows support I can have it. Just need to stick it on my iPod so I can use linux at school…..

  6. confused says:

    i don’t want to sound too stupid, but what is this for?

  7. george says:

    I think the point of this is you can make your own virtual machines with a free program (vmware player) and not have to pay a crapload or pirate the vmware workstation or server software. Its a win win.

  8. The vmware player poses great potential for modification of exsisting files. If someone would write a howto on editing your own files. If some one create a site then it could, in effect, create a free vmware for hardcore geeks.

  9. flaunt_dzx says:

    The “browser appliance” comes with ubuntu linux,gnome, and firefox. It’s a great setup.

    Thanks for the hack! I’m sure it’ll come in handy.

  10. Ixje says:

    awesome one :) *bookmark*

  11. covert.entity says:

    “…comes with ubuntu linux,gnome, and firefox”

    I have ubuntu running on my desktop and I was very confused when I opened vmplayer and ubuntu started loading. I thought it was reloading my OS in a window.

    BTW, if you are running Ubuntu 5.10, you will have to run the following command:

    apt-get install gcc-3.4 g++-3.4

    You might need to do some more as well… a quick search for vmplayer on the ubuntu forums will yield results.

  12. Tom61 says:

    Hmm… I wonder if I can get Windows going well enough using VMPlayer under Linux to use Launchcast. I’ve had no luck getting Launchcast to work under QEmu or WINE.

  13. bryan says:

    So how would I set up an xp instance under ubuntu or fedora? Also, does any one know how this will work with 64 bit stuff?
    -bryan

  14. Faileas says:

    Considering i wrote this :)

    #1- been thinking about that. VMware uses its own drivers to hook onto the host system’s networking so its a little tricky. If i figure it out, i’ll be sure to let you know.

    I do believe that technically you *could* make a live CD with VMware player for linux, and add in the appropriate drivers for accessing images from a HDD(maybe Knoppix?).Its a total cludge IMHO, but could work.

    Ravi “Faileas” Mohan

    #5-Its a workaround for some functionality missing in the free version of VMware.

    #7- i’m going to be working on that next holidays and trying to document the VMware player’s config files, and methods of editing the HDD images(IE adding in files into the client from the host).

    #12- If the processor on the host is 64 bit,you can run 64 bit operating systems. The process is almost the same on linux, and you can, by editing the config file to point at a windows ISO, or windows install cd, get XP on it. In fact, i have (thanks to one of my computers getting fried) a stripped down (using http://www.nliteos.com/ nlite to modify the cd to remove unwanted components) install of windows XP running happily on 64 megs of ram on VMware, so yeah, it works, and is pretty much the same as installing any other OS

  15. brakjoller says:

    I got so far that I could start installing Windows XP, but some minutes into the installation it complained that I did not have any hard drives. Any idea on which step I did wrong or is this a XP-only issue?

  16. Faileas says:

    #14: i did some checking up, apparently windows XP lacks the SCSI drivers that VMware virtutal SCSI hdds need.

    http://www.vmware.com/support/reference/common/guest_win_scsidrv.html

    you can download the driver from there, edit the line in the config file from floppy0.fileName = “A:” to point to the driver image, and when installing tell the win XP installer that you need additional SCSI drivers. I haven’t had a chance to test this out personally, but it should work.

    alternately you could find a IDE based disk image, such as the syllable OS disk image ( http://www.fprintf.net/atheos/atheosvm.html ) uses, and use that directly

  17. light says:

    If I remember right #14, Win XP can have problems when trying to use non standard SCSI drivers during install (it prefers IDE drives.) I think there is some way to work around it by picking an option to load the driver from a floppy at install, but I’m not sure how that would work through VMware. Someone correct me if I am wrong however.

  18. deltaf says:

    The syllable vm rocks! #16 was right-on. I think the key to hacking success will be in the proper documentation of the vmx and vmdx files. So far, I think they’re not documented too well because everyone has relied on the official tools to create the files for them.

    Any links to the specific files format values are welcome.

    Some interesting links I’ve found:
    VMware files: http://www.vmware.com/support/ws5/doc/ws_learning_files_in_a_vm.html
    Some tools and links: http://chitchat.at.infoseek.co.jp/vmware/index.html
    VB/GUI front-ends to official tool console apps: http://petruska.stardock.net/software/VMware/index.html

    Thanks to VMWare for opening the door to us hackers in a somewhat legitimate fashion. I forsee a lot of converts. My experiences so far will probably allow me to get rid of a computer or two that I use for client/server testing.. The money saved may very well go into a full version of this software!

  19. bryan says:

    I just popped my fedora core four dvd in, hit escape, and booted from cd. It is installing over the ubuntu stuff right now, no problems. How does VMware work for graphics? ex: have vmware player running xp under fedora, how would 3d and fast graphics look?
    -bryan

  20. It was only a matter of time until someone did this. I’m glad you guys were quick about it. This should be fun. :)

  21. Rhys says:

    Hey, Incase you don’t read slashdot? You can use QEMU-img.exe to create VMDK(VMare virtual disk files meaning you don’t need to download the browser image. Also I think this will create files that can be used as ide drives.

    Quick and easy:
    1 Download the the vmplayer
    2. create a vmdk disk file like this:
    qemu-img.exe create -f vmdk
    3.Create a vmx config file. Here are the basic options you need:

    config.version = “8”
    virtualHW.version = “3”
    memsize = “128”
    ide0:0.present = “TRUE”
    ide0:0.fileName = “DiskFile.vmdk”

    ——-TO BOOT AN ISO———-
    ide1:0.present = “TRUE”
    ide1:0.fileName = “c:debian.iso”
    ide1:0.deviceType = “cdrom-image”
    ———————————–
    OR
    ——-TO BOOT CDROM———–
    ide1:0.present = “TRUE”
    ide1:0.fileName = “auto detect”
    ide1:0.deviceType = “cdrom-raw”
    ———————————
    floppy0.fileName = “A:”
    ethernet0.present = “TRUE”
    ethernet0.connectionType = “nat”
    usb.present = “TRUE”
    sound.present = “TRUE”
    sound.virtualDev = “es1371″
    displayName = “Debian 1″
    guestOS = “other24xlinux”
    nvram = “debian1.nvram”
    scsi0:0.redo = “”
    ethernet0.addressType = “generated”
    uuid.location = “56 4d f3 a5 03 8c cb b9-ed bb 8f 10 a3 de b0 10″
    uuid.bios = “56 4d f3 a5 03 8c cb b9-ed bb 8f 10 a3 de b0 10″
    ide1:0.autodetect = “TRUE”
    ethernet0.generatedAddress = “00:0c:29:de:b0:10″
    ethernet0.generatedAddressOffset = “0”
    checkpoint.vmState = “”
    tools.remindInstall = “TRUE”
    ide0:0.redo = “”

    Now just run up the vmx file in the player. Boot the cdrom/iso and install the os as usual.

    EasyAs!
    Cheers,
    Rhys

  22. pman says:

    so..does this let me run a virtual copy of mac osx on my windows xp machine?

  23. LEMMYSLENDER says:

    Thanks rhys (21),
    Used QEMU created a 1GB virtual drive, created a vmx file for it and booted from a live cd image (slax). Now I have a place to store settings for slax (virtual hard drive). The empty drive takes up less than a 0.5MB which will grow as I add files, not an 800MB image. With VMPlayer installed on the machines I use, I could fit my new Slax iso image and a virtual hard drive on a 256MB thumb drive. Which will run much faster than using QEMU, etc.

    Also if you enter the bios setup you can set it to boot from the CD-ROM first automatically.

  24. covert.entity says:

    #22 (pman)

    No, not with the PPC version at least. Maybe the x86 version is supported, although I doubt it.

  25. deltaf says:

    To #22 & #24, yes tiger_x86 booted for me, first try. It was very slow and I had some glitches in the font rendering.

    I don’t know if it was a glitch in the image, a hardware conflict that required some 3D acceleration that I didn’t have, or what..

    Then I realized I don’t care about osx and dumped it all. ;)

    Thanks for the qemu link!

  26. Ben Hiller says:

    Hah, my school blocks your site under the category of \’hacking\’.

  27. flaunt_dzx says:

    22&24 It looks like VMware is emulating a 440bx motherboard. I think the motherboard that apple was shipping was a i915G. That may be a problem.

    I think it will mostly have to do with your processor supporting sse2 and sse3 though.

    If someone has an image of osx x86 they should try it and let us know.

  28. flaunt_dzx says:

    Actually, if I’m not mistaken, it looks as if the image that everyone is downloading to install os x is a vmware image.

    I’d have to say it may work then.

  29. grundlebug says:

    You could also just download the fully functional VMWare Workstation demo, create your virtual machine, and then use the player to run it after the 30 day evaluation period is up on the full version.

  30. gtoal says:

    Has anyone noticed that although the VMware player site says you can only run one image at a time, that’s not in fact true! Just by double-clicking on the container files, you start up another copy of the program and can run as many images as you want simultaneously. By the way I had a WinXP image left over from an expired trial download and it ran fine in the player. Saved all changes etc, just as good as the full program. I wonder if they’ll dumb it down when it comes out of beta – I think they may not have realised just how much they were giving away :-)

  31. pau1 says:

    still no joy on the scsi drivers. I have tried two different drivers (provided by vmware) so far: vmscsi-1.2.0.2.flp and VMware-BusLogic-SCSIDriver-1.2.0.0.flp. However, the Ubuntu VM is telling me that I have a LSI Logic / Symbios Logic 53c1030 PCI-X Fusion-MPT Dual, so it’s probably NOT the second one. Also, all the tips on qemu-img are crapping out because it reports back as an invalid format. would love to get 2000 / xp running on this…

  32. Gurubuckaroo says:

    I’ve got the qemu-img volume working just fine, no SCSI drivers required. I’ve got two images running on my XP machine – a 2000 server and a FreeBSD server, both using 8G virtual disks and 128M memory, bridge-mode networking. Couldn’t be smoother. The instructions for running the qemu-img command were a touch lacking – the actual command line is:
    qemu-img create -f vmdk filename.vmdk 8G
    (or whatever size/filename you need). Worked perfectly (at least under XP pro). Make sure you customize the .vmx to point to seperate nvram and vmdk files, include ONLY the CD section you need (attached to real drive or image, not both), then just double-click on the .vmx.

  33. Here is the link to Qemu for the Qemu-img program

    For windows: http://www.h7.dion.ne.jp/~qemu-win/
    For Linux: http://fabrice.bellard.free.fr/qemu/download.html

    For Mac Users I dont think this applies sorry.

  34. I forgot to mention that you will have to download the full package (qemu-0.X.X) as the img program is not distributed by its self.

  35. Faileas says:

    #31
    try the athena disk image on #16

  36. John Bokma says:

    A little howto based on stuff I read here (installing XP Pro, but also works for Win2Kpro):http://johnbokma.com/mexit/2005/10/26/vmware-player-windows-xp.html

  37. spaz says:

    So for those of you who are lazy (like me) i created an image using directions provided by Rhys (#21). The image is a 100GB disk and has a vmx file that is the default provided above(CD is .iso)

    http://www.blankstare.net/blank.zip

    The file is about 12MB extracted, and 22KB compressed. Enjoy.

  38. Les Mikesell says:

    Does anyone know if it is possible to coax vmware player into using the native partitions of a dual-boot Windows/Linux setup?

  39. jp says:

    is there a way to make it so that I can access my VM from different computers. When I try to access my VM which is on an ipod from a computer different from the one that I created it on the initial screen will display but I can’t do anything to interact with the VM.

  40. pau1 says:

    I can confirm that post #21 works great for creating an image and installing Windows 2000. Just need to get the video drivers now. Usually they come with vmtools and are part of the VM Workstation package. Any idea how I can get them otherwise? Also, in response to #39’s post… you may want to check and make sure the drive your vm lives on is compatible with VMPlayer. I was using an ext2 drive mounted under Windows 2000 (using ext2fsd drivers) and it just would not work. Put it on an ntfs partition, and all was good.

  41. Ciosciammocca says:

    Really quick, all I did was make the changes below and it worked:
    replace:
    ide1:0.fileName = “auto detect”
    ide1:0.deviceType = “cdrom-raw”
    with:
    ide1:0.fileName = “an iso of an os right on the root of C:”
    ide1:0.deviceType = “cdrom-image”

  42. Chui Tey says:

    In reply to post #38. This site on VMWare deals with booting from a raw disk. I haven’t tried it though.

    http://www.vmware.com/support/ws45/doc/disks_dualboot_ws.html

  43. Borgel says:

    How is it exactly that you can transfer files INTO to virtual machine. I cant get the virtual machine to see a flash drive and I wan to throw some files back and forth.

  44. rich says:

    I an tring to boot off an Longhong.iso but its a DVD image. I have tried the above configurations, but no luck. I am able to use a CD image(XP).
    Any suggestions.

  45. nugget says:

    DSL does something with quem or however its spelt to run from a jump drive. You could go check out their site and ask them if they have any tips for you. damnsmalllinux.org I belive if not a google search should turn something up for you.

  46. eliphas says:

    hello I am quite new to vmplayer and I was wondering if I choose the option in fdisk to delete my non-dos partition.
    I am goign to really format it and then loose all my datas on that partition? as i use my computer for work it will be hoffic to loose those data.

    Thanks for you help.

  47. eliphas says:

    hello I am quite new to vmplayer and I was wondering if I choose the option in fdisk to delete my non-dos partition.
    I am goign to really format it and then loose all my datas on that partition? as i use my computer for work it will be hoffic to loose those data.

    Thanks for you help.

  48. Jriff says:

    “One limitation is that you cannot use this disk image to install an OS without SCSI support.”

    I don’t seem to undestand why SCSI support is nessary for this to work? Dosn’t VMware support virtual IDE disks?

  49. Flisher says:

    the image of the hard disk, is a 10g scsi.

    even virtual, the drive is a scsi emulated one.

    BTW, is there any way to “shrink” a disk image?
    I mean if the file is 2g big, but you flush all file, the file on the hard disk is still 2g.

  50. Faileas says:

    #47
    Quite simply because the disk i was working off was scsi based. The method that was suggested later (to use QEMU instead to create the disks) bypassed that, but quite simply i was “stuck” with a scsi disk.

    it should however work with an IDE image as well, though a great deal of what i ended up doing could be bypassed

    #45/46
    I assure you in the method i was using its totally safe. You need to think of it as a computer in a computer and whatever you do in the VM (or in VMplayer) should not affect the rest of your system.

    Though, i think the QEMU based method, together with the script provided in a later hackaday links post seem to be a better way to do it, once you figure out the config file.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 96,657 other followers