mirror of
https://github.com/OpenNebula/one.git
synced 2024-12-24 21:34:01 +03:00
Submitted by Anton Todorov <atodorov-storpool@users.noreply.github.com>
(cherry picked from commit 25eb83db77
)
This commit is contained in:
parent
c88ee63e86
commit
9d6a1334bd
@ -987,15 +987,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…
Reference in New Issue
Block a user