代码如下: [root@localhost ~]# guestmount -a /root/centos.img -m /dev/VolGroup/lv_root --rw /mnt/usb
[root@localhost ~]# cd /mnt/usb/ [root@localhost usb]# ls bin dev home lib64 media mnt opt root selinux sys usr boot etc lib lost+found misc net proc sbin srv tmp var 8,修改kvm中虚拟机的内存大小
1572864/p p[root@nfs ~]# virsh list Id Name State ---------------------------------- 1 win2003 running 3 vm01 running/p p[root@nfs ~]# virsh shutdown vm01 ###修改配置文件后需要重新启动下虚拟机,先关闭它 Domain vm01 is being shutdown/p p[root@nfs ~]# virsh list ###确认已经被关闭 Id Name State ---------------------------------- 1 win2003 running/p p[root@nfs ~]# virsh start vm01 ###启动它 Domain vm01 started/p p[root@nfs ~]# virsh list Id Name State ---------------------------------- 1 win2003 running 3 vm01 running 到机器上查看内存大小:
代码如下: [root@nfs web01]# virsh list --all Id Name State ---------------------------------- 1 web01 running ##处于工作状态 - myweb01 shut off - myweb03 shut off - mywin2003 shut off - myxp shut off - xp shut off
代码如下: [root@nfs web01]# virsh undefine web01 ##处于工作状态也能删除! Domain web01 has been undefined
代码如下: [root@nfs web01]# virsh list Id Name State ---------------------------------- 1 web01 running
代码如下: [root@nfs web01]# virsh list --all ##web01已经没有了! Id Name State ---------------------------------- - myweb01 shut off - myweb03 shut off - mywin2003 shut off - myxp shut off - xp shut off
代码如下: [root@nfs web01]# virsh define web01 error: Failed to open file 'web01': No such file or directory