zoukankan      html  css  js  c++  java
  • virsh console ubuntu

    ubuntu guest setting

      systemctl disable systemd-networkd-wait-online
      systemctl enable serial-getty@ttyS0.service
      systemctl start serial-getty@ttyS0.service
    

    login by console

      virsh console ubuntu1
    

    exit guest

      ctrl + ]
    

    virsh xml define

    <domain type='kvm' >
      <name>slb1</name>
      <memory unit='MiB'>1024</memory>
      <currentMemory unit='MiB'>1024</currentMemory>
      <vcpu placement='static'>1</vcpu>
      <os>
        <type arch='x86_64' machine='pc'>hvm</type>
        <boot dev='hd'/>
        <!--boot dev='cdrom'/--> 
      </os>
      <features>
        <acpi/>
        <apic/>
      </features>
      <on_poweroff>destroy</on_poweroff>
      <on_reboot>restart</on_reboot>
      <on_crash>destroy</on_crash>
      <devices>
        <disk type='file' device='disk'>
          <driver name='qemu' type='qcow2'/>
          <source file='/opt/vms/slb1.qcow2'/>
          <target dev='hda' bus='ide'/>
        </disk>
    
        <interface type='network'>
          <source network='default'/>
          <target dev='vnet-slb1'/>
        </interface>
    
        <serial type='pty'>
          <target port='0'/>
        </serial>
        <console type='pty'>
          <target type='serial' port='0'/>
        </console>
    
        <input type='mouse' bus='ps2'>
          <alias name='input0'/>
        </input>
    
        <input type='keyboard' bus='ps2'>
          <alias name='input1'/>
        </input>
    
        <serial type='pty'>
          <target port='0'/>
        </serial>
        <console type='pty'>
          <target type='serial' port='0'/>
        </console>
    
        <graphics type='vnc' port='-1' listen = '0.0.0.0' keymap='en-us'/>
    
      </devices>
    </domain>
    

    end.

  • 相关阅读:
    DNS放大攻击
    Java并发编程(四):并发容器(转)
    关注商业价值
    样式小记
    应用程序优化
    查看当前的连接和锁
    重命名你的数据库
    转:对XML插入操作
    对数据的分页再一次思考
    不浪费自己的时间,同时也不浪费别人的时间
  • 原文地址:https://www.cnblogs.com/sixloop/p/8044785.html
Copyright © 2011-2022 走看看