EV Observe - Deploy a Virtual Machine (VM)

Last modified on 2022/08/11 19:13

You can deploy a Box as a virtual machine or VM such as VMware, Hyper-V, Azure or Clonezilla.

  • The masters required for deployment can be found on the sFTP server (sftp://software.servicenav.io).

Best Practice

  • Access to the Box is secured using a password.
    • You should replace the default password.
    • Use a password generator and create a strong password that includes 12 characters, upper and lower cases, numbers, punctuation marks and unique characters.
    • Caution: When generating the password for a Hyper-V Box, you must not use punctuation marks. This is because punctuation marks are not always correctly interpreted by the Hyper-V console and access will not be possible if there is no network connection.

Procedures

How to deploy a VMware virtual machine

Step 1: Install the new VMware virtual machine

1. Download the three MF, OVF and VMDK files from the sFTP website.

Note: Contact the EasyVista Support team to obtain the relevant login information.

2. Import the files to your hypervisor or vCenter.
 

Step 2: Install VMware tools

1. Log in to the virtual machine.

Note: If you have deployed the VM but the process is blocked at initramfs when restarting, this means that the installation files are corrupted. If this is the case, you should run the deployment again using Firefox or Google Chrome to install the OVF.

2. Run the commands below to mount and install VMware tools.

mount /dev/cdrom /mnt
cp /mnt/VMwareTools-*.tar.gz /root/
tar xvf VMwareTools*
./vmware-tools-distrib/vmware-install.pl

Step 3: Finish deploying the new VMware virtual machine

1. Run the command below to restart the virtual machine.

reboot

2. Follow the steps in the installation wizard.
 

Step 4: Set up monitoring for the new machine

     Open url.png See the procedure

How to deploy a Hyper-V virtual machine

Step 1: Create a virtual hard disk

1. Download the VHDX file from the sFTP website.

Note: Contact the EasyVista Support team to obtain the relevant login information.

2. Import the file to your hypervisor.
 

Step 2: Create and configure the new Hyper-V virtual machine

1. Run the creation wizard in Hyper-V Manager.

  • Run Hyper-V Manager.
  • Click Action > New > Virtual Machine.
           Open virtual machine wizard.png

The New Virtual Machine Wizard will appear.

  • Click Next in the Before You Begin window to start configuring the new virtual machine.
           New virtual machine wizard.png

2. Create the virtual machine according to the steps in the wizard.

  • Give a name to the virtual machine and click Next.
  • Specify the location for storing the virtual machine files and click Next.
  • Choose the generation of the virtual machine and click Next.
    Note: For Hyper-V 2012 to 2016, select Generation 1.
  • Enter the amount of RAM for your virtual machine and click Next.
  • Select the virtual network for your virtual machine and click Next.
  • Select the virtual hard disk associated with your virtual machine.
    • Select the Use an existing virtual hard disk option.
    • Click Browse.
    • Select the file called VSM.vhd you downloaded in step 1 and click Open.
    • Click Next.
       

Step 3: Finish creating the Hyper-V virtual machine

1. Check the configuration summary for the virtual machine in the last step of the wizard.

        End virtual machine wizard.png

2. Click Finish.

The new machine will be created and configured.

3. Start the virtual machine.

Possible errors

  • Hyper-V 2012 to 2016: 

Boot error SCSI...

In this case, check that the Generation 1 option was selected in the virtual machine creation wizard.

  • Hyper-V 2016: 

error syncing, kernel panic

In this case:

  • Run Hyper-V Manager.
  • Select the virtual machine and click Actions > Settings.
           Error virtual machine wizard - Select VM.png
  • In the Processor section, select Compatibility.
  • Select the Migrate to a physical computer with a different processor version option.
           Error virtual machine wizard - Compatibility box.png

Step 4: Set up monitoring for the new machine

    Open url.png See the procedure

How to expand the disk space of a Linux partition

Caution: If you are required to create a primary partition, you must not exceed three partitions otherwise you will not be able to add disk space.

Prerequisites: You should have previously increased the disk space allocated to the virtual machine.
 

Step 1: Create the new disk partition in cfdisk

1. Log in to the Box as the root user using an SSH client.

Note: If you logged in using the coadmin account, run the sudo su – command.

2. Run the commands below to run cfdisk.

echo 1 > /sys/block/sda/device/rescan
cfdisk

3. Create the new disk partition.

  • Select the Free space row.
           Increase disk space procedure - Create new partition.png
  • Select [ New ] in the menu at the bottom of the window and click [ Logical ].
  • Select [ Write ] in the menu to save.

The new disk partition will be created.

example  /dev/sda4

Step 2: Create a physical volume in partprobe

1. Run the commands below to create a physical volume in partprobe.
Replace {partition_number} with the value of the new partition you created in step 1.

partprobe
pvcreate /dev/{partition_value}

example  pvcreate /dev/sda4

Note: Restart the Box if the command does not run.

2. Increase the volume group (VG).

  • Run the command below to retrieve the information on the logical volume (LV).

lvdisplay

  • The LV Path row indicates the name of the logical volume (LV).
  • The VG Name row indicates the name of the volume group.

        Increase disk space procedure - Command partprobe lvdisplay.png

  • Run the command below to increase the volume group.
    Replace {vg_name} with the name of the logical volume you just retrieved and {partition_number} with the value of the new partition you created in step 1.

vgextend {vg_name} /dev/{partition_value}

example  vgextend template-ubuntu-snb-16-04-vg /dev/sda4

  • Run the command below to increase the logical volume.
    Replace {vg_path} with the path of the logical volume you just retrieved.
    Note: The value, 100%, will allocate the entire disk space.

lvresize -l +100%FREE {vg_path}

example  lvresize -l +100%FREE /dev/template-ubuntu-snb-16-04-vg/root

3. Resize the file system (FS).

  • Run the command below to retrieve the name of the partition you want to resize.

df -h

        Increase disk space procedure - Command partprobe FS df.png

  • Run the command below to resize the file system.
    Replace {partition_name} with the name of the partition you just retrieved.

resize2fs {partition_name}

example  resize2fs /dev/mapper/template–ubuntu–snb–16–04–vg-root

  • Run the command below to check that resizing has been correctly performed.

df -h

Tags:
Powered by XWiki © EasyVista 2022