LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 03-22-2010, 07:03 AM   #1
umwai
Member
 
Registered: May 2008
Location: Sri Lanka
Distribution: Ubuntu
Posts: 57
Blog Entries: 1

Rep: Reputation: 16
Question how to boot from a virtual machines disk


I've installed a virtual machine on my computer. and I want to boot from its hard disk(which is on my /home/xen/domains/test1/disk.img). what I need is create a grub entry for this. please tell me the steps
 
Old 03-22-2010, 07:58 AM   #2
vinaytp
Member
 
Registered: Apr 2009
Location: Bengaluru, India
Distribution: RHEL 5.4, 6.0, Ubuntu 10.04
Posts: 704

Rep: Reputation: 55
By /home/xen/domains/test1/disk.img I may assume you are using Xen for Virtualization.

If you have already installed the VM, then boot it by pressing POWERON button if you are using Virtual machine manager. I could not really understand what is your difficulty in switching on the VM ?

You need to boot through xen kernel when your machine boots.

Please try to give more details about your problem. By the by which distro are you using ?

Last edited by vinaytp; 03-22-2010 at 08:02 AM.
 
Old 03-22-2010, 08:11 AM   #3
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Servers: Debian Squeeze and Wheezy. Desktop: Slackware64 14.0. Netbook: Slackware 13.37
Posts: 8,528
Blog Entries: 27

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
Quote:
Originally Posted by umwai View Post
I've installed a virtual machine on my computer. and I want to boot from its hard disk(which is on my /home/xen/domains/test1/disk.img). what I need is create a grub entry for this. please tell me the steps
Do you mean that you want to boot the .img file on the real hardware?
 
Old 03-22-2010, 04:20 PM   #4
jefro
Guru
 
Registered: Mar 2008
Posts: 11,116

Rep: Reputation: 1362Reputation: 1362Reputation: 1362Reputation: 1362Reputation: 1362Reputation: 1362Reputation: 1362Reputation: 1362Reputation: 1362Reputation: 1362
Since I am confused a bit here, lemme ask this.

Are you trying to get the img to boot when the computer powers on?
 
Old 03-22-2010, 10:25 PM   #5
umwai
Member
 
Registered: May 2008
Location: Sri Lanka
Distribution: Ubuntu
Posts: 57
Blog Entries: 1

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by catkin View Post
Do you mean that you want to boot the .img file on the real hardware?
Yes. Is there a way to do that ?
 
Old 03-23-2010, 12:59 AM   #6
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Servers: Debian Squeeze and Wheezy. Desktop: Slackware64 14.0. Netbook: Slackware 13.37
Posts: 8,528
Blog Entries: 27

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
Quote:
Originally Posted by umwai View Post
Yes. Is there a way to do that ?
To the best of my knowledge it is not possible.
 
Old 03-23-2010, 01:08 AM   #7
Absent Minded
Member
 
Registered: Nov 2007
Location: Washington State U.S.A.
Distribution: Debian testing
Posts: 74

Rep: Reputation: 21
ISOLinux offers some the ability to boot from a Linux hard drive image. I am not sure if you could manipulate it to boot your VM image but i think it is about your best shot.
 
Old 03-23-2010, 01:25 AM   #8
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Servers: Debian Squeeze and Wheezy. Desktop: Slackware64 14.0. Netbook: Slackware 13.37
Posts: 8,528
Blog Entries: 27

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
Quote:
Originally Posted by Absent Minded View Post
ISOLinux offers some the ability to boot from a Linux hard drive image. I am not sure if you could manipulate it to boot your VM image but i think it is about your best shot.
If it can be done, there may be issues with the OS in the .img file finding itself running on different hardware depending on whether it is booted in the real computer or a virtual machine. If the OS is Windows, these issues will be significant; if it is Linux it will probably be OK perhaps with a few small adjustments, depending on how generic the kernel is. It would be prudent to back up the .img file before experimenting.
 
Old 03-23-2010, 03:03 AM   #9
frieza
Senior Member
 
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,078

Rep: Reputation: 368Reputation: 368Reputation: 368Reputation: 368
theoretically possible but probably not feasable, though if the /boot partition and initrd were on a real partition maybe possible in theory if you could make linux think the disk image were a block device but probably would require far more work then it's worth to accomplish if even possible
 
Old 03-23-2010, 03:07 PM   #10
jefro
Guru
 
Registered: Mar 2008
Posts: 11,116

Rep: Reputation: 1362Reputation: 1362Reputation: 1362Reputation: 1362Reputation: 1362Reputation: 1362Reputation: 1362Reputation: 1362Reputation: 1362Reputation: 1362
Might look at grubfdos. I know it can boot iso's on a usb so I guess it could boot a similar image on a hard drive.
 
Old 03-23-2010, 10:06 PM   #11
umwai
Member
 
Registered: May 2008
Location: Sri Lanka
Distribution: Ubuntu
Posts: 57
Blog Entries: 1

Original Poster
Rep: Reputation: 16
Smile how ubuntu boots inside windows

Ok. Do any one know how ubuntu boots when it is installed inside windows. If you have installed like that please post the menu.lst or grub.cfg so we can see how it is done in grub.
 
Old 03-23-2010, 11:25 PM   #12
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Servers: Debian Squeeze and Wheezy. Desktop: Slackware64 14.0. Netbook: Slackware 13.37
Posts: 8,528
Blog Entries: 27

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
Quote:
Originally Posted by umwai View Post
Ok. Do any one know how ubuntu boots when it is installed inside windows. If you have installed like that please post the menu.lst or grub.cfg so we can see how it is done in grub.
A lot of information here. Ask again if you get stuck.
 
  


Reply

Tags
boot, grub, virtual machine, xen


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Connect two virtual linux machines via virtual USB or serial WebBeing Linux - General 4 07-22-2008 07:26 AM
Virtual Machines badsheriff Linux - Newbie 9 07-20-2008 04:44 PM
Converting a Dual Boot Box and Network Into Virtual Machines Woodsman Slackware 2 04-18-2008 10:28 PM
Is it better on dual boot,trible boot,quad boot rather than virtual machines? pleasehelpme Linux - Newbie 3 12-15-2007 12:04 PM
Virtual machines and dual boot Diego Torquemada Linux - General 1 04-20-2007 07:52 AM


All times are GMT -5. The time now is 12:45 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration