Showing posts with label VMware. Show all posts
Showing posts with label VMware. Show all posts

Thursday, July 16, 2015

How to Install Atomic Host on vSphere

RHEL Atomic Host Reference
  • https://access.redhat.com/articles/rhel-atomic-install-vmware#iso
  • https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Installation_Guide/sect-atomic-virtualization-vmware.html
How to Install Atomic Host on Vsphere

  1. right click on Cluster (choose your cluster)
  2. choose 'Deploy OVF Template'
  3. On Deploy OVF Template page
  4.     - Local File - location of \*.ova file
  5. review details > next
  6. Select Name and Folder - assign name and put in correct Folder
  7. select Storage >  (some datastore)  > next
  8. select network >  (some network)
  9. Add CD and mount the atomic0-cidata.iso that you create and upload to datastore (I had to create this iso, with 2 files, meta-data and user-data.
  10. We can create additional iso images, because this will use my hostname. AtomicHostX1
  11. the login is 'cloud-user' password = 'myatomic'

Register Atomic Host with Subscription Manager

  1. # subscription-manager register --force
  2. Validate subscription
    1. -bash-4.2# subscription-manager list

Thursday, January 30, 2014

How to Create iSCSI Server and Target

Create ISCI Server 
  1. yum install scsi-target-utils.x86_64' 
  2. Turn on tgtd 
    1. # chkconfig tgtd on 
    2. # service tgtd start Starting SCSI target daemon:                               [  OK  ]  
  3. Use tgtadm  to configure target 
    1. tgtadm -help  

  1. Check if any existing targets exist 
    1. tgtadm --lld iscsi --mode target --op show 

  2. Configure the first target ID as 101 
    1. # tgtadm --lld iscsi --mode target --op new --tid 101 --targetname iqn.server1.example.com:target1  
  3. Verify the target  
    1. # tgtadm --lld iscsi --mode target --op show   
  4. Create 1G logical volume for testing (of course in the real world you'd use a storage volume or lun) 
    1. ]# lvcreate -L 1G -n lv_iscsi vg_server1  
  5. Attach LUN to the ISCSI Target (decide which disk to use - example in step above) 
    1. ]# tgtadm --lld iscsi --mode logicalunit --op new --tid 101 --lun 1 --backing-store /dev/mapper/vg_server1-lv_iscsi  
    2.  repeat of you want two 'luns'  
  6. Verify new lun 
    1. # tgtadm --lld iscsi --mode target --op show 

  7. Share to specific Network or Client 
    1. # tgtadm --lld iscsi --mode target --op bind --tid 101 --initiator-address 192.168.0.0/24 

  8. Configure authentication to the target 
    1. # tgtadm --lld iscsi --mode account --op new --user iclient --password password  
  9. Attach user to the 101 target 
    1. # tgtadm --lld iscsi --mode account --op bind --tid 101 --user iclient 

  10. Verify User was attached to target 101 
    1. # tgtadm --lld iscsi --mode account --op show Account list:     iclient 
    2. # tgtadm --lld iscsi --mode target --op show 

  11. Backup the original configuration 
    1. # cp /etc/tgt/targets.conf /etc/tgt/targets.orig  
  12. Create configuration file from the dump command 
    1. # tgt-admin --dump default-driver iscsi  <target iqn.server1.com.example.target1>         backing-store /dev/mapper/vg_server1-lv_iscsi         incominguser iclient PLEASE_CORRECT_THE_PASSWORD         initiator-address 192.168.0.0/24 </target>   
  13. Copy or 'echo' the output of above dump command into targets.conf file to allow for persitance  
    1. tgt-admin --dump >> /etc/tgt/targets.conf 
    2. remove or comment out the duplicate 'default-driver iscsi'  
  14. Verify configuration after restart 
    1. # service tgtd restart  
  15. Check what ports are in use 
    1. # netstat -pantl | grep tgt  
  16. Add firewall rules (if using iptables) 

Client Configuration 

  1. Install client tools if not installed 
    1. # yum install iscsi-initiator-utils 

  1. Configure for restart  
    1. # service iscsid restart Stopping iscsid: Starting iscsid:                                           [  OK  ] [root@tester1 ~]# service iscsid force-start Starting iscsid: [root@tester1 ~]# chkconfig --list iscsid iscsid          0:off   1:off   2:off   3:on    4:on    5:on    6:off 

  2. # iscsiadm -m discovery -t st -p 192.168.56.102 
    1. # dmesg | tail  
  3. # iscsiadm -m node T iqn.2013-10.com.example.server1:target1 -p 192.168.56.102:3260,1 -l 
################### 
Firs not down question points correctly 
 Exam use FQDN  DON’T FORGET TO LOGOUT AT  END ITS VERY IMP  
  
yum install iscsi* -y 
man iscsiadm , go to end of page it will be given 
iscsiadm --mode discoverydb --type sendtargets --portal 192.168.0.254 --discover [ change to server ip ] 
192.168.0.254:3260,1 iqn.2010-09.com.example:rdisks.server24 
now copy IQN  "iqn.2010-09.com.example:rdisks.server24" IP 192.168.0.254 , leave port as it is. 
Copy Login line , replace iqn and ip of server 
iscsiadm --mode node --targetname iqn.2010-09.com.example:rdisks.server24 --portal 192.168.0.254:3260 --login 
now fdisk -l 
check the mounted /dev/sda 
create partition of given size 
now mkfs.xt4 /dev/sda1 
blkid /dev/sda1 and copy uuid [ UUID="f48afc51-d621-4046-932e-b6084d2286be" ] 
vim /etc/fstab 
   [ Device Name]                                                              [Where to store] file-type   defaults 
UUID="f48afc51-d621-4046-932e-b6084d2286be"     /mnt/storage       ext4      _netdev 0 0 
umount -a 
mount  -a 
go to mount /mnt/storage 
download file and chmod 644 to file

How to Manually Create Virtual Machine



1.       Use the cobbler /buildiso from Satellite/Spacewalk, generated.iso or other Linux ISO.
2.       Launch VMWare Infrastructure Client from your pc and login to vCenter with your user account.  
a.       Alternative use the vSphere Web Client (mandatory in 5.5)
3.       Right click on Red Hat Secondary (or primary) ESX Host and choose 'New Virtual Machine'  
4.       On 'New Virtual Machine Wizard' box choose ‘Custom' and then click 'Next 
5.       On 'Select a Name and Location' box type in the name of the virtual server following naming standard, i.e. someVMName   and choose a folder in the Inventory Location.   Then click ‘next’ to continue.
6.       On 'Choose a Datastore for the Virtual Machine' select any available datastore, (other than local) and click 'Next'  
7.       On Virtual Machine Version keep VM Hardware Version X checked and click next to continue.
8.       On 'Choose the Guest Operating System' screen choose 'Linux' radio button and then choose 'Red Hat Enterprise Linux 6 (64-bit)' and click 'Next'  
9.       On 'Virtual CPU' screen set as needed and click 'Next'  
10.   On 'Memory' screen set 'Memory for this Virtual Machine' to 2048 and click 'Next'  
11.   On 'Choose Networks' screen use these settings and then click 'Next'  
a.       How many NIC's do you want to connect? 1  
b.      Network for NIC 1: vlan XXX  
c.        Adapter:  VMXNET3
d.       Connect At Power On: Checked 
e.      Note: vlan XXX as DHCP and will boot into kickstart
12.   On SCSI Controller leave default ‘paravirtualization’ checked and click next to continue.
13.   On Select a Disk leave default ‘Create new disk’ checked and click next
a.       On 'Specify Virtual Disk Capacity' screen set disk size to 50gb
b.      Check  ‘Allocate and commit space on demand (Thin Provisioning) and click 'Next'  
14.   On Advanced options, leave as is, and click next
15.   On 'Ready to Complete New Virtual Machine' screen review your settings to verify everything is correct then click 'Finish'  
16.    Click on ‘ESX Host ' and then click on 'Virtual Machines' tab in right side window.   
17.    Locate the new virtual machine you just created and right-click on it and choose 'Edit Notes...'  
18.    Enter new virtual machine description in the 'Edit Notes' dialog box. 

Install OS
1.       Mount the generated.iso by either selecting
a.       Connect to local iso image (on your pc)
b.      Connect to ISO Image on Datastore
                                                                           i.      Go to someDataStore and ISO Folder, select generated.iso
2.       Open Console and boot off of ISO. Choose from menu and install as needed.