Skip to content

Commit

Permalink
revert back to sata cdrom and use generic cloud img
Browse files Browse the repository at this point in the history
  • Loading branch information
verbit committed Jan 6, 2024
1 parent 7c65fcb commit 3b83834
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions minivirt/daemon.py
Original file line number Diff line number Diff line change
Expand Up @@ -478,14 +478,14 @@ def CreateDomain(self, request, context):

img_pool = self.conn.storagePoolLookupByName("restvirtimages")
if not domreq.base_image:
base_img_name = "debian-12-genericcloud-amd64-20240102-1614.qcow2"
base_img_name = "debian-12-generic-amd64-20240102-1614.qcow2"
try:
base_img = img_pool.storageVolLookupByName(base_img_name)
except:
from urllib.request import urlopen

res = urlopen(
f"https://cloud.debian.org/images/cloud/bookworm/20240102-1614/debian-12-genericcloud-amd64-20240102-1614.qcow2"
f"https://cloud.debian.org/images/cloud/bookworm/20240102-1614/debian-12-generic-amd64-20240102-1614.qcow2"
)
size = int(res.getheader("Content-length"))
base_img = img_pool.createXML(
Expand Down Expand Up @@ -581,7 +581,7 @@ def CreateDomain(self, request, context):
<disk type='file' device='cdrom'>
<driver name='qemu' type='raw'/>
<source file='{ccfg_vol.path()}'/>
<target dev='vde' bus='ide'/>
<target dev='vde' bus='sata'/>
</disk>
<interface type='network'>
<mac address='{mac}'/>
Expand Down

0 comments on commit 3b83834

Please sign in to comment.