// Module included in the following assemblies:
//
// * virt/virtual_machines/creating_vms_custom/virt-creating-vms-by-cloning-pvcs.adoc
// * virt/virtual_machines/creating_vms_custom/virt-creating-vms-from-container-disks.adoc
// * virt/virtual_machines/creating_vms_custom/virt-creating-vms-from-web-images.adoc

ifeval::["{context}" == "virt-creating-vms-from-web-images"]
:url:
:title-frag: from an image on a web page
:a-object: an image
:object: image
:data-source: web page
:menu-item: URL (creates PVC)
endif::[]
ifeval::["{context}" == "virt-creating-vms-from-container-disks"]
:container-disks:
:title-frag: from a container disk
:a-object: a container disk
:object: container disk
:data-source: container registry
:menu-item: Registry (creates PVC)
endif::[]
ifeval::["{context}" == "virt-creating-vms-by-cloning-pvcs"]
:clone:
:title-frag: from a PVC
:menu-item: PVC (clone PVC)
endif::[]

:_mod-docs-content-type: PROCEDURE
[id="virt-creating-vm-custom-image-web_{context}"]
= Creating a VM {title-frag} by using the web console

ifdef::url,container-disks[]
[role="_abstract"]
You can create a virtual machine (VM) by importing {a-object} from a {data-source} by using the {product-title} web console.
endif::[]
ifdef::clone[]
[role="_abstract"]
You can create a virtual machine (VM) by cloning a persistent volume claim (PVC) by using the {product-title} web console.
endif::[]

.Prerequisites

ifdef::url,container-disk[]
* You must have access to the {data-source} that contains the {object}.
endif::[]
ifdef::clone[]
* You must have access to the namespace that contains the source PVC.
endif::[]

.Procedure

. Navigate to *Virtualization* -> *Catalog* in the web console.
. Click a template tile without an available boot source.
. Click *Customize VirtualMachine*.
. On the *Customize template parameters* page, expand *Storage* and select *{menu-item}* from the *Disk source* list.
ifdef::url[]
. Enter the image URL. Example: `\https://access.redhat.com/downloads/content/69/ver=/rhel---7/7.9/x86_64/product-software`
endif::[]
ifdef::container-disks[]
. Enter the container image URL. Example: `\https://mirror.arizona.edu/fedora/linux/releases/38/Cloud/x86_64/images/Fedora-Cloud-Base-38-1.6.x86_64.qcow2`
endif::[]
ifdef::clone[]
. Select the PVC project and the PVC name.
endif::[]
. Set the disk size.
. Click *Next*.
. Click *Create VirtualMachine*.

ifeval::["{context}" == "virt-creating-vms-from-web-images"]
:!url:
endif::[]
ifeval::["{context}" == "virt-creating-vms-from-container-disks"]
:!container-disks:
endif::[]
ifeval::["{context}" == "virt-creating-vms-by-cloning-pvcs"]
:!clone:
endif::[]
