0

I have installed xcp-xapi on my Dom0 server. When I tried to create a VM, I found there are no options for me to create a PV VM based on existed kernel, initrd image and qcow2 disk image! Anyone can tell me how to create a PV VM via Xen API? In xl, I can easily create a config file and invoke xl create to create such a VM. But for xapi, I can hardly find a command works like that...

BTW: I also tried XenCenter and found nothing useful.

Lingfeng Xiong
  • 208
  • 4
  • 10

2 Answers2

0

Solved this problem by setting PV-* options in VM's params.

Lingfeng Xiong
  • 208
  • 4
  • 10
0

The real problem here is that xapi tries to make things "simple" for the user, but abstracts too far away from Xen for experienced users. The way you create a PV guest using xapi is to use one of the provided Linux templates, which all create PV guests.

If you have an HVM guest (which was probably created with the "Other install media" template), you can do as Lingfeng mentioned and set the PV-bootloader option to pygrub, and unset the HVM-boot-policy and HVM-boot-params options:

xe vm-param-clear uuid=<vm_uuid> param-name=HVM-boot-params
xe vm-param-set uuid=<vm_uuid> HVM-boot-policy= PV-bootloader=pygrub

Note the syntax for unsetting the HVM-boot-policy option -- you must leave the empty = sign.