LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how to boot from a virtual machines disk (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-boot-from-a-virtual-machines-disk-797035/)

umwai 03-22-2010 07:03 AM

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

vinaytp 03-22-2010 07:58 AM

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 ?

catkin 03-22-2010 08:11 AM

Quote:

Originally Posted by umwai (Post 3907450)
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?

jefro 03-22-2010 04:20 PM

Since I am confused a bit here, lemme ask this.

Are you trying to get the img to boot when the computer powers on?

umwai 03-22-2010 10:25 PM

Quote:

Originally Posted by catkin (Post 3907504)
Do you mean that you want to boot the .img file on the real hardware?

Yes. Is there a way to do that ?

catkin 03-23-2010 12:59 AM

Quote:

Originally Posted by umwai (Post 3908347)
Yes. Is there a way to do that ?

To the best of my knowledge it is not possible.

Absent Minded 03-23-2010 01:08 AM

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.

catkin 03-23-2010 01:25 AM

Quote:

Originally Posted by Absent Minded (Post 3908498)
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.

frieza 03-23-2010 03:03 AM

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

jefro 03-23-2010 03:07 PM

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.

umwai 03-23-2010 10:06 PM

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.

catkin 03-23-2010 11:25 PM

Quote:

Originally Posted by umwai (Post 3909888)
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.


All times are GMT -5. The time now is 04:58 PM.