mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-21 14:50:08 +03:00
Submitted by Anton Todorov <atodorov-storpool@users.noreply.github.com>
This commit is contained in:
parent
4e6b2d410c
commit
25eb83db77
@ -909,15 +909,23 @@ int LibVirtDriver::deployment_description_kvm(
|
||||
|
||||
// ---- Disk type and source for the image ----
|
||||
|
||||
if ( type == "BLOCK" )
|
||||
if ( type == "BLOCK" || type == "BLOCK_CDROM" )
|
||||
{
|
||||
ostringstream dev;
|
||||
|
||||
dev << vm->get_system_dir() << "/disk." << disk_id;
|
||||
|
||||
file << "\t\t<disk type='block' device='disk'>\n"
|
||||
<< "\t\t\t<source dev=" << one_util::escape_xml_attr(dev.str())
|
||||
<< "/>\n";
|
||||
if (type == "BLOCK_CDROM")
|
||||
{
|
||||
file << "\t\t<disk type='block' device='cdrom'>" << endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
file << "\t\t<disk type='block' device='disk'>" << endl;
|
||||
}
|
||||
|
||||
file << "\t\t\t<source dev=" << one_util::escape_xml_attr(dev.str())
|
||||
<< "/>" << endl;
|
||||
}
|
||||
else if ( type == "ISCSI" )
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user