On Sun, Mar 28, 2021 at 11:11:22PM +0200, Lukas Tribus wrote: > Dear list, > > > I'm trying to convert a Xen image to KVM, and it fails with (full > verbose/debug trace below): > > guestfsd: error: mount_stub: /dev/sda2: No such file or directory > guestfsd: => mount (0x1) took 0.02 secs > libguestfs: trace: v2v: mount = -1 (error) > virt-v2v: error: mount: mount_stub: /dev/sda2: No such file or directory > > >From guestfish I can see that my fstab file may be a little uncommon, > /dev/xvda1 is swap and /dev/xvda2 is the ext3 root fs: > > /dev/xvda1 none swap sw 0 0 > /dev/xvda2 / ext3 noatime,nodiratime,errors=remount-ro 0 1
Yes this is the problem. Virt-v2v reads the fstab and assumes the root filesystem must be on the second partition of the first disk (ie. /dev/sda2 in the libguestfs namespace). When it tries to mount that it fails, and gives up. Is Xen doing some weird partition table synthesis here? > Could this be the reason virt-v2v gets confused and what would be the > best way to fix this so that I can boot those old Xen guests in KVM? > > The host is virt-v2v on Ubuntu 20.04, the guest I'm looking at is Ubuntu > 18.04. Since the guest already has virtio drivers installed and is relatively recent, you could try simply copying the disk image across. However it's unlikely to boot without at least fixing /etc/fstab and probably repairing and/or setting up a bootloader. You can do these tasks manually using “virt-rescue”. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://people.redhat.com/~rjones/virt-top _______________________________________________ Libguestfs mailing list [email protected] https://listman.redhat.com/mailman/listinfo/libguestfs
