Skip to content

launching a kvm vm

Nicolas Bonnand edited this page Sep 14, 2018 · 30 revisions

12.1 Launching a new KVM vm

This KVM section use a third party tool called virt-install which is part of virt-manager project http://virt-manager.org/. You have to install virt-manager and virt-install on your host first before going on further !

12.1.0 Main settings configuration

kvm

  • a Go to KVM tab
  • b Go to virt-install tab
  • c Enter VM name
  • d Enter VM memory
  • e Enter VM vcpu

12.1.1 Disk image configuration

  • f In order to define disk config, you can press kvm.

A popup virt disk wizzard will guide you to enter disk parameters ( press g if you want to directly create a new disk entry without wizzard help ): kvm.

  • h Main VM disk has been defined as a qcow2 file located at /home/vm/asav01.qcow2
  • k cdrom disk has been defined as an iso file located at /home/vm/asav_day0-iso. ( This iso file is used for first time configuration of an ASAv firewall. It contains initial configuration )

12.1.2 Network configuration

  • m In order to define network config, you can press kvm.

A popup virt network wizzard will guide you to enter network parameters ( press n if you want to directly create a new network entry without wizzard help ): kvm.
Here with have chosen 'openvswitch bridge' mode, because we want this new ASA interface to be connected to OvS. The OvS port will be created with name 'asav01-cons' on bridge 'br0'. Our ASAv will be provided with 3 interfaces:

  • o asav01-cons for console interface
  • p asav01-0 for GigabitEthernet0/0 interface
  • q asav01-1 for GigabitEthernet0/1 interface
  • l Each of them will be on OvS bridge br0

12.1.3 Addition configuration

Now we have few more options to configure.

  • r Push kvm in order to create a new entry s and its value t. There is no wizzard editor , however please note that autocompletion will guide you for option name selection s.

12.1.4 Launching VM

u When you are done with options configuration, press kvm to create and launch VM. ovs-toolbox will launch following command in order to create ASAV01 VM:

sudo -n virt-install --name ASAV01 --ram 1024 --vcpu 1 --disk path=/home/vm/asav01.qcow2,format=qcow2,device=disk,bus=ide,cache=none --disk path=/home/vm/asav_day0-iso,format=iso,device=cdrom --network bridge=br0,model=virtio,virtualport_type=openvswitch,target=asav01-cons --network bridge=br0,model=virtio,virtualport_type=openvswitch,target=asav01-0 --network bridge=br0,model=virtio,virtualport_type=openvswitch,target=asav01-1 --connect qemu:///system --cpu host --arch x86_64 --machine pc-1.0 --os-type linux --os-variant generic --noacpi --virt-type kvm --import --console pty,target_type=virtio --serial tcp,host=127.0.0.1:4554,mode=bind,protocol=telnet --noautoconsole

12.1.5 Verifications

Let's now go to Ports tab and IF sub-tab,
kvm

  • x We can see that 3 ports asav01-0, asav01-1 and asav01-cons have been created on br0 bridge.
  • y If we select asav01-0 port, we can see in external_ids part some KVM information ( for example VM mac address of ASAV interface which is linked with asav01-0 port. )



Let's Launch virt-manager http://virt-manager.org/ to follow launch status of this VM: kvm

What does it look like in plotnetcfg ? kvm

  • z1 Go to plotnetcfg
  • z2 Refresh image

And finally what does it look like from ASAV01 console ? kvm

Clone this wiki locally