Joe Armstrong
2009-Jun-05 22:58 UTC
[Xen-users] run a VM from a previous physical disk install ?
Hi All, I have a machine that was installed with WinXP, I re-sized the disk so WinXP has a very small disk and installed linux on the newly freed up disk partition. If I boot from the partition (via grub) the old windows image works just fine, but as I only need to access it on occasion I''d rather not have to re-boot my machine to get to it. So - is there a way I can use the already installed version of WinXP as an installed VM image and run it ? I tried with the following config file (at the end of this mail) but I got these errors: Booting from Hard Disk... Boot from Hard Disk failed: could not read the boot disk FATAL: No bootable device Is it just that the virtual devices in the VM are not compatible with the real devices that the image expects ? Or do I have to go and get something like PlateSpin powerconvert ? Any open-source VtoP tools ? Thanks. Joe Just in case, here is my VM config file: name = "WinXP" uuid = "694f0193-b8ec-d1ff-3d97-18731b540008" maxmem = 384 memory = 384 vcpus = 1 builder = "hvm" kernel = "/usr/lib/xen/boot/hvmloader" boot = "c" pae = 0 acpi = 0 apic = 0 localtime = 0 on_poweroff = "destroy" on_reboot = "restart" on_crash = "restart" device_model = "/usr/lib64/xen/bin/qemu-dm" sdl = 0 vnc = 1 vncunused = 0 vncdisplay = "2" disk = [ "/dev/sda2,hda,w" ] vif = [ ] serial = "pty" _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Javier Guerra
2009-Jun-05 23:05 UTC
Re: [Xen-users] run a VM from a previous physical disk install ?
On Fri, Jun 5, 2009 at 5:58 PM, Joe Armstrong<jarmstrong@postpath.com> wrote:> Booting from Hard Disk... > Boot from Hard Disk failed: could not read the boot disk > FATAL: No bootable device > > Is it just that the virtual devices in the VM are not compatible with the real devices that the image expects ?first, windows is expecting a hard disk, which starts with a boot sector and a partition table, but Xen is giving it (as per your config) a partition, with just the NTFS filesystem. i don''t know of any way to insert a suitable partition table, short of doing a full copy into a new device. -- Javier _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
David Morris
2009-Jun-05 23:07 UTC
RE: [Xen-users] run a VM from a previous physical disk install ?
I would try showing the windows guest the whole physical drive as I think windows needs to see the partition table. Just be careful to not modify the partition table or non-windows partitions from windows. disk = [ "phy:/dev/sda,hda,w" ] -----Original Message----- From: Joe Armstrong [mailto:jarmstrong@postpath.com] Sent: Friday, June 05, 2009 3:58 PM To: xen-users@lists.xensource.com Subject: [Xen-users] run a VM from a previous physical disk install ? Hi All, I have a machine that was installed with WinXP, I re-sized the disk so WinXP has a very small disk and installed linux on the newly freed up disk partition. If I boot from the partition (via grub) the old windows image works just fine, but as I only need to access it on occasion I''d rather not have to re-boot my machine to get to it. So - is there a way I can use the already installed version of WinXP as an installed VM image and run it ? I tried with the following config file (at the end of this mail) but I got these errors: Booting from Hard Disk... Boot from Hard Disk failed: could not read the boot disk FATAL: No bootable device Is it just that the virtual devices in the VM are not compatible with the real devices that the image expects ? Or do I have to go and get something like PlateSpin powerconvert ? Any open-source VtoP tools ? Thanks. Joe Just in case, here is my VM config file: name = "WinXP" uuid = "694f0193-b8ec-d1ff-3d97-18731b540008" maxmem = 384 memory = 384 vcpus = 1 builder = "hvm" kernel = "/usr/lib/xen/boot/hvmloader" boot = "c" pae = 0 acpi = 0 apic = 0 localtime = 0 on_poweroff = "destroy" on_reboot = "restart" on_crash = "restart" device_model = "/usr/lib64/xen/bin/qemu-dm" sdl = 0 vnc = 1 vncunused = 0 vncdisplay = "2" disk = [ "/dev/sda2,hda,w" ] vif = [ ] serial = "pty" _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Fajar A. Nugraha
2009-Jun-06 00:45 UTC
Re: [Xen-users] run a VM from a previous physical disk install ?
On Sat, Jun 6, 2009 at 6:07 AM, David Morris<dmorris@propel.com> wrote:> > I would try showing the windows guest the whole physical drive > as I think windows needs to see the partition table. Just be careful > to not modify the partition table or non-windows partitions from > windows. > > disk = [ "phy:/dev/sda,hda,w" ] >Yes, that would be most space-efficient. Dont forget to read this as well : http://www.virtualbox.org/wiki/Migrate_Windows There''s one caveat though: if you accidently choose linux entry (the one you''re currently booting), it could mean disaster as dom0''s filesystem will be mounted twice (on physical and virtual) and it almost always create data corruption. It''s usually best to create a new domU with its own storage. For P2V, I usually do it semi-manually with ntfsclone and ntfsreloc (works great for XP and Win2003). You could also google xen windows p2v, where one of the results is this : http://www.ruizs.org/archives/63 -- Fajar _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users