美文网首页
kvm to vbox network settting: No

kvm to vbox network settting: No

作者: 9682f4e55d71 | 来源:发表于2018-11-27 15:34 被阅读15次
    1. 镜像转换
    qemu-img convert -O vdi gnome.qcow2 gnome.vdi
    
    #if its a raw image then:
    VBoxManage convertdd opnstk.raw VBox.vdi --format VDI
    
    1. 导入后网络问题 No suitable device found for this connection.
      原因是导入后的网卡地址发生了改变,
      复制一份 之前的网络配置,修改里面的 HWADDR="08:00:27:0c:f8:08" 修改成新的网站地址
      重启即可
    $ ssh root@192.168.3.155
    Last login: Tue Nov 27 15:08:02 2018
    [root@cbmdev ~]# ps aux | grep -i network
    root       670  0.1  0.4 552172  9188 ?        Ssl  15:07   0:00 /usr/sbin/NetworkManager --no-daemon
    root       723  0.0  0.2 107396  5480 ?        S    15:07   0:00 /sbin/dhclient -d -q -sf /usr/libexec/nm-dhcp-helper -pf /var/run/dhclient-enp0s3.pid -lf /var/lib/NetworkManager/dhclient-a0055547-c330-38d0-acde-72bff2d7cb53-enp0s3.lease -cf /var/lib/NetworkManager/dhclient-enp0s3.conf enp0s3
    root      1232  0.0  0.0 112704   988 pts/0    S+   15:11   0:00 grep --color -a --exclude-dir=braintree --exclude-dir=.svn --exclude-dir=node_modules --exclude=*.gif --exclude=*.png --exclude=*.psd --exclude=*.jpg --exclude=*.min.js --exclude-dir=.git --exclude-dir=logs --exclude-dir=vendor -i network
    [root@cbmdev ~]# nmcli connection show
    NAME                UUID                                  TYPE      DEVICE
    Wired connection 1  a0055547-c330-38d0-acde-72bff2d7cb53  ethernet  enp0s3
    ens3                0a32cbf0-2aaa-4efa-97f2-114a89d2f16e  ethernet  --
    [root@cbmdev ~]# nmcli connection show -a
    NAME                UUID                                  TYPE      DEVICE
    Wired connection 1  a0055547-c330-38d0-acde-72bff2d7cb53  ethernet  enp0s3
    [root@cbmdev ~]#
    [root@cbmdev ~]#
    [root@cbmdev ~]# nmcli device status
    DEVICE  TYPE      STATE      CONNECTION
    enp0s3  ethernet  connected  Wired connection 1
    lo      loopback  unmanaged  --
    [root@cbmdev ~]# nmcli device connect ens3
    Error: Device 'ens3' not found.
    [root@cbmdev ~]# systemctl status network.service
    ● network.service - LSB: Bring up/down networking
       Loaded: loaded (/etc/rc.d/init.d/network; bad; vendor preset: disabled)
       Active: inactive (dead)
         Docs: man:systemd-sysv-generator(8)
    [root@cbmdev ~]# systemctl start network.service
    Job for network.service failed because the control process exited with error code. See "systemctl status network.service" and "journalctl -xe" for details.
    [root@cbmdev ~]# systemctl status network.service
    ● network.service - LSB: Bring up/down networking
       Loaded: loaded (/etc/rc.d/init.d/network; bad; vendor preset: disabled)
       Active: failed (Result: exit-code) since Tue 2018-11-27 15:14:39 CST; 9s ago
         Docs: man:systemd-sysv-generator(8)
      Process: 1261 ExecStart=/etc/rc.d/init.d/network start (code=exited, status=1/FAILURE)
    
    Nov 27 15:14:38 cbmdev systemd[1]: Starting LSB: Bring up/down networking...
    Nov 27 15:14:39 cbmdev network[1261]: Bringing up loopback interface:  [  OK  ]
    Nov 27 15:14:39 cbmdev network[1261]: Bringing up interface ens3:  Error: Connection activation failed: No suitable device found for this connection.
    Nov 27 15:14:39 cbmdev network[1261]: [FAILED]
    Nov 27 15:14:39 cbmdev systemd[1]: network.service: control process exited, code=exited status=1
    Nov 27 15:14:39 cbmdev systemd[1]: Failed to start LSB: Bring up/down networking.
    Nov 27 15:14:39 cbmdev systemd[1]: Unit network.service entered failed state.
    Nov 27 15:14:39 cbmdev systemd[1]: network.service failed.
    [root@cbmdev ~]# ip a
    1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
        link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
        inet 127.0.0.1/8 scope host lo
           valid_lft forever preferred_lft forever
        inet6 ::1/128 scope host
           valid_lft forever preferred_lft forever
    2: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
        link/ether 08:00:27:0c:f8:08 brd ff:ff:ff:ff:ff:ff
        inet 192.168.3.155/22 brd 192.168.3.255 scope global noprefixroute dynamic enp0s3
           valid_lft 89509sec preferred_lft 89509sec
        inet6 fe80::591a:c5fc:e79:60ca/64 scope link noprefixroute
           valid_lft forever preferred_lft forever
    [root@cbmdev ~]# cd /etc/sysconfig/network-scripts/
    [root@cbmdev network-scripts]# cp ifcfg-ens3 ifcfg-enp0s3
    [root@cbmdev network-scripts]# vim ifcfg-enp0s3
    
    [root@cbmdev ~]# cat /etc/sysconfig/network-scripts/ifcfg-enp0s3
    TYPE="Ethernet"
    PROXY_METHOD="none"
    BROWSER_ONLY="no"
    BOOTPROTO="static"
    DEFROUTE="yes"
    IPV4_FAILURE_FATAL="no"
    IPV6INIT="yes"
    IPV6_AUTOCONF="yes"
    IPV6_DEFROUTE="yes"
    IPV6_FAILURE_FATAL="no"
    IPV6_ADDR_GEN_MODE="stable-privacy"
    NAME="enp0s3"
    HWADDR="08:00:27:0c:f8:08"
    UUID="0a32cbf0-2aaa-4efa-97f2-114a89d2f16e"
    DEVICE="enp0s3"
    ONBOOT="yes"
    HWADDR="08:00:27:0c:f8:08"
    IPADDR=192.168.0.234
    GATEWAY=192.168.0.1
    NETMASK=255.255.0.0
    DNS1=192.168.0.10
    DNS2=114.114.114.114
    
    

    相关文章

      网友评论

          本文标题:kvm to vbox network settting: No

          本文链接:https://www.haomeiwen.com/subject/jswgqqtx.html