---
title: "Deploying vNIOS Instances Using Cloud-Init"
canonical: "https://docs.infoblox.com/space/vniosproxmox/1861484741/Deploying%20vNIOS%20Instances%20Using%20Cloud-Init"
format: markdown
---
NIOS allows you to automatically provision and deploy Grid Masters and Grid members using the cloud-init utility in Proxmox VE. To accomplish this, you must know how to compose user data files in YAML format for provisioning. A user data file contains configuration details for enabling the remote console, installing licenses, defining network settings, and validating the certificate and token required for authenticating a member.

As a prerequisite for deploying instances using cloud-init, create a YAML file by following the instructions in the *[Creating a YAML File](#Creating_YAML)* section.

## Deploying the vNIOS Instance with Cloud-Init

Before deploying instances with cloud-init, complete the *[prerequisites](https://infoblox-docs.atlassian.net/wiki/spaces/vniosproxmox/pages/1861648475)* and create a YAML file with cloud-init with settings by following the instructions in the *[Creating a YAML File](#Creating_YAML)* section.

To deploy an instance, perform the following steps:

1. Create a virtual machine instance as described in the *[Creating a vNIOS Virtual Machine Instance in Proxmox VE](https://infoblox-docs.atlassian.net/wiki/spaces/vniosproxmox/pages/1861812246)* section.
2. Import the vNIOS image using the Proxmox VE CLI console as described in the *[Importing the vNIOS Disk Image to Proxmox VE](https://infoblox-docs.atlassian.net/wiki/spaces/vniosproxmox/pages/1861812246)* section.  
This action creates an *Unused Disk 0* on the **Hardware** tab of the virtual machine instance in the *Proxmox Virtual Environment* console.
3. From the *Proxmox Virtual Environment* console, attach the disk to the virtual machine as described in the *[Attaching the Imported Disk to the Virtual Machine](https://infoblox-docs.atlassian.net/wiki/spaces/vniosproxmox/pages/1861812246)* section.
4. In the CLI console of the Proxmox VE host (root node), run the following command to provide the custom cloud-init configuration file to the virtual machine. Use “local” as the storage option.  
`qm set <VM ID> --cicustom "user=local:snippets/<yaml-file-name>"`
5. Create a serial console port by using the following command to enable a serial port connection to the virtual machine instance:  
`qm set <VM ID> --serial0 socket`  
Here `<VM ID>` is the ID assigned to the virtual machine when the virtual machine instance is created.
6. From the *Proxmox Virtual Environment* console, add a cloud-init disk to the virtual machine:
  1. On the **Hardware** tab, select **Add** > **CloudInit Drive**.
  2. In the *Add CloudInit Drive* dialog box, specify the following and click **Add**:
    - **BusDevice**: Retain **IDE 0**.
    - **Store**: Select **local** as storage.  
The diskz appears as *CloudInit (ide0).*
7. In the *Proxmox Virtual Environment* console, update the boot order as follows:
  1. On the **Options** tab, click **Boot Order**.
  2. In the *Edit Boot Order* dialog box, select the **scsi1** disk.
  3. Drag the **scsi1** disk to the first position.
  4. Disable the **ide2** disk.
  5. Enable all network disks.
  6. Click **OK**.
8. To start the virtual machine, click the **Start** button, located at the top of the virtual machine panel.  
The virtual machine takes several minutes to start. The cloud-init script runs during the virtual machine boot process to initialize the instance.

## > Macro (anchor)

Creating a YAML File

To create a YAML file:

1. Sign in to the CLI console of the Proxmox VE root node.
2. Navigate to the following path:  
/`var/lib/vz/snippets`
3. Create a YAML file containing the cloud-init data in this directory. You may copy the content from the *Sample YAML File* section below and then customize the settings.  
If you have created a user data file already, ensure that it is copied to this path.

For more information on cloud-init, see *[Cloud-Init Configuration in vNIOS for Proxmox](https://infoblox-docs.atlassian.net/wiki/spaces/vniosproxmox/pages/1861551974)*.