-
Notifications
You must be signed in to change notification settings - Fork 27
launching a 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 !
- a Go to KVM tab
- b Go to virt-install tab
- c Enter VM name
- d Enter VM memory
- e Enter VM vcpu
- f In order to define disk config, you can press .
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 ): .
- 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 )
- m In order to define network config, you can press .
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 ):
.
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
Now we have few more options to configure.
- r Push 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.
u When you are done with options configuration, press 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
Let's now go to Ports tab and IF sub-tab,
- 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:
What does it look like in plotnetcfg ?
- z1 Go to plotnetcfg
- z2 Refresh image
And finally what does it look like from ASAV01 console ?
© 2018 Nicolas Bonnand, licensed under the Apache License, Version 2.0