是否可以在Azure上运行KVM [英] is it possible to run KVM on Azure

查看:325
本文介绍了是否可以在Azure上运行KVM的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Azure Fabric在Hyper-V的自定义版本上运行,它出现了.是否可以在Azure上运行KVM虚拟实例(使用嵌套虚拟化)?

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)?

我有一个基于Debian的自定义VHD(例如).基于此文档 https://docs. microsoft.com/en-us/azure/virtual-machines/linux/create-upload-generic ,如果Hyper-V驱动程序内置在内核中,这似乎是有可能的.

I have a custom VHD which is based on Debian (say). Based on this document https://docs.microsoft.com/en-us/azure/virtual-machines/linux/create-upload-generic, it seems that it might be possible, if the Hyper-V drivers are built into the kernel.

任何人都可以在Azure上成功运行KVM实例吗?如果是这样,请您分享经验.

Has anyone run successfully run a KVM instance on Azure? If so, could you please share your experience.

推荐答案

这是可能的,但是您需要选择Dv3和Ev3系列VM.另外,据我所知,Windows VM也不受支持,Linux VM也受支持.

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.

首先需要安装kvmvirt-manager.

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

您还需要如下配置nic:vi /etc/network/interfaces

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

使用/etc/init.d/networking restart重新启动nic.

现在,您可以使用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 创建VM.

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 .

您可以使用virsh -c qemu:///system list检查VM的状态,如下所示:

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

这篇关于是否可以在Azure上运行KVM的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆