kvm初体验之六:克隆

目标:克隆vm1到vm1-clone

1. virsh suspend vm1

2. virt-clone --connect qemu:///system --original vm1 --name vm1-clone --file /vm/vm1-clone

或 virt-clone --connect qemu:///system -o vm1 -n vm1-clone -f /vm/vm1-clone

3. virsh start vm1-clone

登录vm1-clone, ifconfig发现eth0没起来, service network restart提示:


[[email protected] rules.d]# service network restart

Shutting down loopback interface: [ OK ]

Bringing up loopback interface: [ OK ]

Bringing up interface eth0: Device eth0 does not seem to be present, delaying initialization.

[FAILED]

解决方法:

http://www.unixmen.com/fix-device-eth0-seem-present-delaying-initialization-error/

1)删除文件/etc/udev/rules.d/70-persistent-net.rules;

2)编辑/etc/sysconfig/network-scripts/ifcfg-eth0,删除行HWADDR和UUID;

3)重启。

时间: 2024-10-14 16:22:57

kvm初体验之六:克隆的相关文章

kvm初体验之四:从Host登录Guest的五种方式

1. virt-viewer virt-viewer -c qemu:///system vm1 2. virt-manager (以非root身份运行) virt-manager -c qemu:///system 注: 若以root身份运行virt-manager会出现“Error starting Virtual Machine Manager: Failed to contact configuration server”的错误: 解决方法:以非root身份运行,会有窗口提示你输入roo

kvm初体验之三:vm的安装及管理

Host: CentOS release 6.4 (Final) Guest: CentOS release 6.6 (Final) 全程以root身份操作 1. host上创建桥br0 参考<KVM Virtualization in RHEL 6 Made Easy>2.6 Networking 我的/etc/sysconfig/network-scripts/ifcfg-br0文件内容为: DEVICE=br0 BOOTPROTO=dhcp IPV6INIT=yes IPV6_AUTOC

kvm初体验之一:参考文档

KVM Virtualization in RHEL 6 Made Easy KVM Virtualization in RHEL 6 Made Easy – Part 2 RHEL 6 Virtualization Getting Started GuideRHEL 6 Virtualization Host configuration and Guest Installation GuideRHEL 6 Virtualization Administration GuideRHEL 5 Vi

kvm初体验之二:安装

Host: CentOS release 6.4 (Final) 1. 开启处理器的虚拟化功能 进入BIOS,使能虚拟化功能: 进入linux, grep -E "vmx|svm" /proc/cpuinfo 查看是否有输出 2. 安装rpm包 yum install kvm python-virtinst libvirt libvirt-python virt-manager \virt-viewer libguestfs-tools 3. 检查内核模块kvm和kvm_intel是否

kvm初体验之八:调整vm的vcpu, memory, disk大小

假设host上创建的vm的名字为vm1. 1. 查看vm1的domain information [[email protected] thm]# virsh dominfo vm1 Id: 10 Name: vm1 UUID: e2597379-5cc5-4ffa-0531-a073a81c5811 OS Type: hvm State: running CPU(s): 1 CPU time: 52.6s Max memory: 1048576 KiB Used memory: 1048576

kvm初体验之五:vm连接网络的两种方式:bridge和nat

1. 在安装vm时指定网络连接方式 1)bridge virt-install --name vm1 --ram=1024 --vcpus=1 --disk path=/vm-images/vm1,size=2 --cdrom /root/iso/CentOS-6.6-x86_64-minimal.iso --network bridge:br0 2)nat virt-install --name vm1 --ram=1024 --vcpus=1 --disk path=/vm-images/v

kvm初体验之七:attach usb storage device to a VM

1. virsh attach-disk vm1 /dev/sdb sdc 将host上的/dev/sdb挂载到vm1的/dev/sdc上 2. virsh detach-disk vm1 sdc 将vm1上的/dev/sdc卸载

XENAPP 7.6 XENDESKTOP 7.6 初体验之六 安装服务器 VIRTUAL DESKTOP AGENT

概述 Xendesktop 7.X  以后的版本在架构上发生了改变,从原来的Independent Management Architecture (IMA)架构变成了现在的FlexCast Management Architecture (FMA)  ; 原来的IMA 架构下的Zone Data Collector ,Zone Preference Policies , Local Host Cache 等概念在新版本上不存在.当然 FMA架构上管理员在配置客户端以及管理应用发布上比之前要便利

kvm初体验之九:vm创建快照

1. 准备一个磁盘格式为qcow2的vm(raw格式的磁盘无法创建快照) 方法一:从头安装一个磁盘格式为qcow2的vm [[email protected] vm]# qemu-img create -f qcow2 -o preallocation=metadata /vm/vm2.qcow2 2G Formatting '/vm/vm2.qcow2', fmt=qcow2 size=2147483648 encryption=off cluster_size=65536 prealloca