[virt-tools-list] [virt-manager PATCH v2] virt-install: enable container to use "--boot init=INITPATH"

Cole Robinson crobinso at redhat.com
Thu Jan 30 13:33:33 UTC 2014


On 01/29/2014 09:59 PM, Chen Hanxiao wrote:
> From: Chen Hanxiao <chenhanxiao at cn.fujitsu.com>
> 
> If we use "--boot init=INITPATH" style to set
> container's init, virt-install will complain:
> 
> "ERROR    Install methods (--location URL,
> --cdrom CD/ISO, --pxe, --import, --boot hd|cdrom|...)
> cannot be specified for container guests"
> 
> This patch will fix this bug.
> 
> Signed-off-by: Chen Hanxiao <chenhanxiao at cn.fujitsu.com>
> ---
> v2: check ContainerInstaller ahead of ImportInstaller
> 
>  virt-install | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/virt-install b/virt-install
> index ca78d1e..70142aa 100755
> --- a/virt-install
> +++ b/virt-install
> @@ -474,13 +474,13 @@ def build_installer(options, conn, virt_type):
>          instclass = virtinst.PXEInstaller
>      elif options.cdrom or options.location:
>          instclass = virtinst.DistroInstaller
> +    elif virt_type == "exe":
> +        instclass = virtinst.ContainerInstaller
>      elif options.import_install or options.boot:
>          if options.import_install and options.nodisks:
>              fail(_("A disk device must be specified with --import."))
>          options.import_install = True
>          instclass = virtinst.ImportInstaller
> -    elif virt_type == "exe":
> -        instclass = virtinst.ContainerInstaller
>      else:
>          instclass = virtinst.DistroInstaller
>  
> 

ACK

- Cole




More information about the virt-tools-list mailing list