Ask Your Question

KVM: blank VM (without OS)

asked 2013-02-14 13:41:23 -0500

Rhino gravatar image

I need to create blank virtual machine. Set HDD, RAM and other "hardware" configuration without installation operating system (as in VirtualBox). Do you have any hint how I can do it? Thanks

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2013-02-14 15:58:46 -0500

The IceMan Blog gravatar image

you can use the define option to import a VM xml file let say you have a xml file like this (copy 'n' pase to XML file)

<domain type='kvm'>
    <type arch='x86_64' machine='pc-0.12'>hvm</type>
    <boot dev='hd'/>
  <clock offset='utc'/>
    <disk type='block' device='disk'>
      <driver name='qemu' type='raw'/>
      <source dev='/dev/vg-storage/tempvm'/>
      <target dev='hda' bus='ide'/>
      <address type='drive' controller='0' bus='0' unit='0'/>
    <controller type='ide' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
    <memballoon model='virtio'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>

then run on the shell

virsh define filename.xml

then you can edit/manage the machine with 'Virtual Machine Manager'

the other way is to use virt-install with the --import switch i think

edit flag offensive delete link more

Question Tools


Asked: 2013-02-14 13:41:23 -0500

Seen: 436 times

Last updated: Feb 14 '13