I've made something like this work, but I couldn't make the datablock as virtio. If you call for a virtio datablock by default it comes up as /dev/vde, for which many kernels don't have the drivers.

So on mine, I declared OS image to be virtio / dev/vda,
swap to be virtio /dev/vdb
datablock to be ide /dev/hda
iso disk to be ide /dev/hdc.

Steve Timm



On Fri, 4 Mar 2011, Leong Marco wrote:

Hi all,

I have created a CentOS which is sized 2GB. I would like to add a DATABLOCK to 
it. However, the DATABLOCK cannot be found with fdisk -l (in the VM). It was 
able to mount the swap, but no the DATABLOCK.

Here is the config file that I have. Via
dumpxml in virsh:
<domain type='kvm' id='3'>
 <name>one-103</name>
 <uuid>61d4e005-8fd1-c0b5-43f4-1f75596a8451</uuid>
 <memory>1048576</memory>
 <currentMemory>1048576</currentMemory>
 <vcpu>1</vcpu>
 <os>
   <type arch='x86_64' machine='rhel5.4.0'>hvm</type>
   <boot dev='hd'/>
 </os>
 <features>
   <acpi/>
 </features>
 <clock offset='utc'/>
 <on_poweroff>destroy</on_poweroff>
 <on_reboot>restart</on_reboot>
 <on_crash>destroy</on_crash>
 <devices>
   <emulator>/usr/bin/kvm</emulator>
   <disk type='file' device='disk'>
     <driver name='qemu' type='raw'/>
     <source file='/srv/cloud/one/var/103/images/disk.0'/>
     <target dev='hda' bus='virtio'/>
   </disk>
   <disk type='file' device='disk'>
     <driver name='qemu' type='raw'/>
     <source file='/srv/cloud/one/var/103/images/disk.1'/>
     <target dev='hde' bus='virtio'/>
   </disk>
   <disk type='file' device='disk'>
     <driver name='qemu' type='raw'/>
     <source file='/srv/cloud/one/var/103/images/disk.2'/>
     <target dev='hdd' bus='ide'/>
   </disk>
   <interface type='bridge'>
     <mac address='02:00:ac:19:04:0c'/>
     <source bridge='br0'/>
     <target dev='vnet0'/>
   </interface>
 </devices>
</domain>

The definition file.

CPU     = 1
MEMORY  = 1024
NAME    = "Web Server"

OS = [ ARCH = x86_64, ROOT=hda ]

DISK = [ IMAGE = "base-centos-5.5-x86_64", bus = virtio, target = hda]

DISK = [IMAGE = "5gb-image", bus = virtio]

DISK = [TYPE = swap, SIZE= 1024,  target = hdd]

FEATURES = [ACPI = yes]

NIC = [ NETWORK = "Network", IP=172.25.4.12]

Please, could anyone help one this. Since I have to prepare several VM on next 
week for other students to play inside it.


Leong Marco
leong.chou....@usj.edu.mo





--
------------------------------------------------------------------
Steven C. Timm, Ph.D  (630) 840-8525
t...@fnal.gov  http://home.fnal.gov/~timm/
Fermilab Computing Division, Scientific Computing Facilities,
Grid Facilities Department, FermiGrid Services Group, Group Leader.
Lead of FermiCloud project.
_______________________________________________
Users mailing list
Users@lists.opennebula.org
http://lists.opennebula.org/listinfo.cgi/users-opennebula.org

Reply via email to