command_line
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
command_line [2011/04/26 16:41] – k2patel | command_line [2020/08/10 02:35] – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | |||
+ | |||
====== KVM Command Line ====== | ====== KVM Command Line ====== | ||
Line 28: | Line 30: | ||
</ | </ | ||
+ | [[http:// | ||
+ | ==== Test your bootable USB on kvm ==== | ||
+ | In order to test your USB using KVM use following command. | ||
+ | <code bash> | ||
+ | qemu-kvm -hdb < | ||
+ | </ | ||
+ | In my case device was "/ | ||
==== Converting Existing Image ==== | ==== Converting Existing Image ==== | ||
=== Converting VMWARE image for KVM === | === Converting VMWARE image for KVM === | ||
+ | |||
use following command. | use following command. | ||
<code bash> | <code bash> | ||
qemu-img convert own_Cloud.vmdk -O qcow2 ownCloud.qcow | qemu-img convert own_Cloud.vmdk -O qcow2 ownCloud.qcow | ||
</ | </ | ||
+ | |||
+ | === Converting .ova to KVM image === | ||
+ | what is ova - Open Virtualization Format | ||
+ | |||
+ | [[http:// | ||
+ | |||
+ | Install it, which give you command " | ||
+ | |||
+ | <code bash> | ||
+ | ovftool -tt=vmx Amazon-EC2-VM-Import-Connector.ova amazon_kvm | ||
+ | </ | ||
+ | |||
+ | converting .ova is just easy\\ | ||
+ | some times ovftool failing\\ | ||
+ | |||
+ | < | ||
+ | <span style=" | ||
+ | < | ||
+ | </ | ||
+ | |||
+ | Now follow [[ #Converting VMWARE image for KVM | Converting VMWARE image for KVM ]] | ||
+ | |||
+ | |||
==== Create New KVM Guest using existing Image ==== | ==== Create New KVM Guest using existing Image ==== | ||
Line 99: | Line 132: | ||
</ | </ | ||
+ | ==== FU Commands ==== | ||
+ | |||
+ | === Create Disk === | ||
+ | create disk of size 10G | ||
+ | <code bash | for dynamic allocation> | ||
+ | qemu-img create -f raw vdisk.img 10G | ||
+ | </ | ||
+ | OR | ||
+ | <code bash | preallowcation> | ||
+ | dd if=/ | ||
+ | </ | ||
+ | |||
+ | ==== How to allow network access to KVM Guest ==== | ||
+ | |||
+ | Modify guest.xml file and listen variable. | ||
+ | <code bash | vi / | ||
+ | < | ||
+ | </ | ||
+ | |||
+ | ==== Extract folder from KVM Guest Image ==== | ||
+ | This is appear to be far easy solution then i thought.\\ | ||
+ | [[http:// | ||
+ | |||
+ | For RHEL you require following packages installed. | ||
+ | * libguestfs-tools | ||
+ | * libguestfs-xfs | ||
+ | |||
+ | <code bash> | ||
+ | mkdir test | ||
+ | virt-copy-out -a machine2.qcow2 / | ||
+ | </ |
command_line.txt · Last modified: 2021/08/24 21:11 by k2patel