is it possible to run KVM on Azure

前端 未结 1 1960
时光取名叫无心
时光取名叫无心 2021-01-06 10:42

Azure Fabric runs on a customized version of Hyper-V, it appears. Is it possible to run a KVM virtualized instance on Azure (using nested virtualization)?

I have a c

1条回答
  •  南方客
    南方客 (楼主)
    2021-01-06 11:22

    This is possible, but you need select Dv3 and Ev3 series VM. Also, based on my knowledge, Windows VM is also not supported, Linux VM is supported.

    You need install kvm and virt-manager firstly.

    apt-get update
    apt-get install kvm qemu-kvm libvirt-bin virtinst
    apt install virt-manager 
    adduser `id -un` libvirt
    adduser `id -un` kvm
    

    You also need config nic like below: vi /etc/network/interfaces

    iface br0 inet static
            address 192.168.0.100
            network 192.168.0.0
            netmask 255.255.255.0
            broadcast 192.168.0.255
            gateway 192.168.0.1
            bridge_ports eth0
            bridge_fd 9
            bridge_hello 2
            bridge_maxage 12
            bridge_stp off
    

    Restart nic by using /etc/init.d/networking restart.

    Now, you could create a VM by using virt-install --connect qemu:///system -n vm10 -r 512 --vcpus=2 --disk path=/var/lib/libvirt/images/vm10.img,size=12 -c /dev/cdrom --vnc --noautoconsole --os-type linux --os-variant debiansqueeze --accelerate --network=bridge:br0 --hvm .

    You could check the VM's status by using virsh -c qemu:///system list, you will get like below:

    root@shui:~# virsh -c qemu:///system list
     Id    Name                           State
    ----------------------------------------------------
     4     vm10                           running
    

    0 讨论(0)
提交回复
热议问题