菜鸟玩云计算之十三:虚拟机迁移故障排除若干

 菜鸟玩云计算之十三:虚拟机迁移故障排除若干

今天把系统重装为Ubuntu 12.04.3LTS,然后把虚拟机迁移回来。出现若干错误。现把解决方法记录如下:


1)运行下面语句定义虚拟机:

$ sudo virsh define /etc/libvirt/qemu/vm1.xml

出现错误:

error: Failed to create domain from ubuntu.xml

error: unknown OS type hvm

解决方法:

把 root 添加到libvirtd和kvm组中。

sudo su
adduser `id -un` kvm
adduser `id -un` libvirtd



2)启动虚拟机出现错误:

$ sudo virsh start vm1

error: Failed to start domain vm1
error: Network not found: no network with matching name 'default'

解决方法:

$ virsh net-list --all
Name                 State      Autostart
-----------------------------------------

$ sudo virsh net-define /var/lib/libvirt/network/default.xml
Network default defined from /var/lib/libvirt/network/default.xml

$ sudo virsh net-autostart default
Network default marked as autostarted


$ sudo virsh net-start default
Network default started


$ brctl show
bridge name    bridge id        STP enabled    interfaces
br0        8000.f0def16d9385    no        eth0
virbr0        8000.5254009a780b    yes        virbr0-nic
$ virsh net-list --all

Name                 State      Autostart
-----------------------------------------
default              active     yes       

3)启动虚拟机报错:

$ sudo virsh start vm1
error: Failed to start domain vm1
error: internal error Process exited while reading console log output: Supported machines are:
pc         Standard PC (alias of pc-1.0)
pc-1.0     Standard PC (default)
pc-0.14    Standard PC
pc-0.13    Standard PC
pc-0.12    Standard PC
pc-0.11    Standard PC, qemu 0.11
pc-0.10    Standard PC, qemu 0.10
isapc      ISA-only PC

解决方法:

修改vm1.xml:


  vm-gitlab6
  6deea115-1bdf-03f3-974e-182c140411b5
  4194304
  4194304
  2
  
    hvm
    
    
  
  
    
  
  
  destroy
  restart
  destroy
  
    
    /usr/bin/qemu-system-x86_64
...... 

4启动虚拟机报错:

$ sudo virsh start vm-ubuntu1204

error: Failed to start domain vm-ubuntu1204
error: Unable to read from monitor: Connection reset by peer

网上说:

$ sudo virsh managedsave-remove vm-ubuntu1204

仍然报错:

Domain vm-ubuntu1204 has no manage save image; removal skipped

机器CPU/内存不足,你需要更新硬件了。










你可能感兴趣的:(bigdata)