Hi, I need to do some p2v migration of a very old SuSE server. Unfortunately, the kernel of that machine doesn''t support running as xen domU, so I need to put the machine into a HVM domU. When I set up the domU with disk = [''phy:/dev/vg_guest/worker1_disk,sda1,w''] then the domU doesn''t boot because it says that no OS was found on the HDD. Of course I could set up the domU with disk = [''phy:/dev/vg_guest/worker1_disk,sda,w''] but then how can I access the individual partitions of the domU''s /dev/sda from the dom0? I believe I need to do this because I need to somehow rsync the machine''s data to the new host, and I thought that this would be done by calling rsync from the dom0 and writing to the target partition. However, how do I set up this target disk? I''m at a loss here -- your help is greatly appreciated! Cheers, Andreas.
On 27.12.2012 18:40, Andreas Hilboll wrote:> I need to do some p2v migration of a very old SuSE server. > Unfortunately, the kernel of that machine doesn''t support running as xen > domU, so I need to put the machine into a HVM domU. > > When I set up the domU with > > disk = [''phy:/dev/vg_guest/worker1_disk,sda1,w''] > > then the domU doesn''t boot because it says that no OS was found on the HDD. > > Of course I could set up the domU with > > disk = [''phy:/dev/vg_guest/worker1_disk,sda,w''] > > but then how can I access the individual partitions of the domU''s > /dev/sda from the dom0?kpartx Greetings, Paul
Alexandre Kouznetsov
2012-Dec-27 18:02 UTC
Re: Accessing individual partitions of a HVM guest
Hello. El 27/12/12 11:40, Andreas Hilboll escribió:> I need to do some p2v migration of a very old SuSE server. > Unfortunately, the kernel of that machine doesn''t support running as xen > domU, so I need to put the machine into a HVM domU. > [...] > but then how can I access the individual partitions of the domU''s > /dev/sda from the dom0?kpartx is the tool. It will create device files under /dev/mapper for each partition it finds on the block device you give it. Do not forget to unmap the partitions after you done. Another way is to mount your /dev/vg_guest/worker1_disk as is, with "mount -o offset=XYZ ". Needs no mapping additional tools, but it''s tricky. -- Alexandre Kouznetsov
>> I need to do some p2v migration of a very old SuSE server. >> Unfortunately, the kernel of that machine doesn''t support running as xen >> domU, so I need to put the machine into a HVM domU. >> >> When I set up the domU with >> >> disk = [''phy:/dev/vg_guest/worker1_disk,sda1,w''] >> >> then the domU doesn''t boot because it says that no OS was found on the HDD. >> >> Of course I could set up the domU with >> >> disk = [''phy:/dev/vg_guest/worker1_disk,sda,w''] >> >> but then how can I access the individual partitions of the domU''s >> /dev/sda from the dom0? > > kpartxThanks, guys, works like a charm :) Cheers, Andreas.