\&parse_vm_config,
\&write_vm_config);
-PVE::JSONSchema::register_standard_option('skiplock', {
- description => "Ignore locks - only root is allowed to use this option.",
- type => 'boolean',
- optional => 1,
-});
-
PVE::JSONSchema::register_standard_option('pve-qm-stateuri', {
description => "Some command save/restore state from this location.",
type => 'string',
'Haswell-noTSX' => 'GenuineIntel',
Broadwell => 'GenuineIntel',
'Broadwell-noTSX' => 'GenuineIntel',
+ 'Skylake-Client' => 'GenuineIntel',
# AMD CPUs
athlon => 'AuthenticAMD',
}
);
+my %scsiblock_fmt = (
+ scsiblock => {
+ type => 'boolean',
+ description => "whether to use scsi-block for full passthrough of host block device\n\nWARNING: can lead to I/O errors in combination with low memory or high memory fragmentation on host",
+ optional => 1,
+ default => 0,
+ },
+);
+
my $add_throttle_desc = sub {
my ($key, $type, $what, $unit, $longunit, $minimum) = @_;
my $d = {
%drivedesc_base,
%iothread_fmt,
%queues_fmt,
+ %scsiblock_fmt,
};
my $scsidesc = {
optional => 1,
%iothread_fmt,
%model_fmt,
%queues_fmt,
+ %scsiblock_fmt,
};
my $efidisk_fmt = {
optional => 1,
default => 1,
},
+ romfile => {
+ type => 'string',
+ pattern => '[^,;]+',
+ format_description => 'string',
+ description => "Custom pci device rom filename (must be located in /usr/share/kvm/).",
+ optional => 1,
+ },
pcie => {
type => 'boolean',
description => "Choose the PCI-express bus (needs the 'q35' machine model).",
if ($drive->{file} =~ m|^/|) {
$path = $drive->{file};
if (my $info = path_is_scsi($path)) {
- if ($info->{type} == 0) {
+ if ($info->{type} == 0 && $drive->{scsiblock}) {
$devicetype = 'block';
} elsif ($info->{type} == 1) { # tape
$devicetype = 'generic';
}
my $rombar = defined($d->{rombar}) && !$d->{rombar} ? ',rombar=0' : '';
+ my $romfile = $d->{romfile};
+
my $xvga = '';
if ($d->{'x-vga'}) {
$xvga = ',x-vga=on';
if($j == 0){
$devicestr .= "$rombar$xvga";
$devicestr .= ",multifunction=on" if $multifunction;
+ $devicestr .= ",romfile=/usr/share/kvm/$romfile" if $romfile;
}
push @$devices, '-device', $devicestr;
my $pfamily = PVE::Tools::get_host_address_family($nodename);
$spice_port = PVE::Tools::next_spice_port($pfamily);
- push @$devices, '-spice', "tls-port=${spice_port},addr=localhost,tls-ciphers=DES-CBC3-SHA,seamless-migration=on";
+ push @$devices, '-spice', "tls-port=${spice_port},addr=localhost,tls-ciphers=HIGH,seamless-migration=on";
push @$devices, '-device', "virtio-serial,id=spice$pciaddr";
push @$devices, '-chardev', "spicevmc,id=vdagent,name=vdagent";
my $running = check_running($vmid);
- return if !PVE::Storage::volume_resize($storecfg, $volid, $size, $running);
+ $size = 0 if !PVE::Storage::volume_resize($storecfg, $volid, $size, $running);
return if !$running;
print "$job: transferred: $transferred bytes remaining: $remaining bytes total: $total bytes progression: $percent % busy: $busy ready: $ready \n";
}
- $readycounter++ if $running_mirror_jobs->{$job}->{ready} eq 'true';
+ $readycounter++ if $running_mirror_jobs->{$job}->{ready};
}
last if scalar(keys %$jobs) == 0;
my $maxdev = 0;
- if ($conf->{scsihw} && ($conf->{scsihw} =~ m/^lsi/)) {
+ if (!$conf->{scsihw} || ($conf->{scsihw} =~ m/^lsi/)) {
$maxdev = 7;
} elsif ($conf->{scsihw} && ($conf->{scsihw} eq 'virtio-scsi-single')) {
$maxdev = 1;