Hi,
I want to use VDSM without RHEV.
I did the following:
I installed VDSM on RHEL6.2Beta using yum and .
Changed ssl = false in /etc/vdsm/vdsm.conf (after copied it from /usr/share/doc/vdsm-4.9/vdsm.conf.sample).
Added spice_tls=0 in /etc/libvirt/qemu.conf.
Then restarted vdsmd.
I ran the following script named start.py:
#!/usr/bin/python
import sys
import uuid
import time
sys.path.append('/usr/share/vdsm')
import vdscli
from storage.sd import LOCALFS_DOMAIN, DATA_DOMAIN
from storage.volume import COW_FORMAT, SPARSE_VOL, LEAF_VOL, BLANK_UUID
spUUID = str(uuid.uuid4())
sdUUID = str(uuid.uuid4())
imgUUID = str(uuid.uuid4())
volUUID = str(uuid.uuid4())
path = "/tmp/localstoragedomain"
# chown vdsm:kvm /tmp/localstoragedomain
s = vdscli.connect()
masterVersion = 1
hostID = 1
def vdsOK(d):
print d
if d['status']['code']:
raise Exception(str(d))
return d
def waitTask(s, taskid):
while vdsOK(s.getTaskStatus(taskid))['taskStatus']['taskState'] != 'finished':
time.sleep(3)
vdsOK(s.clearTask(taskid))
vdsOK(s.connectStorageServer(LOCALFS_DOMAIN, "my favorite pet", [dict(id=1, connection=path)]))
vdsOK(s.createStorageDomain(LOCALFS_DOMAIN, sdUUID, "my local domain", path, DATA_DOMAIN, 0))
vdsOK(s.createStoragePool(LOCALFS_DOMAIN, spUUID, "pool name", sdUUID, [sdUUID], masterVersion))
# connect to an existing pool, and become pool manager.
vdsOK(s.connectStoragePool(spUUID, hostID, "scsikey", sdUUID, masterVersion))
tid = vdsOK(s.spmStart(spUUID, -1, -1, -1, 0))['uuid']
waitTask(s, tid)
sizeGiB = 100
tid = vdsOK(s.createVolume(sdUUID, spUUID, imgUUID, sizeGiB,
COW_FORMAT, SPARSE_VOL, LEAF_VOL,
volUUID, "volly",
BLANK_UUID, BLANK_UUID))['uuid']
waitTask(s, tid)
vmId = str(uuid.uuid4())
vdsOK(
s.create(dict(vmId=vmId,
drives=[dict(poolID=spUUID, domainID=sdUUID, imageID=imgUUID, volumeID=volUUID)],
memSize=256,
display="vnc",
vmName="vm1",
)
)
)
When running it I get the following error:
{'status': {'message': 'OK', 'code': 0}, 'statuslist': [{'status': 451, 'id': 1}]}
{'status': {'message': "Permission settings on the specified path do not allow access to the storage. Verify permission settings on the specified storage path.: 'path = /rhev/data-center/mnt/_tmp_localstoragedomain'", 'code': 469}}
Traceback (most recent call last):
File "/tmp/start.py", line 39, in <module>
vdsOK(s.createStorageDomain(LOCALFS_DOMAIN, sdUUID, "my local domain", path, DATA_DOMAIN, 0))
File "/tmp/start.py", line 29, in vdsOK
raise Exception(str(d))
Exception: {'status': {'message': "Permission settings on the specified path do not allow access to the storage. Verify permission settings on the specified storage path.: 'path = /rhev/data-center/mnt/_tmp_localstoragedomain'", 'code': 469}}
Can someone look at it?
Thanks,
Itzik