mirror of
https://github.com/vagrant-libvirt/vagrant-libvirt.git
synced 2025-02-25 18:55:27 -06:00
improve package process
This commit is contained in:
parent
9ad2389a92
commit
4de1560027
@ -10,7 +10,7 @@ welcome and can help a lot :-)
|
||||
## Features
|
||||
|
||||
* Control local Libvirt hypervisors.
|
||||
* Vagrant `up`, `destroy`, `suspend`, `resume`, `halt`, `ssh`, `reload` and `provision` commands.
|
||||
* Vagrant `up`, `destroy`, `suspend`, `resume`, `halt`, `ssh`, `reload`, `package` and `provision` commands.
|
||||
* Upload box image (qcow2 format) to Libvirt storage pool.
|
||||
* Create volume as COW diff image for domains.
|
||||
* Create private networks.
|
||||
@ -51,7 +51,7 @@ $ sudo apt-get install libxslt-dev libxml2-dev libvirt-dev zlib1g-dev
|
||||
|
||||
In RedHat, Centos, Fedora, ...
|
||||
```
|
||||
# yum install libxslt-devel libxml2-devel libvirt-devel
|
||||
# yum install libxslt-devel libxml2-devel libvirt-devel libguestfs-tools-c
|
||||
```
|
||||
|
||||
If have problem with installation - check your linker. It should be ld.gold:
|
||||
|
@ -35,6 +35,9 @@ module VagrantPlugins
|
||||
env[:ui].info('Image has backing image, copying image and rebasing ...')
|
||||
FileUtils.cp(root_disk.path, @tmp_img)
|
||||
`qemu-img rebase -p -b "" #{@tmp_img}`
|
||||
# remove hw association with interface
|
||||
# working for centos with lvs default disks
|
||||
`virt-sysprep --no-logfile -a #{@tmp_img} `
|
||||
Dir.chdir(@tmp_dir)
|
||||
img_size = `qemu-img info #{@tmp_img} | grep 'virtual size' | awk '{print $3;}' | tr -d 'G'`.chomp
|
||||
File.write(@tmp_dir + '/metadata.json', metadata_content(img_size))
|
||||
|
Loading…
Reference in New Issue
Block a user