2013年2月28日 星期四

KVM-VIRSH

Create a domain

sudo virt-install \
        --name [KVM NAME] \
        --ram=2048 \
        --disk [DRIVE(LVM) IMAGE PATH]\
        --network [bridge=[bridged interface]] \
        --nographics  \  #console only
        --location=http://debian.csie.ntu.edu.tw/debian/dists/testing/main/installer-amd64/ \ #installer location
        --extra-args "console=tty0 console=ttyS0,115200nn8" #extra kernel args, attaching console to VM

Delete a domain

sudo virsh undefine [KVM NAME]

Connect to local VM

virsh list --all
virsh console [VM domain name]

dump config to xml

virsh dumpxml [VM guest name]

error: operation failed: Active console session exists for this domain

virsh console --force [VM domain name]

1 則留言:

  1. [root@dhp10:~/.ssh]# virsh console vRR-1 --force
    Connected to domain vRR-1
    Escape character is ^]

    Login: admin
    Password:

    This simulation software is the property of Alcatel. It may not
    be sold, leased, loaned or licensed to any non-Alcatel entity.
    *A:vRR#

    回覆刪除