Topic 9

Dates: 4/3/2019
Start-up and Run Levels. Scheduled jobs (at, cron)
Linux System Administration


Exercise: VM setup for startup scripts

  • Clone kvm1 to a new NFS server VM host, run01, by executing the command below:
    virsh shutdown kvm1
    virt-clone --connect=qemu:///system -o kvm1 -n run01 -f /home/hostadm/KVM/run01.img
    
  • Check if the new VM is in the list, start it, then login to its console:
    virsh list --all
    virsh start run01
    virsh console run01
    
  • Fix the host name.
    replace kvm1 with run01 in /etc/hostname file,
  • Reset the machine ID by running the following commands on kvm3:
    rm -f /etc/machine-id
    rm /var/lib/dbus/machine-id
    dbus-uuidgen --ensure=/etc/machine-id
    dbus-uuidgen --ensure
    
  • Clear the DHCP leased IP settings:
    dhclient -r ens3
    

    Reboot the VM:
    reboot
    
    After reboot, the new VM should come up with the correct host name.


  • Take me to the Course Website