云计算 作业2

Homework 2


Q: Create a Virtual Machine on KVM.

  • Install VMware Worktaon

  • Install Linux/KM

    1. Create a New Virtual Machine.
    2. Select “Custom (advanced) and click Next”.
    3. Click next unl you reach the page “Guest Operang System Installaon”
    4. Download the iso image for Ubuntu-XX.XX.X from here.
    5. Connue to setup your VM spec.
    6. We then need to expose the hardware virtualizaon feature to the KVM running in the VM. On VMware Workstaon, go to Processors of your VM configuraon, then select both “Virtualize Intel VT-x/EPT and AMD-V/RVI” and “Virtualize CPU performance counters”.
    7. Click “Finish” and Install Ubuntu-XX.XX.X on your VM.
  • configure the environment for KVM. Input the following command:

     sudo apt-get update  
     sudo apt-get install qemu-kvm
     libvirt-bin ubuntu-vm-builder bridge-utils \  libosinfo-bin libguestfs-tools virt-top virtinst
    
  • Install VM on KVM

    1. Type the following command to install a Ubuntu XX.XX.XX guest.
      virt-install \  
      --name guest0 \
      --virt-type=kvm \  
      --ram 1024 \  
      --disk path=guest0.img,size=25 \  
      --vcpus 2 \  
      --os-type linux \  
      --graphics none \  
      --console pty,target_type=serial \  
      --location 'http://us.archive.ubuntu.com/ubuntu/dists/trusty/main/installer-amd64
      --extra-args 'console=ttyS0,115200n8 serial'
      
    2. Aer seng language, locaon, keyboard and other basic sengs, we need to choose a mirror of ubuntu.
    3. Input the username and password.
    4. Choose a disk to install.
    5. Complete it.( Which takes so much me ).
  • Modify /etc/default/grub in VM

    1. Login.
    2. Find “grub”, change permission and open it by vi.
    3. Modify it.
    4. Update.
    5. Shutdown VM.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值