Installing CentOS in a Virtual Machine

In the process of experimenting with CentOS I decided to virtualise the OS in order to make rollback and documentation of setup/administration processes easier.

Here is a brief outline of the steps required to install CentOS into a Parallels Desktop Virtual Machine:

  1. Launch Parallels Desktop
  2. Add a New Virtual Machine
  3. Install Windows or another OS from DVD or image file
  4. Use a browser to go to the list of CentOS mirrors
  5. Select the closest mirror to you and click HTTP
  6. Navigate to ../pub/centos/6.3/isos/x86_64/
  7. Download CentOS-6.3-x86_64-netinstall.iso
  8. Switch back to Parallels and Install from: Choose an image file…
  9. Select the saved copy of CentOS-6.3-x86_64-netinstall.iso
  10. Select More Linux > CentOS Linux
  11. Rename the VM to something sensible (eg “CentOS 6.3”)
    1. Don’t be tempted to “Customise settings before installation” at this point in order to, for example, give the VM the same number of CPUs and Memory as your production machines have
    2. If you do then later on you will probably be given a warning about not having enough RAM for a graphical configuration… and will be forced to continue with a more complicated text-based configuration
  12. Continue and the CentOS installer takes over from here
    1. Install
    2. Skip media tests
    3. English language
    4. US keyboard
    5. Installation Method:  URL
    6. Accept default TCP/IP settings
      1. I always get a Network Error at this point on my first attempt
      2. Retry and it gets through the second time
    7. Type the full URL from your browser’s address bar, for example:  http://mirror.internode.on.net/pub/centos/6.3/isos/x86_64/
      1. now replace isos with just os (the files you need at this stage are in a different directory)
      2. ../pub/centos/6.3/os/x86_64/
    8. The installer retrieves the install.img
    9. The CentOS 6 configuration GUI should now kick in
    10. Basic Storage Devices
    11. Yes, discard any data
    12. Just Configure Network to check and make sure that eth0 will Connect Automatically — it should be the default and always has been as far as I can tell
    13. Select your nearest city for timezone purposes
    14. Enter a root password
    15. Use All Space
    16. Select the Basic Server set of software (more info) and do something else as it downloads and installs hundreds of packages
    17. Reboot
  13. Shut Down the VM
  14. Make changes to your VM’s configuration (using the cog in the bottom-right corner) to give it the same amount of Memory and number of CPUs as your production machines have.
  15. All done!
Advertisements
This entry was posted in Stuff and tagged , , . Bookmark the permalink.

9 Responses to Installing CentOS in a Virtual Machine

  1. Maashu says:

    Thanks so much, this worked perfectly today with CentOS 6.3! I actually didn’t get the error you got in step F.

  2. zorzal says:

    Over a year after your post, still works *to the letter*. Used your directions to install Centos 6.5 64 bit on Parallels 9. Chose Database Server, everything worked without a glitch, or a distraction. Thanks for sharing: the process is not in any way hyper-complex, but it has the usual default booby-traps typical of Linux, and your directions were complete enough to overcome them. I didn’t get network errors either. Cheers!

  3. Seeram says:

    Thanks for sharing concise steps. Worked flawlessly for Centos 6.5 on parallels 9. No errors to report. Thank you!

  4. Larry says:

    Have you ever created another partition with the CentOS install you created on Parallels?

    • Tim says:

      I’m not sure I understand the question. Do you mean to create another partition _within_ the CentOS install (whilst it it running) or clone the virtual partition to a physical one or something else entirely?

  5. Geoffrey says:

    Excellent process outline. Still holds up after almost 2 years. Installed CentOS 6.5 64-bit under Parallels 9. No problems, no errors. Thank you!

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