Rajiv Rajaian
2010-Jul-19 05:45 UTC
[libvirt-users] How to create a guest os from existing disk image file with virt-install
Hi I have configured KVM with Fedora Core 13 by enabling the KVM virtualization option while installing OS. I have successfully created the guest OS by using the virt-install API /usr/sbin/virt-install --name centos5 --ram 512 --disk path=/var/lib/libvirt/images/ centos.img,size=5 --network network:default --accelerate --vnc -c /tmp/CentOS-5.3-i386-bin-DVD.iso Os installed successfully and after rebooting am able to login to the guest OS using the virt-viewer command using vnc viewer ..It shows Booting from Hard Disk... GRUB Loading stage2..... But the guest os is not booted I want to the create the guest os from existing configured disk /var/lib/libvirt/images/centos.img.. What modifications should be done with my configuration file ?? Pleas help me to solve this. [root at kvmcluster ~]# virsh dumpxml centos5 <domain type='qemu' id='2'> <name>centos5</name> <uuid>cabfad09-ff8b-e1ca-051a-6729e301f6a1</uuid> <memory>524288</memory> <currentMemory>524288</currentMemory> <vcpu>1</vcpu> <os> <type arch='i686' machine='fedora-13'>hvm</type> <boot dev='cdrom'/> </os> <features> <acpi/> <apic/> <pae/> </features> <clock offset='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>destroy</on_reboot> <on_crash>destroy</on_crash> <devices> <emulator>/usr/bin/qemu</emulator> <disk type='file' device='disk'> <driver name='qemu' type='raw'/> <source file='/var/lib/libvirt/images/centos.img'/> <target dev='hda' bus='ide'/> <alias name='ide0-0-0'/> <address type='drive' controller='0' bus='0' unit='0'/> </disk> <disk type='file' device='cdrom'> <driver name='qemu'/> <source file='/tmp/CentOS-5.3-i386-bin-DVD.iso'/> <target dev='hdc' bus='ide'/> <readonly/> <alias name='ide0-1-0'/> <address type='drive' controller='0' bus='1' unit='0'/> </disk> <controller type='ide' index='0'> <alias name='ide0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/> </controller> <interface type='network'> <mac address='52:54:00:bf:32:c2'/> <source network='default'/> <target dev='vnet0'/> <alias name='net0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> </interface> <serial type='pty'> <source path='/dev/pts/2'/> <target port='0'/> <alias name='serial0'/> </serial> <console type='pty' tty='/dev/pts/2'> <source path='/dev/pts/2'/> <target port='0'/> <alias name='serial0'/> </console> <input type='mouse' bus='ps2'/> <graphics type='vnc' port='5900' autoport='yes' keymap='en-us'/> <video> <model type='cirrus' vram='9216' heads='1'/> <alias name='video0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> </video> </devices> <seclabel type='dynamic' model='selinux'> <label>system_u:system_r:svirt_t:s0:c370,c413</label> <imagelabel>system_u:object_r:svirt_image_t:s0:c370,c413</imagelabel> </seclabel> </domain> -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20100719/f7dcba3e/attachment.htm>
Carla Araujo
2010-Jul-19 17:45 UTC
[libvirt-users] How to create a guest os from existing disk image file with virt-install
Hi Rajiv On Mon, Jul 19, 2010 at 02:45, Rajiv Rajaian <rajiv.care at gmail.com> wrote:> Hi > I want to the create the guest os from existing configured disk > /var/lib/libvirt/images/centos.img.. What modifications should be done with > my configuration file ?? >You can import the *.img* executing virt-install with this parameters (this is just an example): virt-install --name NewVM --ram 512 --vcpus 1 --disk path=/var/lib/libvirt /images/centos.img *--import* --noautoconsole --force -- Carla -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20100719/be09012d/attachment.htm>