I''ve been trying to migrate a win nt 4 machine to a xen domu for the past few months with no success. However, on my current attempt, the original hardware no longer boots, so I''m trying to resolve the issues with xen properly, or else take a long holiday... Anyway, the physical machine had a 9G drive (OS drive), a 147 G drive (not in use) and a 300G drive (all SCSI Ultra320 on the same SCSI controller) Everytime, I''ve booted linux, used dd to image the original 2 drives (ignored the 147G drive), and written each image with dd to an LV This is exported by iscsi to xen The c: works fine, and I can boot properly in VGA mode (safe mode) but the 300G drive always shows as corrupt. I''ve now upgraded to win2000 in the VM, and win2000 reports the drive as healthy (hardware) but blank with no filesystem on it. However, on the xen machine, I can use fdisk to see the partition table, kpartx -a to add the partition device in /dev/mapper, and I can even mount the drive in Linux and see all of it''s contents. I suspect the problem is the way windows translates the CHS values of the drive, and so can''t see things the same way that NT could on the physical hardware. I''m at a complete loss on how to resolve this issue, or what to try/look at. If all else fails I figured to try and create a new 300G drive, format it from win2k, and then somehow transfer the files from Linux into win2k, without losing any of the permissions / etc which I guess will be somewhat challenging. Any suggestions, or advise would be greatly appreciated. Regards, Adam -- Adam Goryachev Website Managers www.websitemanagers.com.au
Hi Adam, On 18/01/13 18:31, Adam Goryachev wrote:> I''ve been trying to migrate a win nt 4 machine to a xen domu for the past few months with no success. However, on my current attempt, the original hardware no longer boots, so I''m trying to resolve the issues with xen properly, or else take a long holiday...On one of our Windows XP installs in a far off place, we found that the HAL that shipped on our Windows disc wasn''t virtualisation-friendly. This was on VMWare (not Xen) so it may not apply but we had to get a special version of XP with a different HAL.> Anyway, the physical machine had a 9G drive (OS drive), a 147 G drive (not in use) and a 300G drive (all SCSI Ultra320 on the same SCSI controller)From here on it, I will call the 9GB drive "sda", the 147GB "sdb" and the 300GB "sdc" - Please adjust anything I say if your system is different.> Everytime, I''ve booted linux, used dd to image the original 2 drives (ignored the 147G drive), and written each image with dd to an LVAre you dd-ing the Windows partition or the whole drive into the container file? I think you will get better results with the whole drive.> This is exported by iscsi to xen > > The c: works fine, and I can boot properly in VGA mode (safe mode) but the 300G drive always shows as corrupt. I''ve now upgraded to win2000 in the VM, and win2000 reports the drive as healthy (hardware) but blank with no filesystem on it.What are you passing to the VM in the "disk=[]" line please? Whatever you pass will be interpreted by Windows as a raw drive, so it can''t just be a partition, it has to have a partition table and MBR too. If you just pass a partition, you are likely to see some strange partitioning arrangement in Windows Disk management (random size partitions/free space chunks) and, in the file manager, you will see no files. The disk line should probably pass sdc, rather than sdc1, or you need to make a partition table and a partition in it using parted.> However, on the xen machine, I can use fdisk to see the partition table, kpartx -a to add the partition device in /dev/mapper, and I can even mount the drive in Linux and see all of it''s contents.I would recommend you don''t use fdisk in Linux on this kind of task. Fdisk has a nasty habit of imposing its own default CHS geometry on disks. Like, the other day, it told me the appropriate start sector for the first partition on my virtual disc was 2048 when it really should have been 63). This can lead to things not matching and may be stopping your VM from mounting the machine.> I suspect the problem is the way windows translates the CHS values of the drive, and so can''t see things the same way that NT could on the physical hardware.May well be due to what Linux fdisk did... I would recommend you try parted instead.> I''m at a complete loss on how to resolve this issue, or what to try/look at. If all else fails I figured to try and create a new 300G drive, format it from win2k, and then somehow transfer the files from Linux into win2k, without losing any of the permissions / etc which I guess will be somewhat challenging. >Some useful commands... #Create a new partition table in sdc. (change msdos to gpt if needed) parted -- /dev/sdc mklabel msdos #Make a single, primary NTFS partition filling the whole drive but don''t format it (change the sector numbers to match your real disc''s partitions) parted -- /dev/sdc mkpart primary NTFS 63s -1s Use kpartx -a to load the new pt... #build an NTFS filesystem in the new partition mkfs.ntfs -Q -L VOLUME_LABEL /dev/sdc1 Good luck, Paul.
Adam Goryachev <mailinglists@websitemanagers.com.au> wrote:>I''ve been trying to migrate a win nt 4 machine to a xen domu for the >past few months with no success. However, on my current attempt, the >original hardware no longer boots, so I''m trying to resolve the issues >with xen properly, or else take a long holiday... > >Anyway, the physical machine had a 9G drive (OS drive), a 147 G drive >(not in use) and a 300G drive (all SCSI Ultra320 on the same SCSI >controller) > >Everytime, I''ve booted linux, used dd to image the original 2 drives >(ignored the 147G drive), and written each image with dd to an LV > >This is exported by iscsi to xen > >The c: works fine, and I can boot properly in VGA mode (safe mode) but >the 300G drive always shows as corrupt. I''ve now upgraded to win2000 in >the VM, and win2000 reports the drive as healthy (hardware) but blank >with no filesystem on it. > >However, on the xen machine, I can use fdisk to see the partition >table, kpartx -a to add the partition device in /dev/mapper, and I can >even mount the drive in Linux and see all of it''s contents. > >I suspect the problem is the way windows translates the CHS values of >the drive, and so can''t see things the same way that NT could on the >physical hardware. > >I''m at a complete loss on how to resolve this issue, or what to >try/look at. If all else fails I figured to try and create a new 300G >drive, format it from win2k, and then somehow transfer the files from >Linux into win2k, without losing any of the permissions / etc which I >guess will be somewhat challenging. > >Any suggestions, or advise would be greatly appreciated. > >Regards, >Adam > >-- >Adam Goryachev >Website Managers >www.websitemanagers.com.au > >_______________________________________________ >Xen-users mailing list >Xen-users@lists.xen.org >http://lists.xen.org/xen-usersJust had a thought to try reading the drive with linux within the domU, so I booted ubuntu 11.10 to run from CD within the domU, and it fails to read the drive as well. So it seems to be xen itself is causing the drive to look different in the VM compared to in the physical machine. However, fdisk -l is identical from domu an dom0 Does anyone have any suggestions as to what else could be different? The original drive was exactly 300,000,000,000 bytes, but lvm rounded up the size of the LV, but the partition should be the same size anyway. I don''t know how to force LVM to avoid rounding the size. Any suggestions or assistance would be exceptionally helpful Regards, Adam Regards, Adam -- Adam Goryachev Website Managers www.websitemanagers.com.au
Paul Stimpson <paul@stimpsonfamily.co.uk> wrote:>Hi Adam, > >On 18/01/13 18:31, Adam Goryachev wrote: >> I''ve been trying to migrate a win nt 4 machine to a xen domu for the >past few months with no success. However, on my current attempt, the >original hardware no longer boots, so I''m trying to resolve the issues >with xen properly, or else take a long holiday... > >On one of our Windows XP installs in a far off place, we found that the > >HAL that shipped on our Windows disc wasn''t virtualisation-friendly. >This was on VMWare (not Xen) so it may not apply but we had to get a >special version of XP with a different HAL.It isn''t the HAL, since the OS boots up, I''ve had HAL problems before (can be fixed by tweaking the xen config file usually)...>> Anyway, the physical machine had a 9G drive (OS drive), a 147 G drive >(not in use) and a 300G drive (all SCSI Ultra320 on the same SCSI >controller) > > From here on it, I will call the 9GB drive "sda", the 147GB "sdb" and >the 300GB "sdc" - Please adjust anything I say if your system is >different. > >> Everytime, I''ve booted linux, used dd to image the original 2 drives >(ignored the 147G drive), and written each image with dd to an LV > >Are you dd-ing the Windows partition or the whole drive into the >container file? I think you will get better results with the whole >drive.I did something like this: dd if=/dev/sda of=/mnt/sda.img bs=8M dd if=/dev/sdc of=/mnt/sdc.img bs=8M Then, I moved /mnt drive to another machine and did: dd if=/mnt/sda.img of=/dev/vg0/machine_d1 bs=8M dd if=/mnt/sdc.img of=/dev/vg0/machine_d2 bs=8M>> This is exported by iscsi to xen >> >> The c: works fine, and I can boot properly in VGA mode (safe mode) >but the 300G drive always shows as corrupt. I''ve now upgraded to >win2000 in the VM, and win2000 reports the drive as healthy (hardware) >but blank with no filesystem on it. > >What are you passing to the VM in the "disk=[]" line please?disk = [ ''phy:/dev/disk/by-path/ip-1.2.3.4:3260-iscsi-iqn.2011-06.domain:machine_d1-lun-0,hda,w'', ''phy:/dev/disk/by-path/ip-1.2.3.4:3260-iscsi-iqn.2011-06.domain:machine_d2-lun-0,hdb,w'', ''file:/mnt/blah.iso:ioemu:hdc:cdrom,r'' ]>Whatever you pass will be interpreted by Windows as a raw drive, so it >can''t just be a partition, it has to have a partition table and MBR >too. >If you just pass a partition, you are likely to see some strange >partitioning arrangement in Windows Disk management (random size >partitions/free space chunks) and, in the file manager, you will see no >files. > >The disk line should probably pass sdc, rather than sdc1, or you need >to make a partition table and a partition in it using parted.Yep, I''m copying the entire drive, and windows does actually see the partition table correctly (as does linux from the domu and dom0).> >> However, on the xen machine, I can use fdisk to see the partition >table, kpartx -a to add the partition device in /dev/mapper, and I can >even mount the drive in Linux and see all of it''s contents. > >I would recommend you don''t use fdisk in Linux on this kind of task. >Fdisk has a nasty habit of imposing its own default CHS geometry on >disks. Like, the other day, it told me the appropriate start sector for >the first partition on my virtual disc was 2048 when it really should >have been 63). This can lead to things not matching and may be stopping >your VM from mounting the machine.I didn''t use fdisk to create or modify anything, just fdisk -l to view the partition table....>> I suspect the problem is the way windows translates the CHS values of >the drive, and so can''t see things the same way that NT could on the >physical hardware. > >May well be due to what Linux fdisk did... I would recommend you try >parted instead. > >> I''m at a complete loss on how to resolve this issue, or what to >try/look at. If all else fails I figured to try and create a new 300G >drive, format it from win2k, and then somehow transfer the files from >Linux into win2k, without losing any of the permissions / etc which I >guess will be somewhat challenging. >>Thanks for your response, I am fairly sure it isn''t a partition issue though. If you have any other ideas, I''d really appreciate it. Regards, Adam -- Adam Goryachev Website Managers www.websitemanagers.com.au
Hi, Just a quick hint: Make sure the iscsi blocksize is the same as on the original devices. We once had a similar problem when we migrated from physical to iscsi. It turned out windows 2003 couldn''t cope with the 4k blocksize we wanted to use for the targets. We fell back to 512bytes (I think) and everything was fine. Check there: /sys/block/<device>/queue/physical_block_size regards, - peter. On 2013-01-19 07:00:32 Adam Goryachev wrote:> Paul Stimpson <paul@stimpsonfamily.co.uk> wrote: > > >Hi Adam, > > > >On 18/01/13 18:31, Adam Goryachev wrote: > >> I''ve been trying to migrate a win nt 4 machine to a xen domu for the > >past few months with no success. However, on my current attempt, the > >original hardware no longer boots, so I''m trying to resolve the issues > >with xen properly, or else take a long holiday... > > > >On one of our Windows XP installs in a far off place, we found that the > > > >HAL that shipped on our Windows disc wasn''t virtualisation-friendly. > >This was on VMWare (not Xen) so it may not apply but we had to get a > >special version of XP with a different HAL. > > It isn''t the HAL, since the OS boots up, I''ve had HAL problems before (can be fixed by tweaking the xen config file usually)... > > >> Anyway, the physical machine had a 9G drive (OS drive), a 147 G drive > >(not in use) and a 300G drive (all SCSI Ultra320 on the same SCSI > >controller) > > > > From here on it, I will call the 9GB drive "sda", the 147GB "sdb" and > >the 300GB "sdc" - Please adjust anything I say if your system is > >different. > > > >> Everytime, I''ve booted linux, used dd to image the original 2 drives > >(ignored the 147G drive), and written each image with dd to an LV > > > >Are you dd-ing the Windows partition or the whole drive into the > >container file? I think you will get better results with the whole > >drive. > > I did something like this: > dd if=/dev/sda of=/mnt/sda.img bs=8M > dd if=/dev/sdc of=/mnt/sdc.img bs=8M > Then, I moved /mnt drive to another machine and did: > dd if=/mnt/sda.img of=/dev/vg0/machine_d1 bs=8M > dd if=/mnt/sdc.img of=/dev/vg0/machine_d2 bs=8M > > >> This is exported by iscsi to xen > >> > >> The c: works fine, and I can boot properly in VGA mode (safe mode) > >but the 300G drive always shows as corrupt. I''ve now upgraded to > >win2000 in the VM, and win2000 reports the drive as healthy (hardware) > >but blank with no filesystem on it. > > > >What are you passing to the VM in the "disk=[]" line please? > > disk = [ ''phy:/dev/disk/by-path/ip-1.2.3.4:3260-iscsi-iqn.2011-06.domain:machine_d1-lun-0,hda,w'', > ''phy:/dev/disk/by-path/ip-1.2.3.4:3260-iscsi-iqn.2011-06.domain:machine_d2-lun-0,hdb,w'', > ''file:/mnt/blah.iso:ioemu:hdc:cdrom,r'' ] > > >Whatever you pass will be interpreted by Windows as a raw drive, so it > >can''t just be a partition, it has to have a partition table and MBR > >too. > >If you just pass a partition, you are likely to see some strange > >partitioning arrangement in Windows Disk management (random size > >partitions/free space chunks) and, in the file manager, you will see no > >files. > > > >The disk line should probably pass sdc, rather than sdc1, or you need > >to make a partition table and a partition in it using parted. > > Yep, I''m copying the entire drive, and windows does actually see the partition table correctly (as does linux from the domu and dom0). > > > > >> However, on the xen machine, I can use fdisk to see the partition > >table, kpartx -a to add the partition device in /dev/mapper, and I can > >even mount the drive in Linux and see all of it''s contents. > > > >I would recommend you don''t use fdisk in Linux on this kind of task. > >Fdisk has a nasty habit of imposing its own default CHS geometry on > >disks. Like, the other day, it told me the appropriate start sector for > >the first partition on my virtual disc was 2048 when it really should > >have been 63). This can lead to things not matching and may be stopping > >your VM from mounting the machine. > > I didn''t use fdisk to create or modify anything, just fdisk -l to view the partition table.... > > >> I suspect the problem is the way windows translates the CHS values of > >the drive, and so can''t see things the same way that NT could on the > >physical hardware. > > > >May well be due to what Linux fdisk did... I would recommend you try > >parted instead. > > > >> I''m at a complete loss on how to resolve this issue, or what to > >try/look at. If all else fails I figured to try and create a new 300G > >drive, format it from win2k, and then somehow transfer the files from > >Linux into win2k, without losing any of the permissions / etc which I > >guess will be somewhat challenging. > >> > > Thanks for your response, I am fairly sure it isn''t a partition issue though. If you have any other ideas, I''d really appreciate it. > > > Regards, > Adam > > -- > Adam Goryachev > Website Managers > www.websitemanagers.com.au > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xen.org > http://lists.xen.org/xen-users >
On Fri, 18 Jan 2013 13:31:42 -0500, Adam Goryachev <mailinglists@websitemanagers.com.au> wrote:> I''m at a complete loss on how to resolve this issue, or what to try/look > at. If all else fails I figured to try and create a new 300G drive, > format it from win2k, and then somehow transfer the files from Linux > into win2k, without losing any of the permissions / etc which I guess > will be somewhat challenging.I''ve had good luck with the ntfs-3g utilities (http://www.tuxera.com/community/ntfs-3g-download/), namely ntfsclone, for copying NTFS partitions in Linux. As an alternative to dd you might try formatting a new disk in the Windows domU, mount it on a Linux machine, and use ntfsclone to copy the original to the new partition. --steve
Peter Gansterer <peter.gansterer@paradigma.net> wrote:>Hi, > >Just a quick hint: Make sure the iscsi blocksize is the same as on the >original devices. >We once had a similar problem when we migrated from physical to iscsi. >It turned out windows 2003 couldn''t cope with the 4k blocksize we >wanted to use for the targets. We fell back to 512bytes (I think) and >everything was fine. > >Check there: /sys/block/<device>/queue/physical_block_sizeThanks for the idea, all drives (in domu) show 512, and dom0 also shows 512.... I''m just making another copy of my "backup" and will try using the dd image file instead of writing it to a block device. I doubt it will help, but worth a try. Regards, Adam Regards, Adam -- Adam Goryachev Website Managers www.websitemanagers.com.au
Steven Peckins <sep16@psu.edu> wrote:>On Fri, 18 Jan 2013 13:31:42 -0500, Adam Goryachev ><mailinglists@websitemanagers.com.au> wrote: > >> I''m at a complete loss on how to resolve this issue, or what to >try/look >> at. If all else fails I figured to try and create a new 300G drive, >> format it from win2k, and then somehow transfer the files from Linux > >> into win2k, without losing any of the permissions / etc which I guess > >> will be somewhat challenging. > >I''ve had good luck with the ntfs-3g utilities >(http://www.tuxera.com/community/ntfs-3g-download/), namely ntfsclone, >for >copying NTFS partitions in Linux. As an alternative to dd you might >try >formatting a new disk in the Windows domU, mount it on a Linux machine, > >and use ntfsclone to copy the original to the new partition.Awesome idea, thanks for that, if my current attempt fails, then that will be the next thing to try. Format the drive in windows (domU), then try and mount it in the dom0, and if it works, copy the data into it with ntfsclone. Thanks, Adam Regards, Adam -- Adam Goryachev Website Managers www.websitemanagers.com.au
On 19/01/13 07:34, Steven Peckins wrote:> On Fri, 18 Jan 2013 13:31:42 -0500, Adam Goryachev > <mailinglists@websitemanagers.com.au> wrote: > >> I''m at a complete loss on how to resolve this issue, or what to >> try/look at. If all else fails I figured to try and create a new 300G >> drive, format it from win2k, and then somehow transfer the files from >> Linux into win2k, without losing any of the permissions / etc which I >> guess will be somewhat challenging. > > I''ve had good luck with the ntfs-3g utilities > (http://www.tuxera.com/community/ntfs-3g-download/), namely ntfsclone, > for copying NTFS partitions in Linux. As an alternative to dd you > might try formatting a new disk in the Windows domU, mount it on a > Linux machine, and use ntfsclone to copy the original to the new > partition.Just wanted to say thank you to all, I''ve resolved the issue now as follows (summary) 1) Format drive in windows 2000 2) Look in My Computer and see drive space is 127G 3) Google that Win 2000 supports drives larger than 127G in service pack 2 or higher 4) Know I''ve already installed service pack 4, verify it is installed correctly 5) Stuff around 6) Google that you need to add a registry entry to support drives >127G 7) Add registry entry and reboot - see http://support.microsoft.com/kb/305098 for details 8) Original dd copy of drive works perfectly 9) Celebrate, run around and test, go home. All up, 23 hours marathon resulting in success!! The only remaining question I have (which I don''t care to experiment or really find an answer to, but which possibly slowed things down... Why when booting from Ubuntu i386 version 11.10 could it also not mount the 300G partition with corruption errors/etc. Regards, Adam -- Adam Goryachev Website Managers Ph: +61 2 8304 0000 adam@websitemanagers.com.au Fax: +61 2 8304 0001 www.websitemanagers.com.au