Port-i386 archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Converting PV to HVM - boot methods



Stephen Borrill <netbsd%precedence.co.uk@localhost> writes:

> I've set this to port-i386 rather than port-xen as it's more about the x86 
> boot process rather than Xen.
>
> I have a (large) number of PV Xen VMs. These were created from a disk 
> image built with makefs that the sets were extracted into. This means 
> there is no partitioning except for disklabel and the root partition 
> begins at sector 0:
>
> 16 partitions:
> #        size    offset     fstype [fsize bsize cpg/sgs]
>   a:  18874368         0     4.2BSD   2048 16384     0  # (Cyl.      0 -  18724*)
>   b:   2097152  18874368       swap                     # (Cyl.  18724*-  20805*)
>   c:  20971520         0     unused      0     0        # (Cyl.      0 -  20805*)
>   d:  20971520         0     unused      0     0        # (Cyl.      0 -  20805*)
>
> Now that XenServer and XCP-ng no longer support PV booting (and PV-on-PVH 
> doesn't work either), I now need to convert them to HVM. As there's no 
> free sectors at the start, I cannot create a partition table, etc.
>
> My current best fix is to add a 2nd tiny (16MB) virtual disk with 
> GPT partitioning and a single MSDOS EFI partition containing:
>
> /efi/boot/bootx64.efi
> /efi/NetBSD/boot.cfg
>
> The boot.cfg is altered so that instead of boot netbsd, the lines say boot hd1a:netbsd.
>
> Full set of steps (assuming xbd1 for new disk and no existing wedges):
>

[snip]

I have done this too, but with a MBR style second disk.  All it contains
is the boot blocks and a boot.cfg.  If you use the NAME=ROOT.foo stuff
in /etc/fstab you won't have to do any edits.  If xenbus is available to
the HVM you get you might be able to get pvhvm going which will let you
use a fully emulated device for the main boot disk, and then xbd devices
for other disks and maybe the network.  Done that too...





-- 
Brad Spencer - brad%anduin.eldar.org@localhost


Home | Main Index | Thread Index | Old Index