Q & A

    版本為 13:29, 23 Nov 2024

    到這個版本。

    返回到 版本存檔.

    查閱目前版本

    Q: 加大 Oracle VM Template 的可用空間

    1.Create a new image file of the required size:

    dd if=/dev/zero of=System20G.img bs=5M count=4000 (this will create a empty image file of 20G)
    Shutdown the running Oracle VM guest os.
    xm shutdown 2
    Copy the original image file into the newly created file.
    dd if=System.img of=System20G.img conv=notrunc,noerror
    Edit the vm.cfg file substituting the old imlage file by the new one.
    Change the line
    disk = ['file:/OVS/running_pool/guest1/System.img,xvda,w']
    to
    disk = ['file:/OVS/running_pool/guest1/System20G.img,xvda,w']
     
    2.Reboot the virtual machine.
    Increase the size of the Linux partition to use the new space. If there is a swap and/or extended partition after it, you can unmount swap with:

    # swapoff /dev/xvda3

    This will remove the extended partition temporarily. You can do this by going to fdisk /dev/xvda, delete Linux partition (type 83), recreate a new partition larger in size leaving space for the swap partition, and quit.
     
    Reboot the virtual server again to see the new partition table.

    3.Resize the root file system according to the new partition size.

    # resize2fs /dev/xvda2

    The X indicates the device number. The Y indicates the Linux partition. 
    Recreate the swap partition.
    Create a new partition for the remaining of the disk.

    Q: 如何取得 Oracle VM 的擁有權

    (http://docs.oracle.com/cd/E26996_01/.../BABFCCHE.html)

    • 在 OVMM 執行 Discover Servers 時,如果 OVM 是處於 Unowned 狀態,OVMM 會自動取得該擁有權。
    • 如果連結某一台 OVM 顯示 Owned by Another.... 狀態時,必須回到最近加入這個 OVM 的 OVMM,然後解除該OVM主機的擁有權後,才可以再被新的 OVMM 加入。
    • 要從 OVMM 介面解除某個 OVM 主機的擁有權,必須先移出 server pool,然後刪除該主機,或編輯該主機,將 take ownership 取消。
    Q: Oracle VM server 時間不正確
    1. 設定系統時區
      編輯 /etc/sysconfig/clock 或指令 setup。
    2. 設定 ntp.conf
      編輯 ntp.conf
      // 如要使其他主機可同步時間,加上
      # Hosts on local network are less restricted.
      restrict 192.168.7.0 mask 255.255.255.0 nomodify notrap

      // 註解這幾行
      #server 127.127.1.0     # local clock
      #fudge  127.127.1.0 stratum 10
       
    3. 啟動 ntpd 服務
    Powered by MindTouch Core