Changing user login password on templates

Similar documents
7. Try shrinking / -- what happens? Why? Cannot shrink the volume since we can not umount the / logical volume.

BT Cloud Compute. Adding a Volume to an existing VM running Linux. The power to build your own cloud solutions to serve your specific business needs

As this method focuses on working with LVM, we will first confirm that our partition type is actually Linux LVM by running the below command.

Getting Started with Pentaho and Cloudera QuickStart VM

How to add additional disks to XenServer host

Cloning and Repartitioning sessionmgr Disks

Adding a block devices and extending file systems in Linux environments

This section describes the procedures needed to add a new disk to a VM. vmkfstools -c 4g /vmfs/volumes/datastore_name/vmname/xxxx.

CIS UNIX System Administration

How to increase XenServer virtual machine root or swap partition

Back Up (And Restore) LVM Partitions With LVM Snapshots

How To Resize ext3 Partitions Without Losing Data

EX200 EX200. Red Hat Certified System Administrator RHCSA

example.com index.html # vim /etc/httpd/conf/httpd.conf NameVirtualHost :80 <VirtualHost :80> DocumentRoot /var/www/html/

EX200.Lead2pass.Exam.24q. Exam Code: EX200. Exam Name: Red Hat Certified System Administrator RHCSA. Version 14.0

Vendor: RedHat. Exam Code: EX200. Exam Name: Red Hat Certified System Administrator - RHCSA. Version: Demo

Seltestengine EX200 24q

Linux System Administration, level 1. Lecture 4: Partitioning and Filesystems Part II: Tools & Methods

An introduction to Logical Volume Management

Braindumps EX200 15q

Disks, Filesystems Todd Kelley CST8177 Todd Kelley 1

Red Hat.Actualtests.EX200.v by.Dixon.22q. Exam Code: EX200. Exam Name: Red Hat Certified System Administrator (RHCSA) Exam

Exam Name: Red Hat Certified Engineer on Redhat

EX200.redhat

EX200.exam.35q. Number: EX200 Passing Score: 800 Time Limit: 120 min. EX200. Red Hat Certified System Administrator RHCSA

Disks, Filesystems, Booting Todd Kelley CST8177 Todd Kelley 1

iscsi storage is used as shared storage in Redhat cluster, VMware vsphere, Redhat Enterprise Virtualization Manager, Ovirt, etc.

System Administration. Storage Systems

Actual4Test. Actual4test - actual test exam dumps-pass for IT exams

This is Worksheet and Assignment 12. Disks, Partitions, and File Systems

Installing VMware ESXi and vcenter for Cisco RMS

RH202. Redhat Certified Technician on Redhat Enterprise Linux 4 (Labs) Exam.

05. 5GB 7. cmd. VM E:\. ASM1.vdi 5GB Fixed / Shareable Data (shareable) Fixed Size. ASM2.vdi 5GB Fixed / Shareable. ASM3.vdi 5GB Fixed / Shareable

DESS. User Guide. Issue 06 Date HUAWEI TECHNOLOGIES CO., LTD.

This is sometimes necessary to free up disk space on a volume that cannot have extra disk space easily added.

Tutorial : Confguring a micro SD memory card as both swap and storage area for the DragonBoard 410c (DB410C)

Installing VMware ESXi and vcenter for Cisco RMS

SCSI RDMA Protocol. Introduction. Configuring SRP CHAPTER

Manage your disk space... for free :)

OPS235. Linux File Systems Partitioning Mounting File Systems

Using iscsi On Debian Lenny (Initiator And Target)

F5 BIG-IQ Centralized Management Disk Space Management. Version 5.4

Commands LVM information can be created, displayed, and manipulated with the following commands:

Partitioning and Formatting Guide

jfield Documentation Release 1 Jason Field

Manual File System Check Linux Command Line

Quota LVM (Logical Volume Manager)

Red Hat Enterprise Linux 6 Server Instruction Guide for Creating Volume in Free Disk Space

TinyNet. Creating Virtual Machines

Testpassport.

DUAL OS INSTALLATION

EX200 - EX200 Red Hat Certified System Administrator (RHCSA) Exam

RG-MACC_2.0 Installation Manual

Getting Started with BeagleBoard xm

CompTIA Linux+ Guide to Linux Certification Fourth Edition. Chapter 2 Linux Installation and Usage

Exam Questions EX200

CST8207: GNU/Linux Operating Systems I Lab Nine Disks, Partitions, and File Systems Part 2. Disks, Partitions, and File Systems - Part 2 of 2

EX200 Exam Questions Demo Red Hat. Exam Questions EX200

RH133. Red Hat Linux System Administration

CTEC1863/2018F Bonus Lab Page 1 of 5

Build Your Own Oracle RAC 11g Release 2 Cluster on Red Hat 4 and iscsi

More on file systems, Booting Todd Kelley CST8177 Todd Kelley 1

Configure Windows Server 2003 Release 2 Server Network File Share (NFS) as an authenticated storage repository for XenServer

ITDumpsKR. IT 인증시험한방에패스시키는최신버전시험대비덤프

Arch Linux with an SSD Cache using LVM on BCache. Jeremy Runyan

Fedora 12 Essentials

Upgrading Prime Optical

Disks, Filesystems 1

Controller Installation

Installation of the OS

JSA KVM SUPPORT. Theodore Jencks, CSE Juniper Networks

Virtualization Provisioning & Centralized Management with iscsi. RACF Brookhaven National Laboratory James Pryor CHEP 2010

Server guides for the GIRAF project

Linux+ Guide to Linux Certification, Third Edition. Chapter 2 Linux Installation and Usage

It is recommended to complete the tutorial using a web browser from the same operating system as your Putty or SSH client (e.g. Ubuntu terminal).

exacqvision Virtual Appliance User Manual

Author : admin. 1. Getting information about current file system partitions with fdisk and mount

1. Set up the storage to allow access to the LD(s) by the server following the NEC storage user guides.

Scrutinizer Virtual Appliance Deployment Guide Page i. Scrutinizer Virtual Appliance Deployment Guide. plixer

How to Back-Up a fit-pc2 Using Only a USB Stick (and some creative partitioning)

Bare Metal Server. User Guide. Issue 11 Date

SA3 E7 Advanced Linux System Administration III Internet Network Services and Security

File system manager. Single tool to manage your storage. Red Hat. October 24, 2011

Installing Prime Optical

Oracle Fusion Middleware

Exam Questions RH202

Disks & File Systems. Dick Gillman, ITSS. 1/19/06 10:20:11 am docs/disks.sxi

Step by Step Installation of CentOS Linux 7 and Active Circle

Nested Home Lab Setting up Shared Storage

RG-MACC-BASE_v2.01. Installation Guide

How to securely isolate Damn Vulnerable Linux with VirtualBox

Chapter 6. Linux File System

Disaster Recovery Workflow

Project 3: An Introduction to File Systems. COP 4610 / CGS 5765 Principles of Operating Systems

Upgrade Cisco Interface Module for LoRaWAN IXM using the Console

Magneto-Optical Disk Drive

RHEL 5 Essentials. Red Hat Enterprise Linux 5 Essentials

CSE 265: System and Network Administration

Partitioning Disks with parted

Linux File System Study Guide

Transcription:

Changing user login password on templates 1. Attach an ISO via the cloudstack interface and boot the VM to rescue mode. Click on attach iso icon highlighted below: A popup window appears from which select the ISO from the descriptions available: As soon as the ISO image is successfully attached the attach iso icon changes: Reboot the VM and use the VM console to handle the rest of the tasks. Select Language Select Rescue a Broken System Select Language Select Location Select Keyboard Wait for the OS to load additional components, Configure the network Configure the clock Select the device to use as root file system (as shown below): Page 1

It s your choice if you want to mount the /boot partition. Select execute a shell in /dev/systemvg/root You are now provided with a shell prompt, as root user. 2. Run the command passwd <user> and enter the new password. E.g. If your user login is guest: # passwd guest 3. Sync the filesystem and shutdown the VM. # sync ; exit; exit Page 2

4. Stop the VM, Detach the ISO and then start the VM. VM Root file in read only state and fsck doesn t resolve the issue. Resolution: Migrate the VM to another host and restart it. Utilising the extra disk allocated to the VM If a 10Gb additional disk was added to the VM it would be displayed as a raw device, so if you want to extend the root volume the steps to be followed are as follows: To display the disks use the command fdisk. By default the naming convention for the boot disk would be xvda and the additional disk would start with xvdb. root@test-tutor:~# fdisk -l Disk /dev/xvda: 21.5 GB, 21474836480 bytes 255 heads, 63 sectors/track, 2610 cylinders, total 41943040 sectors Disk identifier: 0x00098c7c Device Boot Start End Blocks Id System /dev/xvda1 2048 499711 248832 83 Linux /dev/xvda2 501758 41940991 20719617 5 Extended /dev/xvda5 501760 41940991 20719616 8e Linux LVM Disk /dev/xvdb: 10.7 GB, 10737418240 bytes 255 heads, 63 sectors/track, 1305 cylinders, total 20971520 sectors Disk identifier: 0x00000000 Disk /dev/xvdb doesn't contain a valid partition table...... From the above command output we find a raw device /dev/xvdb of 10Gb, without any filesystems on it. To create a partition on it follow the commands provided below: root@test-tutor:~# fdisk /dev/xvdb Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel Page 3

Building a new DOS disklabel with disk identifier 0x1d342ae5. Changes will remain in memory only, until you decide to write them. After that, of course, the previous content won't be recoverable. Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite) Command (m for help): p Disk /dev/xvdb: 10.7 GB, 10737418240 bytes 255 heads, 63 sectors/track, 1305 cylinders, total 20971520 sectors Disk identifier: 0x1d342ae5 Device Boot Start End Blocks Id System Command (m for help): n Partition type: p primary (0 primary, 0 extended, 4 free) e extended Select (default p): p Partition number (1-4, default 1): <Press Return for default value:1> Using default value 1 First sector (2048-20971519, default 2048): <Press Return for default value:2048> Using default value 2048 Last sector, +sectors or +size{k,m,g} (2048-20971519, default 20971519): <Press Return for default value:20971519> Using default value 20971519 Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. Syncing disks. I ve now allocated 10Gb to a single partition which can be verified with the following command. root@test-tutor:~# fdisk -l /dev/xvdb Disk /dev/xvdb: 10.7 GB, 10737418240 bytes 107 heads, 17 sectors/track, 11529 cylinders, total 20971520 sectors Disk identifier: 0x1d342ae5 Device Boot Start End Blocks Id System /dev/xvdb1 2048 20971519 10484736 83 Linux We now need to create a physical volume (PV) on the new partition which can then be added to the volume group. To display the configured physical volumes use the command pvs or pvdisplay. root@test-tutor:~# pvs PV VG Fmt Attr PSize PFree /dev/xvda5 systemvg lvm2 a-- 19.76g 20.00m Create the physical volume on /dev/xvdb1: Page 4

root@test-tutor:~# pvcreate /dev/xvdb1 Physical volume "/dev/xvdb1" successfully created To display the available volume groups, the commands available are vgs and vgdisplay. root@test-tutor:~# vgs VG #PV #LV #SN Attr VSize VFree systemvg 1 2 0 wz--n- 19.76g 20.00m We now add the newly created partition to the existing Volume Group (VG) which as seen above is named systemvg. root@test-tutor:~# vgextend systemvg /dev/xvdb1 Volume group "systemvg" successfully extended If we now display the VG, we notice that the size has increased by 10G (VSize) and 10G of non allocated space (VFree) root@test-tutor:~# vgs VG #PV #LV #SN Attr VSize VFree systemvg 2 2 0 wz--n- 29.75g 10.02g To display the available logical volumes (LV) run the command lvs or lvdisplay systemvg. We notice the existence of two LVs root and swap_1. Running the df -h / command we can confirm that the root vol is mounted from /dev/systemvg/root or the root volume available on VG systemvg. root@test-tutor:~# lvs LV VG Attr LSize Pool Origin Data% Move Log Copy% Convert root systemvg -wi-ao--- 13.75g swap_1 systemvg -wi-ao--- 5.99g To extend the root LV, use the command lvextend and the size to increment to, by adding a + sign. Note: If the + sign is not added the size of the LV would be reduced to 10G, the OS would show an alert requesting you to confirm that you want to reduce the volume. root@test-tutor:~# lvextend -L +10G systemvg/root Extending logical volume root to 23.75 GiB Logical volume root successfully resized We can confirm that the LV size has now increased by 10Gb. root@test-tutor:~# lvs LV VG Attr LSize Pool Origin Data% Move Log Copy% Convert root systemvg -wi-ao--- 23.75g swap_1 systemvg -wi-ao--- 5.99g If now have run the command resize2fs to increase the root volume online. root@test-tutor:~# resize2fs /dev/systemvg/root resize2fs 1.42.9 (4-Feb-2014) Filesystem at /dev/systemvg/root is mounted on /; on-line resizing required old_desc_blocks = 1, new_desc_blocks = 2 The filesystem on /dev/systemvg/root is now 6224896 blocks long. To confirm that root partition has been extended use the command df root@test-tutor:~# df -h / Page 5

Filesystem Size Used Avail Use% Mounted on /dev/mapper/systemvg-root 24G 2.3G 20G 11% / A short method of doing all the above steps (as root): pvcreate /dev/xvdb ; vgextend systemvg /dev/xvdb; lvextend -L +10G systemvg/root ; resize2fs /dev/systemvg/root To reduce the swap space from the current 8Gb to 2Gb for CSG provided templates and increase the root filesystem by 4Gb (as root): swapoff a lvchange -a n systemvg/swap_1 lvreduce -L 2G systemvg/swap_1 lvchange -a y systemvg/swap_1 mkswap /dev/systemvg/swap_1 swapon /dev/systemvg/swap_1 lvextend -L +4G systemvg/root resize2fs /dev/systemvg/root # Switch of swap volume/device #Deactivate Logical Volume (LV) #Reduce size of LV to 2Gb #Activate LV #Create swap device #Switch on swap volume/device #Increase root LV by 4G (note the + sign) #Resize filesystem to reflect the change To create a separate Logical Volume named data using an additional disk. pvcreate /dev/xvdb # create a physical volume (PV) vgextend systemvg /dev/xvdb # add new PV to existing Volume Group (VG) lvcreate -L +10G -n data systemvg # create a new Logical Volume (LV) named data mkfs.ext4 /dev/systemvg/data # format the LV mkdir /data # create a directory to which LV is to be mounted mount /dev/systemvg/data /data # mount LV df -h /data # verify mount point # to create a permanent mount on system boot update the file /etc/fstab echo "/dev/mapper/systemvg-data /data ext4 defaults 0 0" >> /etc/fstab umount /data # unmount the filesystem mount a # the mount command will read data from /etc/fstab df h /data # confirm the mount has occurred, ensures there are no errors in fstab file. Page 6