<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    posts - 167,  comments - 30,  trackbacks - 0
    使用開源云工具OpenNebula3.8.1在KVM環(huán)境下虛擬機遷移失敗問題解決。
    1、虛擬機遷移失敗1日志:
    Fri Mar  8 17:57:18 2013 [LCM][I]: New VM state is SAVE_MIGRATE
    Fri Mar  8 17:57:30 2013 [VMM][I]: ExitCode: 0
    Fri Mar  8 17:57:30 2013 [VMM][I]: Successfully execute virtualization driver operation: save.
    Fri Mar  8 17:57:30 2013 [VMM][I]: ExitCode: 0
    Fri Mar  8 17:57:30 2013 [VMM][I]: Successfully execute network driver operation: clean.
    Fri Mar  8 17:58:14 2013 [LCM][I]: New VM state is PROLOG_MIGRATE
    Fri Mar  8 17:58:14 2013 [TM][I]: mv: -------------------------/one_images_3.8.1/0/42/disk.0
    Fri Mar  8 17:58:14 2013 [TM][I]: ExitCode: 0
    Fri Mar  8 18:02:28 2013 [TM][I]: mv: Moving bcec162:/one_images_3.8.1/0/42 to node153:/one_images_3.8.1/0/42
    Fri Mar  8 18:02:28 2013 [TM][I]: ExitCode: 0
    Fri Mar  8 18:02:29 2013 [LCM][I]: New VM state is BOOT
    Fri Mar  8 18:02:30 2013 [VMM][I]: ExitCode: 0
    Fri Mar  8 18:02:30 2013 [VMM][I]: Successfully execute network driver operation: pre.
    Fri Mar  8 18:02:33 2013 [VMM][I]: Command execution fail: /var/tmp/one/vmm/kvm/restore /one_images_3.8.1/0/42/checkpoint node153 42 node153
    Fri Mar  8 18:02:33 2013 [VMM][E]: restore: Command "virsh --connect qemu:///system restore /one_images_3.8.1/0/42/checkpoint" failed: error: Failed to restore domain from /one_images_3.8.1/0/42/checkpoint
    Fri Mar  8 18:02:33 2013 [VMM][I]: error: unable to set user and group to '0:0' on '/one_images_3.8.1/0/42/disk.1': No such file or directory
    Fri Mar  8 18:02:33 2013 [VMM][E]: Could not restore from /one_images_3.8.1/0/42/checkpoint
    Fri Mar  8 18:02:33 2013 [VMM][I]: ExitCode: 1
    Fri Mar  8 18:02:33 2013 [VMM][I]: Failed to execute virtualization driver operation: restore.
    Fri Mar  8 18:02:33 2013 [VMM][E]: Error restoring VM: Could not restore from /one_images_3.8.1/0/42/checkpoint
    Fri Mar  8 18:02:34 2013 [DiM][I]: New VM state is FAILED
    Sat Mar  9 09:23:46 2013 [DiM][I]: New VM state is DONE.
    Sat Mar  9 09:23:46 2013 [TM][W]: Ignored: LOG I 42 ExitCode: 0
    Sat Mar  9 09:23:47 2013 [TM][W]: Ignored: LOG I 42 delete: Deleting /one_images_3.8.1/0/42
    Sat Mar  9 09:23:47 2013 [TM][W]: Ignored: LOG I 42 ExitCode: 0
    Sat Mar  9 09:23:47 2013 [TM][W]: Ignored: TRANSFER SUCCESS 42 -
    解決方法:
    在mv腳本中TAR拷貝命令前面增加$SUDO命令.
    $ONE_LOCATION/var/remotes/tm/ssh/mv
    #!/bin/bash
    # -------------------------------------------------------------------------- #
    # Copyright 2002-2012, OpenNebula Project Leads (OpenNebula.org)             #
    #                                                                            #
    # Licensed under the Apache License, Version 2.0 (the "License"); you may    #
    # not use this file except in compliance with the License. You may obtain    #
    # a copy of the License at                                                   #
    #                                                                            #
    # http://www.apache.org/licenses/LICENSE-2.0                                 #
    #                                                                            #
    # Unless required by applicable law or agreed to in writing, software        #
    # distributed under the License is distributed on an "AS IS" BASIS,          #
    # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
    # See the License for the specific language governing permissions and        #
    # limitations under the License.                                             #
    #--------------------------------------------------------------------------- #
    # MV <hostA:system_ds/disk.i|hostB:system_ds/disk.i> vmid dsid
    #    <hostA:system_ds/|hostB:system_ds/>
    #   - hostX is the target host to deploy the VM
    #   - system_ds is the path for the system datastore in the host
    #   - vmid is the id of the VM
    #   - dsid is the target datastore (0 is the system datastore)
    SRC=$1
    DST=$2
    VMID=$3
    DSID=$4
    if [ -z "${ONE_LOCATION}" ]; then
        TMCOMMON=/var/lib/one/remotes/tm/tm_common.sh
    else
        TMCOMMON=$ONE_LOCATION/var/remotes/tm/tm_common.sh
    fi
    . $TMCOMMON
    #-------------------------------------------------------------------------------
    # Return if moving a disk, we will move them when moving the whole system_ds
    # directory for the VM
    #-------------------------------------------------------------------------------
    SRC=`fix_dir_slashes $SRC`
    DST=`fix_dir_slashes $DST`
    SRC_PATH=`arg_path $SRC`
    DST_PATH=`arg_path $DST`
    SRC_HOST=`arg_host $SRC`
    DST_HOST=`arg_host $DST`
    DST_DIR=`dirname $DST_PATH`
    SRC_DS_DIR=`dirname  $SRC_PATH`
    SRC_VM_DIR=`basename $SRC_PATH`
    if [ `is_disk $DST_PATH` -eq 1 ]; then
        log "-------------------------$DST_PATH"
    exit 0
    fi
    if [ "$SRC" == "$DST" ]; then
        exit 0
    fi
    ssh_make_path "$DST_HOST" "$DST_DIR"
    log "Moving $SRC to $DST"
    ssh_exec_and_log "$DST_HOST" "rm -rf '$DST_PATH'" \
        "Error removing target path to prevent overwrite errors"
    TAR_COPY="$SSH $SRC_HOST '$SUDO $TAR -C $SRC_DS_DIR -cf - $SRC_VM_DIR'"
    TAR_COPY="$TAR_COPY | $SSH $DST_HOST '$TAR -C $DST_DIR -xf -'"
    exec_and_log "eval $TAR_COPY" "Error copying disk directory to target host"
    exec_and_log "$SSH $SRC_HOST rm -rf $SRC_PATH"
    exit 0
    -------------------------------------------------------------------------------------------
    2、虛擬機遷移失敗2日志:
    Sat Mar  9 09:34:12 2013 [LCM][I]: New VM state is SAVE_MIGRATE
    Sat Mar  9 09:34:24 2013 [VMM][I]: ExitCode: 0
    Sat Mar  9 09:34:24 2013 [VMM][I]: Successfully execute virtualization driver operation: save.
    Sat Mar  9 09:34:24 2013 [VMM][I]: ExitCode: 0
    Sat Mar  9 09:34:24 2013 [VMM][I]: Successfully execute network driver operation: clean.
    Sat Mar  9 09:34:25 2013 [LCM][I]: New VM state is PROLOG_MIGRATE
    Sat Mar  9 09:34:25 2013 [TM][I]: mv: -------------------------/one_images_3.8.1/0/43/disk.0
    Sat Mar  9 09:34:25 2013 [TM][I]: ExitCode: 0
    Sat Mar  9 09:36:38 2013 [TM][I]: mv: Moving node153:/one_images_3.8.1/0/43 to bcec162:/one_images_3.8.1/0/43
    Sat Mar  9 09:36:38 2013 [TM][I]: mv: -------------------target copyy
    Sat Mar  9 09:36:38 2013 [TM][I]: mv: ++++++++++++++++++++++end copy
    Sat Mar  9 09:36:38 2013 [TM][I]: ExitCode: 0
    Sat Mar  9 09:36:38 2013 [LCM][I]: New VM state is BOOT
    Sat Mar  9 09:36:38 2013 [VMM][I]: ExitCode: 0
    Sat Mar  9 09:36:38 2013 [VMM][I]: Successfully execute network driver operation: pre.
    Sat Mar  9 09:36:42 2013 [VMM][I]: Command execution fail: /var/tmp/one/vmm/kvm/restore /one_images_3.8.1/0/43/checkpoint bcec162 43 bcec162
    Sat Mar  9 09:36:42 2013 [VMM][E]: restore: Command "virsh --connect qemu:///system restore /one_images_3.8.1/0/43/checkpoint" failed: error: Failed to restore domain from /one_images_3.8.1/0/43/checkpoint
    Sat Mar  9 09:36:42 2013 [VMM][I]: error: internal error process exited while connecting to monitor: Supported machines are:
    Sat Mar  9 09:36:42 2013 [VMM][I]: pc         RHEL 6.0.0 PC (alias of rhel6.0.0)
    Sat Mar  9 09:36:42 2013 [VMM][I]: rhel6.0.0  RHEL 6.0.0 PC (default)
    Sat Mar  9 09:36:42 2013 [VMM][I]: rhel5.5.0  RHEL 5.5.0 PC
    Sat Mar  9 09:36:42 2013 [VMM][I]: rhel5.4.4  RHEL 5.4.4 PC
    Sat Mar  9 09:36:42 2013 [VMM][I]: rhel5.4.0  RHEL 5.4.0 PC
    Sat Mar  9 09:36:42 2013 [VMM][E]: Could not restore from /one_images_3.8.1/0/43/checkpoint
    Sat Mar  9 09:36:42 2013 [VMM][I]: ExitCode: 1
    Sat Mar  9 09:36:42 2013 [VMM][I]: Failed to execute virtualization driver operation: restore.
    Sat Mar  9 09:36:42 2013 [VMM][E]: Error restoring VM: Could not restore from /one_images_3.8.1/0/43/checkpoint
    Sat Mar  9 09:36:42 2013 [DiM][I]: New VM state is FAILED
    登陸到節(jié)點:
    [root@bcec162 43]# virsh restore checkpoint 
    錯誤:從 checkpoint 恢復域失敗
    錯誤:internal error process exited while connecting to monitor: Supported machines are:
    pc         RHEL 6.0.0 PC (alias of rhel6.0.0)
    rhel6.0.0  RHEL 6.0.0 PC (default)
    rhel5.5.0  RHEL 5.5.0 PC
    rhel5.4.4  RHEL 5.4.4 PC
    rhel5.4.0  RHEL 5.4.0 PC
    修改了bcec162節(jié)點的/etc/libvirt/qemu.conf文件:
    # The user ID for QEMU processes run by the system instance
    user = "root"
    # The group ID for QEMU processes run by the system instance
    group = "root"
    # Whether libvirt should dynamically change file ownership
    # to match the configured user/group above. Defaults to 1.
    # Set to 0 to disable file ownership changes.
    #dynamic_ownership = 0
    bcec162節(jié)點遷移到node153節(jié)點成功。
    [root@node153 43]# ll
    total 5075464
    -rw-r--r-- 1 root     root  287215779 Mar  8 11:11 checkpoint
    -rw-r--r-- 1 oneadmin kvm   283538737 Mar  9 09:34 checkpoint.1362712278
    -rw-r--r-- 1 oneadmin kvm         920 Mar  9 09:26 deployment.0
    -rw-r--r-- 1 root     root 4621008896 Mar  9 10:14 disk.0
    -rw-r----- 1 root     root     401408 Mar  9 09:26 disk.1
    lrwxrwxrwx 1 oneadmin kvm          29 Mar  9 10:09 disk.1.iso -> /one_images_3.8.1/0/43/disk.1
    --------------------------------------------------------------------------------------------------------
    3、僅修改node152節(jié)點的/etc/libvirt/qemu.conf文件:
    # The user ID for QEMU processes run by the system instance
    #user = "root"
    # The group ID for QEMU processes run by the system instance
    #group = "root"
    # Whether libvirt should dynamically change file ownership
    # to match the configured user/group above. Defaults to 1.
    # Set to 0 to disable file ownership changes.
    dynamic_ownership = 0
    從bcec162節(jié)點遷移到node152不成功,日志如下:
    Sat Mar  9 10:31:47 2013 [LCM][I]: New VM state is SAVE_MIGRATE
    Sat Mar  9 10:31:54 2013 [VMM][I]: save: Moving old checkpoint file /one_images_3.8.1/0/43/checkpoint
    Sat Mar  9 10:31:54 2013 [VMM][I]: ExitCode: 0
    Sat Mar  9 10:31:54 2013 [VMM][I]: Successfully execute virtualization driver operation: save.
    Sat Mar  9 10:31:54 2013 [VMM][I]: ExitCode: 0
    Sat Mar  9 10:31:54 2013 [VMM][I]: Successfully execute network driver operation: clean.
    Sat Mar  9 10:31:55 2013 [LCM][I]: New VM state is PROLOG_MIGRATE
    Sat Mar  9 10:31:55 2013 [TM][I]: mv: -------------------------/one_images_3.8.1/0/43/disk.0
    Sat Mar  9 10:31:55 2013 [TM][I]: ExitCode: 0
    Sat Mar  9 10:35:02 2013 [TM][I]: mv: Moving bcec162:/one_images_3.8.1/0/43 to node152:/one_images_3.8.1/0/43
    Sat Mar  9 10:35:02 2013 [TM][I]: mv: -------------------target copyy
    Sat Mar  9 10:35:02 2013 [TM][I]: mv: ++++++++++++++++++++++end copy
    Sat Mar  9 10:35:02 2013 [TM][I]: ExitCode: 0
    Sat Mar  9 10:35:02 2013 [LCM][I]: New VM state is BOOT
    Sat Mar  9 10:35:03 2013 [VMM][I]: ExitCode: 0
    Sat Mar  9 10:35:03 2013 [VMM][I]: Successfully execute network driver operation: pre.
    Sat Mar  9 10:35:07 2013 [VMM][I]: Command execution fail: /var/tmp/one/vmm/kvm/restore /one_images_3.8.1/0/43/checkpoint node152 43 node152
    Sat Mar  9 10:35:07 2013 [VMM][E]: restore: Command "virsh --connect qemu:///system restore /one_images_3.8.1/0/43/checkpoint" failed: error: Failed to restore domain from /one_images_3.8.1/0/43/checkpoint
    Sat Mar  9 10:35:07 2013 [VMM][I]: error: operation failed: failed to retrieve chardev info in qemu with 'info chardev'
    Sat Mar  9 10:35:07 2013 [VMM][E]: Could not restore from /one_images_3.8.1/0/43/checkpoint
    Sat Mar  9 10:35:07 2013 [VMM][I]: ExitCode: 1
    Sat Mar  9 10:35:07 2013 [VMM][I]: Failed to execute virtualization driver operation: restore.
    Sat Mar  9 10:35:07 2013 [VMM][E]: Error restoring VM: Could not restore from /one_images_3.8.1/0/43/checkpoint
    Sat Mar  9 10:35:07 2013 [DiM][I]: New VM state is FAILED
    登陸到node152節(jié)點執(zhí)行restore命令:
    [root@node152 43]# virsh restore checkpoint
    error: Failed to restore domain from checkpoint
    error: internal error process exited while connecting to monitor: qemu: could not open disk image /one_images_3.8.1/0/43/disk.0: Permission denied
    將/etc/libvirt/qemu.conf文件中注釋掉dynamic_ownership=0,開啟user=root和group=root. 
    如果開啟dynamic_ownership則恢復虛擬機也會報出上面的錯誤信息。
    在node152節(jié)點上恢復虛擬機:
    [root@node152 43]# virsh restore checkpoint
    Domain restored from checkpoint
    [root@node152 43]# virsh list
     Id Name                 State
    ----------------------------------
    117 one-43               running
    參考文章:
    https://wiki.archlinux.org/index.php/QEMU_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)
    http://hi.baidu.com/juacm/item/f1fc3f98d8428ad07a7f01e2

    轉載請保持原鏈接:http://m.tkk7.com/ldwblog/archive/2013/03/08/396187.html
    posted on 2013-03-08 12:03 David1228 閱讀(761) 評論(0)  編輯  收藏 所屬分類: 云計算、虛擬化

    <2013年3月>
    242526272812
    3456789
    10111213141516
    17181920212223
    24252627282930
    31123456

    常用鏈接

    留言簿(4)

    隨筆分類

    隨筆檔案

    文章檔案

    新聞分類

    新聞檔案

    相冊

    收藏夾

    Java

    Linux知識相關

    Spring相關

    云計算/Linux/虛擬化技術/

    友情博客

    多線程并發(fā)編程

    開源技術

    持久層技術相關

    搜索

    •  

    積分與排名

    • 積分 - 358627
    • 排名 - 154

    最新評論

    閱讀排行榜

    評論排行榜

    主站蜘蛛池模板: 人妻在线日韩免费视频| 在线a级毛片免费视频| 亚洲国产综合精品| 午夜无遮挡羞羞漫画免费| 黄页免费视频播放在线播放| 亚洲AV无码一区二区二三区入口 | 91精品全国免费观看含羞草| 亚洲精品理论电影在线观看| 亚洲欧洲∨国产一区二区三区 | 国产片免费在线观看| 免费在线观影网站| 亚洲人成人无码.www石榴 | 色偷偷亚洲男人天堂| 亚洲成AV人片在WWW色猫咪| 大香人蕉免费视频75| 暖暖免费在线中文日本| 亚洲日韩精品无码AV海量| 久久精品国产精品亚洲艾草网| 日韩一品在线播放视频一品免费| 老司机69精品成免费视频| 337P日本欧洲亚洲大胆艺术图| 亚洲网站在线播放| 在线亚洲精品福利网址导航| 成人免费777777| 最近中文字幕无免费| 99免费在线视频| 婷婷国产偷v国产偷v亚洲| 亚洲人成激情在线播放| 国产亚洲精品a在线无码| 又黄又爽一线毛片免费观看| 99久久综合国产精品免费| 国内少妇偷人精品视频免费| 猫咪www免费人成网站| 亚洲中文字幕久久精品无码A| 亚洲国产一区国产亚洲| 国产成人亚洲精品狼色在线| 免费看国产一级片| 成人免费777777| 亚洲一区二区三区免费视频| 久久国产精品国产自线拍免费| 一级毛片无遮挡免费全部|